Thread: Login Link
View Single Post
  #31  
Old 05-12-2004, 06:34 PM
 
ronp ronp is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: SE US
Posts: 30
 

Default Separate Login Page help please

I would love to have a separate login page as well but I get a Runtime Error when I try to login from the new page. Login from old method which still is using auth.tpl works fine. I know this looks very simple but I can't figure it out. Any help appreciated.

New PHP file customer_login.php in my Customer folder (not skin1/customer):

<?
require "./auth.php";
require $xcart_dir."/include/categories.php";
$smarty->assign("main", "customer_login");
$smarty->assign("location",$location);
$smarty->display("customer/home.tpl");
?>

**************************************************

New .tpl file customer_login.tpl in my skin1/customer/main folder:

{* $Id: customer_login.tpl Exp $ *}

{assign var="last_location" value="My Account"}
{ include file="location.tpl" last_location=$last_location }
{capture name=dialog}

<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<FORM action="{$xcart_web_dir}/include/login.php" method=post name=authform>

<tr>
<td class=VertMenuItems colspan=2>
<font class=VertMenuItems>{$lng.lbl_username}</font>

<input type=text name=username size="14" style="font-family: Verdana; font-size: 9px; border: 1px solid #0099CC; background-color: #FFFFFF; color:#000000">

<font class=VertMenuItems>{$lng.lbl_password}</font>

<input type=password name=password size="14" style="font-family: Verdana; font-size: 9px; border: 1px solid #0099CC; background-color: #FFFFFF; color:#000000">
{if $js_enabled}
{include file="buttons/go.tpl" style="button" type="input"}
{else}
{include file="buttons/go.tpl" style="button" type="input" align="middle"}
{/if}
<input type=hidden name=mode value=login>
{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}">
{/if}
<input type=hidden name=redirect value="{$redirect}">

</td></tr>

{if $usertype eq "C" or ($usertype eq "B" and $config.Modules.partner_register eq "Y")}
<td height=24 align=left nowrap class=VertMenuItems><font size="0">Register

{$lng.lbl_recover_password}</font></td>
</tr>
{/if}

</td>
</form>
</table>

{/capture}
{include file="dialog.tpl" title="Returning Customer Login" content=$smarty.capture.dialog extra="width=100%"}

************************************************** ****

Change made to common_templates.tpl:
{elseif $main eq "customer_login"}
{include file="customer/main/customer_login.tpl"}

*************************************
The error I get is A Runtime Error Has Occurred...
Line: 0
Error: Object doesn't support this property or method

Running x-cart 3.5.1
__________________
----------------------------------------------------
X-Cart 3.5.1
\"Heavily Modified\"
Win2000 Advanced Server/Apache 2.0.54 w/OpenSSL 0.9.7g
PHP 4.4.0/MySQL 4.1.14-nt
Reply With Quote