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

Custom Auth.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-02-2008, 09:11 AM
 
pcarcare pcarcare is offline
 

eXpert
  
Join Date: Jun 2004
Location: Salt Lake City, Utah
Posts: 230
 

Default Custom Auth.tpl

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
Attached Thumbnails
Click image for larger version

Name:	Auth_Example.gif
Views:	150
Size:	2.2 KB
ID:	972  
__________________
X-cart gold 4.5.2 (live)
X-payments 1.0.5

http://www.professionalcarcare.com
Your online source for all your car care needs
Reply With Quote
  #2  
Old 06-29-2008, 07:25 AM
  JWait's Avatar 
JWait JWait is offline
 

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

Default Re: Custom Auth.tpl

Without going into the code deeply, it appears correct. What is the specific problem you are having?
__________________
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 06-29-2008, 10:54 AM
  tqualizerman's Avatar 
tqualizerman tqualizerman is offline
 

X-Adept
  
Join Date: Jun 2008
Posts: 392
 

Default Re: Custom Auth.tpl

Can you also show us how you are calling on auth.tpl from the main template?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World
- Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com)


X-Cart Version 4.1.10
Reply With Quote
  #4  
Old 06-29-2008, 10:58 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Custom Auth.tpl

I don't see a closing </form> tag anywhere?

Tqualizerman, just call the template - {include file="auth.tpl}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:42 AM.

   

 
X-Cart forums © 2001-2020