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

Login form will not work? Any Ideas?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 11-05-2004, 08:20 AM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default

I am running 4.0.6 gold
Reply With Quote
  #12  
Old 11-05-2004, 08:37 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

1) Download home.php and rename it myaccount.php

2) Open myaccount.php

Find:

Code:
$smarty->assign("main","catalog");

Change to:

Code:
$smarty->assign("main","myaccount");

3) Open: /skin1/customer/home_main.tpl

Find:

Code:
{else} {include file="common_templates.tpl"} {/if}

BEFORE that add:

Code:
{elseif $main eq "myaccount"} {include file="customer/main/myaccount.tpl"}

4) Create a new file called: myaccount.tpl

In it put this code:

Code:
<h3>{$lng.lbl_authentication}</h3> <table border="0" width="100%" cellpadding="2"> <tr> <td valign="top"> {capture name=dialog} <TABLE border="0"> {if $config.General.use_https_login eq "Y" and $usertype eq "C"} {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=errorform> <TR> <TD height="10" width="78" class="FormButton">{$lng.lbl_login}</TD> <TD width="10" height="10"><FONT class="Star">*</FONT></TD> <TD width="282" height="10"> <INPUT type="text" name="username" size="30"> </TD> </TR> <TR> <TD height="10" width="78" class="FormButton">{$lng.lbl_password}</TD> <TD width="10" height="10"><FONT class="Star">*</FONT></TD> <TD width="282" height="10"> <INPUT type="password" name="password" size="30"> {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}"> <INPUT type="hidden" name="mode" value="login"> </TD> </TR> <TR> <TD height="10" width="78" class="FormButton"></TD> <TD width="10" height="10"></TD> <TD width="282" height="10" class="ErrorMessage"> { if $main eq "login_incorrect"} {$lng.err_invalid_login} {/if} </TD> </TR> <TR> <TD height="10" width="78" class="FormButton"></TD> <TD width="10" height="10" class="FormButton"></TD> <TD width="282" height="10"> {if $js_enabled} {include file="buttons/submit.tpl" href="javascript:document.errorform.submit()" js_to_href="Y"} {else} {include file="submit_wo_js.tpl" value=$lng.lbl_submit} {/if} </TD> </TR> </FORM> </TABLE> {/capture} {include file="dialog.tpl" title=$lng.lbl_authentication content=$smarty.capture.dialog extra="width=100%"} </td> </tr> <tr> <td valign="top"> {include file="customer/main/register.tpl"} </td> </tr> </table>

5) Upload myaccount.php to the same directory as your home.php

6) Reupload home_main.tpl to the same place

7) Upload myaccount.tpl to /skin1/customer/main/

Load your myaccount.php in your browser.
Reply With Quote
  #13  
Old 11-05-2004, 01:24 PM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default

Jon,

Your almost there, or I am at least. I followed your directions to the T. However, once you click login it returns you back to the login screen. Why?

Why does http://www.pariscape.com/error_message.php?login_incorrect redirect you from the login page back to the home page and your script won't? I don't want them seeing the login screen after they login.

What does that form do differently that you don't?

The site is under major contruction, but please look at:

http://www.pariscape.com/myaccount.php

login in as customer:customer


Thanks
Reply With Quote
  #14  
Old 11-05-2004, 01:31 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Open myaccount.php

Find:

Code:
require "./auth.php";

After put:

Code:
if ($login) { header ("Location: /home.php"); }
Reply With Quote
  #15  
Old 11-06-2004, 10:01 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

That work?
Reply With Quote
  #16  
Old 11-07-2004, 08:27 AM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default

Yes! Thanks Jon for all your help.
Reply With Quote
  #17  
Old 11-11-2004, 11:46 AM
 
chris chris is offline
 

Senior Member
  
Join Date: Sep 2002
Location: UK
Posts: 145
 

Default Well done Jon

Well Jon you do rather beat the drum about your add-ons but I must praise you for the time you give to this forum - I followed the whole thread and just felt I had to congratulate you for all the work you did in helping the poster without any reward - thanks on behalf of the forum!!
(moderators I hope you don't mind my saying on behalf of the forum - I just feel Jon really deserves it!!)
__________________
Chris
some carts at v4.4.5 security patched on a hardened managed unix server
Reply With Quote
  #18  
Old 11-12-2004, 01:17 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Thanks
Reply With Quote
  #19  
Old 11-12-2004, 02:46 AM
  EnriqueHavoc's Avatar 
EnriqueHavoc EnriqueHavoc is offline
 

eXpert
  
Join Date: Jul 2004
Posts: 232
 

Default

there should be like a bi-monthly poll where we vote on the most helpful member on the forums and all chip in for some kind of "thank you" prize
__________________
X-Cart 4.0.12
PHP 4.3.11
MySQL 4.0.23
Linux/Apache
Net::SSLeay 1.25
libCURL libcurl/7.12.0 OpenSSL/0.9.7a zlib/1.1.4
www.ewdhosting.com
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 08:42 AM.

   

 
X-Cart forums © 2001-2020