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)
-   -   Authbox INSANITY! Login/Logout broken! (https://forum.x-cart.com/showthread.php?t=16625)

Debra 09-15-2005 05:24 PM

Authbox INSANITY! Login/Logout broken!
 
Ok, here is my site http://www.thecharmingbeadshop.com. It is not at all finished and I am very sure has many bugs in it, but that's ok. I am having a problem with my authbox. If you go to my site it is located at the bottom of the help menu on the left hand side...it's not going to stay there, just there for testing purposes at the moment.

Anyhow, my problem is this, even if you are not logged in it says:
" is logged in!" and it has the option to log out. If you do log in from the top menu bar it does say "name is logged in". (If you would like to test it you are more than welcome to make a test profile.) I restored the original authbox.tpl file, but my auth.tpl file isn't original, does this have any impact on it, is there anything mandatory that must be there? Would there be any other files that impact this one? Please help! Been going over it for hours and it's probably something small.

shan 09-15-2005 05:53 PM

your best bet is to restore those files and also look at how the auth boxes were included in the home.tpl in the first place. It looks like you removed the {if $login} sections

Debra 09-15-2005 08:07 PM

Ok. I restored my home.tpl file and the authbox works great. So what I need to know is what code is it that I should take out if I want to include my modified version of the authbox and login box on a different section of the page, the head for instance. This is all I took out and it doesn't work:

Code:

{if $login eq "" }
{ include file="auth.tpl" }


{else}
{ include file="authbox.tpl" }


And here is the original home.tpl file:
Code:

{* $Id: home.tpl,v 1.67.2.8 2005/06/15 06:14:26 max Exp $ *}
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<HTML>
<HEAD>
<TITLE>
{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{/if}
</TITLE>
{ include file="meta.tpl" }
<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
</HEAD>
<BODY leftmargin="0" topmargin="0" rightmargin="0" bottomargin="0" marginwidth="0" marginheight="0"{if $body_onload ne ''} onload="{$body_onload}"{/if}>
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/header.tpl"}
{/if}

<TABLE border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<TR>
<TD width="6"></TD>
<TD width="150" valign="top">
{if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")}
{ include file="customer/categories.tpl" }


{/if}
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Manufacturers ne "" and $config.Modules.manufacturers_menu eq "Y"}
{ include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{include file="customer/special.tpl"}
{ include file="help.tpl" }
[img]{$ImagesDir}/spacer.gif[/img]
</TD>
<TD width="20"></TD>
<TD valign="top">

{include file="location.tpl"}

{include file="dialog_message.tpl"}

{if $active_modules.Special_Offers ne ""}
{include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if}

{include file="customer/home_main.tpl"}


</TD>
<TD width="20"></TD>
<TD width="150" valign="top">
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/button.tpl"}


{/if}
{if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''}
{ include file="modules/Feature_Comparison/product_list.tpl" }


{/if}
{if $active_modules.Users_online ne ""}
{ include file="modules/Users_online/menu_users_online.tpl" }


{/if}
{ include file="customer/menu_cart.tpl" }


{if $login eq "" }
{ include file="auth.tpl" }


{else}
{ include file="authbox.tpl" }


{/if}
{ include file="news.tpl" }
{if $active_modules.Interneka ne ""}


{ include file="modules/Interneka/menu_interneka.tpl" }
{/if}


{ include file="poweredby.tpl" }


[img]{$ImagesDir}/spacer.gif[/img]
</TD>
<TD width="6"></TD>
</TR>
</TABLE>
{ include file="rectangle_bottom.tpl" }
</BODY>
</HTML>
{/if}


Dongan 09-15-2005 08:09 PM

Try this. I think you have forgotten to end the IF statement.

Code:

{if $login eq "" }
{ include file="auth.tpl" }

 
{else}
{ include file="authbox.tpl" }
{/if}


Debra 09-15-2005 08:14 PM

Hahaha! Thanks! That's great....must mean it's time to take a break if I missed something that simple. Works fine...for now...until I can think of another way to mess it up...lol.


All times are GMT -8. The time now is 05:17 PM.

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