Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Table in customer area

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-28-2005, 01:26 PM
 
webmonster webmonster is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 35
 

Default Table in customer area

I have moved my Customer menu to appear in a different place.

How would I include this info in a table that is only visible when a customer logs in? Everything works fine, I would like to put it in a table with a different bg color to beautify it.

EXAMPLE:
Before Mod
Http://www.spookyplanet.com/defaULT1.jpg


After Mod
Http://www.spookyplanet.com/defaULT2.jpg

Code:
{if $active_modules.Wishlist ne "" and $wlid ne ""} {$lng.lbl_friends_wish_list} {/if} {if $login ne ""} {if $active_modules.Wishlist ne ""} {$lng.lbl_wish_list} {if $active_modules.Gift_Registry ne ""} {$lng.lbl_gift_registry} {/if} {/if} {if $anonymous_login eq ""} {$lng.lbl_modify_profile} {$lng.lbl_delete_profile} {/if} {$lng.lbl_orders_history} {if $user_subscription ne ""} {include file="modules/Subscriptions/subscriptions_menu.tpl"} {/if} {if $active_modules.RMA ne "" && $login ne ''} {include file="modules/RMA/customer_menu.tpl"} {/if} {if $active_modules.Special_Offers ne "" && $login ne ''} {include file="modules/Special_Offers/menu_cart.tpl"} {/if} {/if}
__________________
4.1.x
Reply With Quote
  #2  
Old 12-28-2005, 05:47 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Just wrap the code with a table and add a class to use a background image or color.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 12-29-2005, 12:53 PM
 
webmonster webmonster is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 35
 

Default

not sure how to do that
__________________
4.1.x
Reply With Quote
  #4  
Old 12-29-2005, 01:04 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Code:
<table class="membertable" width="x" height="x" cellpadding="0" cellspacing="0"><tr><td> {if $active_modules.Wishlist ne "" and $wlid ne ""} {$lng.lbl_friends_wish_list} {/if} {if $login ne ""} {if $active_modules.Wishlist ne ""} {$lng.lbl_wish_list} {if $active_modules.Gift_Registry ne ""} {$lng.lbl_gift_registry} {/if} {/if} {if $anonymous_login eq ""} {$lng.lbl_modify_profile} {$lng.lbl_delete_profile} {/if} {$lng.lbl_orders_history} {if $user_subscription ne ""} {include file="modules/Subscriptions/subscriptions_menu.tpl"} {/if} {if $active_modules.RMA ne "" && $login ne ''} {include file="modules/RMA/customer_menu.tpl"} {/if} {if $active_modules.Special_Offers ne "" && $login ne ''} {include file="modules/Special_Offers/menu_cart.tpl"} {/if} {/if} </td></tr></table>

Replace width and height with the actual width and height you want (should match the size of the image). Then add this to skin1.css:

.membertable {BACKGROUND: URL(images/imagename.jpg); background-repeat: no-repeat;}

Replace imagename.jpg with the name of the image you want to use as a background. Upload it to skin1/images. That should do it![/code]
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 12-29-2005, 01:28 PM
 
webmonster webmonster is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 35
 

Default

Good work balinor. One more question, Is it possible for this backround image to disappear when a customer is not logged in?
__________________
4.1.x
Reply With Quote
  #6  
Old 12-29-2005, 01:34 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Yes, just replace this:

class="membertable"

with this:

{if $login ne ""}
class="membertable"
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 12-29-2005, 02:40 PM
 
webmonster webmonster is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 35
 

Default

Ok, works great. Although I have one more question. The box Appears right before my Dialog table. It works great when a customer is logged in, but when there not .. a nice space is there there. I guess what I'm asking is there a way to
Code:
{if $login ne ""} that whole space? {/if}


SWEET! Logged in!
http://www.spookyplanet.com/demo111.jpg


SPACE ( Not logged in)
http://www.spookyplanet.com/demo111_1.jpg
__________________
4.1.x
Reply With Quote
  #8  
Old 12-29-2005, 02:44 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Got ya...this will do the trick:

Code:
{if login ne ""}<table class="membertable" width="x" height="x" cellpadding="0" cellspacing="0"><tr><td> {if $active_modules.Wishlist ne "" and $wlid ne ""} {$lng.lbl_friends_wish_list} {/if} {if $login ne ""} {if $active_modules.Wishlist ne ""} {$lng.lbl_wish_list} {if $active_modules.Gift_Registry ne ""} {$lng.lbl_gift_registry} {/if} {/if} {if $anonymous_login eq ""} {$lng.lbl_modify_profile} {$lng.lbl_delete_profile} {/if} {$lng.lbl_orders_history} {if $user_subscription ne ""} {include file="modules/Subscriptions/subscriptions_menu.tpl"} {/if} {if $active_modules.RMA ne "" && $login ne ''} {include file="modules/RMA/customer_menu.tpl"} {/if} {if $active_modules.Special_Offers ne "" && $login ne ''} {include file="modules/Special_Offers/menu_cart.tpl"} {/if} {/if} </td></tr></table>{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 12-30-2005, 12:27 PM
 
webmonster webmonster is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 35
 

Default

hmm... Didn't seem to work ...The Image appears if your not logged in.. Only the text disappears and reappears when logged in or out. =(
__________________
4.1.x
Reply With Quote
  #10  
Old 12-30-2005, 12:30 PM
 
webmonster webmonster is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 35
 

Default

Oh I got it !!!

you forgot the $

Code:
{if login ne ""}

to

Code:
{if $login ne ""}
__________________
4.1.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:50 AM.

   

 
X-Cart forums © 2001-2020