View Single Post
  #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