Thread: Login Link
View Single Post
  #53  
Old 07-10-2008, 11:16 AM
  neaisha's Avatar 
neaisha neaisha is offline
 

eXpert
  
Join Date: May 2006
Posts: 276
 

Default Re: Login Link

i couldnt get this to work. so what i did was duplicate this page - xcart/error_message.php?need_login. i'm not sure what unnecessary code can/should be removed from the duplicated file beyond what i've already removed so that it continues to work but...

create a file called myaccount.php and insert the following code

Code:
<?php require "./auth.php"; require $xcart_dir."/include/categories.php"; # # Assign login information # x_session_register("login_antibot_on"); x_session_register("antibot_err"); x_session_register("username"); $smarty->assign("main","myaccount"); $smarty->assign("username", $username); $smarty->assign("login_antibot_on", $login_antibot_on); if ($antibot_err) { $smarty->assign("antibot_err", $antibot_err); $antibot_err = false; } # Assign the current location line $smarty->assign("location", $location); func_display("customer/home.tpl",$smarty); ?>


then upload it to /xcart directory.



then in skin1/common_templates.tpl add the following...

Code:
{elseif $main eq "myaccount" or $main eq "antibot_error" or $main eq "disabled"} {assign var="is_remember" value="Y"} {include file="main/error_login_incorrect.tpl"}

then add the link to your page http://www.mysite/xcart/myaccount.php where you want it to appear.
__________________
X-Cart Gold 4.4.3
--------------------------------------
Reply With Quote