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

Help with Errors when Moving Login and Shopping Cart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-26-2008, 05:00 PM
 
Vivarant Vivarant is offline
 

Advanced Member
  
Join Date: Jun 2007
Posts: 34
 

Default Help with Errors when Moving Login and Shopping Cart

I modified my store to move the login and cart to the top by editing skin1/customer/home.tpl as shown below. This worked great to move the Login and Shopping cart to the top but when i logged in i could not see Categories, Manufactures or the Cart. Is there another file i'm supposed to edit so that logged in customers can view the changes or is the code messed up somehow?

Code:
<td class="VertMenuLeftColumn"> { include file="customer/search.tpl" } <br /> {if $login eq "" } { include file="auth.tpl" } <br /> { include file="customer/menu_cart.tpl" } <br /> {if $active_modules.SnS_connector && $config.SnS_connector.sns_display_button eq 'Y'} {include file="modules/SnS_connector/button.tpl"}<br /> <br /> {/if} {*{ include file="customer/categories.tpl" }*} {include file="treemenu/treemenu.tpl"} <br /> {if $active_modules.Manufacturers ne "" and $config.Manufacturers.manufacturers_menu eq "Y"} { include file="modules/Manufacturers/menu_manufacturers.tpl" } {/if} { include file="customer/special.tpl" } {if $active_modules.Survey && $menu_surveys} {foreach from=$menu_surveys item=menu_survey} {include file="modules/Survey/menu_survey.tpl"} <br /> {/foreach} {/if} <br /> {/if} {if $login eq "" } { include file="news.tpl" } {else} { include file="authbox.tpl" } {/if} <br /> {include file="customer/main/recently_viewed.tpl"} <br /> {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu eq "Y"} { include file="modules/Bestsellers/menu_bestsellers.tpl" } {/if} <br /> {if $active_modules.Interneka ne ""} { include file="modules/Interneka/menu_interneka.tpl" } <br /> {/if} { include file="help.tpl" } <br /> { include file="livehelp.tpl" } <br /> { include file="poweredby.tpl" } <br />
__________________
Digiscrap Boutique
X-Cart Pro 4.5
Reply With Quote
  #2  
Old 11-26-2008, 06:14 PM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Help with Errors when Moving Login and Shopping Cart

Is your version 4.0.19 or 4.1.9? Please update your signature.

You have your...
{if $login eq "" }
{include file="auth.tpl" }
{else}
{include file="authbox.tpl" }
{/if}
split by a bunch of other includes.

From the thread at http://forum.x-cart.com/showthread.php?t=21529

auth.tpl - this is the side menu login box. Shared between admin and customer side.
(this includes the "username" and "password" boxes, the login (secure or not) and register buttons, as well as the "If JavaScript is.." links)

authbox.tpl - this is the side menu login box for logged in customers. Shared between admin and customer side.
(this includes the "logout" button/link)

What you have done is make the following dependent on if the customer is not logged in ( {if $login eq "" } )...
{ include file="customer/menu_cart.tpl" }
{include file="modules/SnS_connector/button.tpl"}
{include file="treemenu/treemenu.tpl"}
{ include file="modules/Manufacturers/menu_manufacturers.tpl" }
{ include file="customer/special.tpl" }
{include file="modules/Survey/menu_survey.tpl"}

So none of these will be displayed if you are logged in.

For every "if" there needs to be a closing "/if". The one for {if $login eq "" } doesn't occur until...
{/foreach}
{/if}
<br />
{/if} <<<<<<<<<<<<< HERE
{if $login eq "" } <<< and then you use it again (so news will only display if you are not logged in)
{ include file="news.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 11-26-2008, 07:12 PM
 
Vivarant Vivarant is offline
 

Advanced Member
  
Join Date: Jun 2007
Posts: 34
 

Default Re: Help with Errors when Moving Login and Shopping Cart

can i just get rid of {if $login eq "" }? I'm really lost at this point of what to do
__________________
Digiscrap Boutique
X-Cart Pro 4.5
Reply With Quote
  #4  
Old 11-27-2008, 03:49 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Help with Errors when Moving Login and Shopping Cart

Get rid of the {/if}{if $login eq "" } just before { include file="news.tpl" }.
Then move the {else} { include file="authbox.tpl" } {/if} to the top, just under { include file="auth.tpl" }
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
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 02:19 PM.

   

 
X-Cart forums © 2001-2020