X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Table in customer area (https://forum.x-cart.com/showthread.php?t=18914)

webmonster 12-28-2005 01:26 PM

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. :lol:

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}


balinor 12-28-2005 05:47 PM

Just wrap the code with a table and add a class to use a background image or color.

webmonster 12-29-2005 12:53 PM

not sure how to do that

balinor 12-29-2005 01:04 PM

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]

webmonster 12-29-2005 01:28 PM

Good work balinor. One more question, Is it possible for this backround image to disappear when a customer is not logged in?

balinor 12-29-2005 01:34 PM

Yes, just replace this:

class="membertable"

with this:

{if $login ne ""}
class="membertable"
{/if}

webmonster 12-29-2005 02:40 PM

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) :cry:
http://www.spookyplanet.com/demo111_1.jpg

balinor 12-29-2005 02:44 PM

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}


webmonster 12-30-2005 12:27 PM

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. =(

webmonster 12-30-2005 12:30 PM

Oh I got it !!!

you forgot the $

Code:

{if login ne ""}

to

Code:

{if $login ne ""}


All times are GMT -8. The time now is 02:04 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.