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)
-   -   Custom Auth.tpl (https://forum.x-cart.com/showthread.php?t=40218)

pcarcare 06-02-2008 09:11 AM

Custom Auth.tpl
 
1 Attachment(s)
Hi All-

I have been trying to edit the auth.tpl in such a way that I can include it in my header. For some reason I just can't get the code right. I have attached a .gif to show how I want the auth.tpl to look.

Here's my code....

<-----start code----->


{* $Id: auth.tpl,v 1.1.2.29 2007/09/03 09:30:58 max Exp $ *}
{if $config.Security.use_https_login eq "Y"}
{assign var="form_url" value=$https_location}
{else}
{assign var="form_url" value=$current_location}
{/if}
<form action="{$form_url}/include/login.php" method="post" name="authform">
<input type="hidden" name="{$XCARTSESSNAME}" value="{$XCARTSESSID}" />

<div align="right">

<table cellpadding="0" cellspacing="0" class="AuthBox">
{if $config.Security.use_secure_login_page eq "Y"} {* use_secure_login_page *}
<tr>
<td align="right">{assign var="slogin_url_add" value=""}
{if $usertype eq "C"}
{assign var="slogin_url" value=$catalogs_secure.customer}
{if $catalogs_secure.customer ne $catalogs.customer}
{assign var="slogin_url_add" value="?`$XCARTSESSNAME`=`$XCARTSESSID`"}
{/if}
{elseif $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"}
{assign var="slogin_url" value=$catalogs_secure.admin}
{elseif $usertype eq "P"}
{assign var="slogin_url" value=$catalogs_secure.provider}
{elseif $usertype eq "B"}
{assign var="slogin_url" value=$catalogs_secure.partner}
{/if}
{include file="buttons/secure_login.tpl"}
</td>
</tr>
{else} {* use_secure_login_page *}
<tr>
<td align="right">
<div align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="VertMenuItems" align="right">
<font class="VertMenuItems">{$lng.lbl_username}</font>
</td>
<td align="right"><img src="{$ImagesDir}/spacer.gif" width="2" height="1" alt="" /></td>
<td align="right"><input type="text" name="username" size="12" value="{#default_login#|default:$username}" /></td>
<td align="right"><img src="{$ImagesDir}/spacer.gif" width="2" height="1" alt="" /></td>
<td align="right"><font class="VertMenuItems">{$lng.lbl_password}</font></td>
<td align="right"><img src="{$ImagesDir}/spacer.gif" width="2" height="1" alt="" /></td>
<td align="right"><input type="password" name="password" size="12" maxlength="64" value="{#default_password#}" />
<input type="hidden" name="mode" value="login" /></td>
<td align="right"><img src="{$ImagesDir}/spacer.gif" width="5" height="1" alt="" /></td>
<td align="right" class="VertMenuItems">{include file="buttons/login_menu.tpl" style="button" button_style="menu"}</td>
<td align="right"><img src="{$ImagesDir}/spacer.gif" width="2" height="1" alt="" />{if $active_modules.Simple_Mode ne "" and $usertype ne "C" and $usertype ne "B"}
<input type="hidden" name="usertype" value="P" />
{else}
<input type="hidden" name="usertype" value="{$usertype|escape}" />
{/if}
<input type="hidden" name="redirect" value="{$redirect|escape}" /></td>
</tr>
</table>
</div>

</td>
</tr>
{if $usertype ne "C" and ($usertype ne "B" or $config.XAffiliate.partner_register ne "Y")}{/if}
</table>
</div>
{/if}


<-----end code----->

Can anybody see what I did wrong?

Thanks

JWait 06-29-2008 07:25 AM

Re: Custom Auth.tpl
 
Without going into the code deeply, it appears correct. What is the specific problem you are having?

tqualizerman 06-29-2008 10:54 AM

Re: Custom Auth.tpl
 
Can you also show us how you are calling on auth.tpl from the main template?

balinor 06-29-2008 10:58 AM

Re: Custom Auth.tpl
 
I don't see a closing </form> tag anywhere?

Tqualizerman, just call the template - {include file="auth.tpl}


All times are GMT -8. The time now is 02:14 AM.

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