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

My Account Login

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #61  
Old 09-12-2006, 01:34 PM
  august's Avatar 
august august is offline
 

Senior Member
  
Join Date: Jul 2003
Posts: 178
 

Default Re: My Account Login

I think I had a cup too much of caffeine, I jump right to the code without reading that part. Thanks for your prompt answer, that solved the problem.
__________________
"The point is, to make so much money, that money isn't the point anymore."

Pro Version 4.0.19
Gold Version 4.1.3
Linux
Reply With Quote
  #62  
Old 09-15-2006, 08:35 AM
 
tron tron is offline
 

Advanced Member
  
Join Date: Jun 2003
Location: Oslo
Posts: 46
 

Default Re: Login on separate "My Account" page

Hi,
here is a modified auth_mod.tpl that works very good with my 4.0.17 version.
-------------------------------------------------------------------------------------



{* $Id: auth_mod.tpl,v 1.39 2004/06/28 11:38:38 mclap Exp $ *}
{capture name=menu}
<TABLE border="0" cellpadding="0" cellspacing="1" width="50%">
{if $config.General.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}">




{if $config.General.use_secure_login_page eq "Y"}
{* use_secure_login_page *}



<TR>
<TD align="left">
{if $usertype eq "C"}
{assign var="slogin_url" value=$catalogs_secure.customer}
{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="left">

<TABLE width="100%" border="0" align="left">
<TR><TD align="left">{$lng.lbl_username}</TD><TD align="left"><INPUT type="text" name="username" size="28" value="{#default_login#}"></TD></TR>

<TR><TD align="left">{$lng.lbl_password}</TD><TD align="left"><INPUT type="password" name="password" size="28" value="{#default_password#}">
<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>

<TR>
<TD height="50" align="left"></TD>
<TD height="50" align="left">




{if $js_enabled}
<A href="javascript: document.authform.submit()" class="VertMenuItems">
{include file="buttons/login_menu.tpl"}</A>
{else}
{include file="buttons/login_menu.tpl"}
{/if}
{/if}





{if $usertype eq "C" or ($usertype eq "B" and $config.XAffiliate.partner_register eq "Y")}

<br><br>

<A href="register.php" class="VertMenuItems">
{include file="buttons/create_profile_menu.tpl"}</A>
</TD>
</TR>
{/if}


{if $login eq ""}




<TR>
<TD height="24" nowrap class="VertMenuItems">
<A href="help.php?section=Password_Recovery" class="VertMenuItems">{$lng.lbl_recover_password}< /A>
</TD>
</TR>
{/if}
</TD></TR></TABLE>

<br><br>

{if $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"}



<TR>
<TD colspan="2" align="left">
<DIV align="left">{$lng.lbl_insecure_login}
</DIV>
</TD>
</TR>



{/if}
{if $usertype eq "C"}
<TR>
<TD align="left" colspan="2">


{if $js_enabled}
<A href="{$js_update_link}" class="SmallNote">
{$lng.txt_javascript_disabled}</A>
{else}
<A href="{$js_update_link}" class="SmallNote">{$lng.txt_javascript_enabled}</A>
{/if}
</TD>
</TR>
{/if}
</FORM>
</TABLE>
{/capture}
{ include file="menu.tpl" dingbats="dingbats_authentification.gif" menu_title=$lng.lbl_authentication menu_content=$smarty.capture.menu }
__________________
4.0.17

fancy cat.
aom
sns
Reply With Quote
  #63  
Old 10-31-2006, 07:35 AM
 
ranger82nd ranger82nd is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 159
 

Default Re: My Account Login

Can someone tell me why my javascript buttons don't seem to work when I use this MOD? There is a hole in my wall from the continual banging of my head!
auth_mod.tpl as follows:
Code:
{* $Id: auth_mod.tpl,v 1.39 2004/06/28 11:38:38 mclap Exp $ *} {capture name=menu} <TABLE border="0" cellpadding="0" cellspacing="1" width="100%"> {if $config.General.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}"> {if $config.General.use_secure_login_page eq "Y"} {* use_secure_login_page *} <TR> <TD> {if $usertype eq "C"} {assign var="slogin_url" value=$catalogs_secure.customer} {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} <A href="{$slogin_url}/secure_login.php{$slogin_url_add}" class="VertMenuItems">{include file="buttons/secure_login.tpl"}</A> </TD> </TR> {else} {* use_secure_login_page *} <TR> <TD> <TABLE width="100%" border="0" align="right"> <TR><TD align="right">{$lng.lbl_username}</TD><TD align="left"><INPUT type="text" name="username" size="16" value="{#default_login#}"></TD></TR> <TR><TD align="right">{$lng.lbl_password}</TD><TD align="left"><INPUT type="password" name="password" size="16" value="{#default_password#}"> <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> <TR> <TD height="50"></TD> <TD height="50" align="left"> {include file="buttons/login_menu.tpl"} {/if} {* use_secure_login_page *} {if $usertype eq "C" or ($usertype eq "B" and $config.XAffiliate.partner_register eq "Y")} <p>Don't have an account? <a href="register.php"><b>Register here</b></a>.<br> Forgot your password? No problem, just <a href="help.php?section=Password_Recovery"><b>Click here</b></a>.</p> {/if} </TD> </TR> {if $login eq ""} <TR> <TD></TD> </TR> </TD> </TR> {/if} </TD></TR></TABLE> {if $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"} <TR> <TD colspan="2"> <DIV align="left">{$lng.lbl_insecure_login} </DIV> </TD> </TR> {/if} {if $usertype eq "C"} <TR> <TD align="right" colspan="2"> </TD> </TR> {/if} </FORM> </TABLE> {/capture} { include file="menu_mod.tpl" menu_title=$lng.lbl_authentication menu_content=$smarty.capture.menu }

TIA
__________________
X-Cart Gold v4.0.17 ~ EWD Hosting!
Reply With Quote
  #64  
Old 11-14-2006, 12:45 PM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default Re: My Account Login

First of all Ranger, when someone posts a mod always look at their signature to see what version of X-Cart they are running, the writer of this mod is on 4.1.x. When I first put the mod in place, a lot of the java buttons didn't work for me at all, so I just took my existing auth.tpl and made a copy of it into auth_mod.tpl now everything worked but didn't quite look the way I wanted so I edited it to look how I wanted it to. Simple.

Just get creative and look at the instructions first (the important part to notice was version 4.1.x) Since I noticed that I didn't even attempt to look at his code and figure out what was wrong, I just copied in code that I knew was correct. Just take it a little slow, and save the dry wall in your office from the head imprints

Nice mod by the way, nothing fancy, just simple and functional. Opens a lot of possibilities.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #65  
Old 11-14-2006, 02:36 PM
 
ranger82nd ranger82nd is offline
 

Senior Member
  
Join Date: Jan 2006
Posts: 159
 

Default Re: My Account Login

Got it working...
Thanks! I've already done some customizing with much more to go with this one!
__________________
X-Cart Gold v4.0.17 ~ EWD Hosting!
Reply With Quote
  #66  
Old 11-18-2006, 06:38 AM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default Re: My Account Login

That's one thing thatr should be noted in each post: Not what version your sig says, but what version the mod was written for. This was one of my ealier attempts and is a bit antiquated.

Thanks,

Mike
__________________
4.1.9
Reply With Quote
  #67  
Old 12-06-2006, 12:11 PM
 
kabam kabam is offline
 

Member
  
Join Date: Oct 2006
Posts: 13
 

Default Re: My Account Login

Quote:
Originally Posted by thundernugs
OK, so, how about this.....

create a static page called "Login to Your Account"

here is the page content

Code:
{if $login} <table width=500> <tr><td> <div class=HeadText> You are currently logged in as {$login} <br><Br> <a href="orders.php?mode=search">Click here to track or view your previous orders</a> <br><br> <a href="register.php?mode=update">Click here to view or modify your profile</a> <br><br> <a href="include/login.php?mode=logout&redirect=customer">Click here to Log Out</a> </td></tr></table> {else} <table width=500><tr><td>Please login here using your username and password<br><br> { include file="auth.tpl" } </td> </tr> </table> </div> {/if}

make sure that in "General Settings" you have checked "Parse Smarty tags in the content of embedded static pages:"

you account login link is = "http://www.yoursite.com/pages.php?pageid=2"

or whatever number static page you are on

this seems to be a really easy solution to this problem, almost too easy.....but it works for me.

note - i haven't got my ssl cert installed yet, so not sure if that will cause any issues.

-mike

Thanks for this! Works great!
__________________
X-Cart Version 4.1.3
Reply With Quote
  #68  
Old 12-19-2006, 10:30 AM
 
johndp johndp is offline
 

Newbie
  
Join Date: Sep 2006
Posts: 3
 

Default Re: Login on separate "My Account" page

Quote:
Originally Posted by tron
Hi,
here is a modified auth_mod.tpl that works very good with my 4.0.17 version.
-------------------------------------------------------------------------------------



{* $Id: auth_mod.tpl,v 1.39 2004/06/28 11:38:38 mclap Exp $ *}
{capture name=menu}
<TABLE border="0" cellpadding="0" cellspacing="1" width="50%">
{if $config.General.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}">




{if $config.General.use_secure_login_page eq "Y"}
{* use_secure_login_page *}



<TR>
<TD align="left">
{if $usertype eq "C"}
{assign var="slogin_url" value=$catalogs_secure.customer}
{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="left">

<TABLE width="100%" border="0" align="left">
<TR><TD align="left">{$lng.lbl_username}</TD><TD align="left"><INPUT type="text" name="username" size="28" value="{#default_login#}"></TD></TR>

<TR><TD align="left">{$lng.lbl_password}</TD><TD align="left"><INPUT type="password" name="password" size="28" value="{#default_password#}">
<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>

<TR>
<TD height="50" align="left"></TD>
<TD height="50" align="left">




{if $js_enabled}
<A href="javascript: document.authform.submit()" class="VertMenuItems">
{include file="buttons/login_menu.tpl"}</A>
{else}
{include file="buttons/login_menu.tpl"}
{/if}
{/if}





{if $usertype eq "C" or ($usertype eq "B" and $config.XAffiliate.partner_register eq "Y")}

<br><br>

<A href="register.php" class="VertMenuItems">
{include file="buttons/create_profile_menu.tpl"}</A>
</TD>
</TR>
{/if}


{if $login eq ""}




<TR>
<TD height="24" nowrap class="VertMenuItems">
<A href="help.php?section=Password_Recovery" class="VertMenuItems">{$lng.lbl_recover_password}< /A>
</TD>
</TR>
{/if}
</TD></TR></TABLE>

<br><br>

{if $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"}



<TR>
<TD colspan="2" align="left">
<DIV align="left">{$lng.lbl_insecure_login}
</DIV>
</TD>
</TR>



{/if}
{if $usertype eq "C"}
<TR>
<TD align="left" colspan="2">


{if $js_enabled}
<A href="{$js_update_link}" class="SmallNote">
{$lng.txt_javascript_disabled}</A>
{else}
<A href="{$js_update_link}" class="SmallNote">{$lng.txt_javascript_enabled}</A>
{/if}
</TD>
</TR>
{/if}
</FORM>
</TABLE>
{/capture}
{ include file="menu.tpl" dingbats="dingbats_authentification.gif" menu_title=$lng.lbl_authentication menu_content=$smarty.capture.menu }

This got it working for v. 4.0.19 as well...thanks a lot!
__________________
Version 4.0.19
Reply With Quote
  #69  
Old 12-25-2006, 06:46 PM
 
delphi delphi is offline
 

Senior Member
  
Join Date: Jul 2004
Posts: 185
 

Default Re: Login on separate "My Account" page

Works well with X-cart 4.1.3
__________________
X-Cart Gold version 4.4.4
X-Cart directory /home/web/u/ugchweb/cart
PHP 5
MySQL server 5
Reply With Quote
  #70  
Old 01-25-2007, 10:58 AM
 
Hunabku Hunabku is offline
 

Advanced Member
  
Join Date: Jun 2006
Posts: 47
 

Default Re: My Account Login

thundernugs THANKS

In 4.1.3 your solution seems to work great! My only need is to have the user be redirected after successfully creating a new, or modifying an existing profile - (in my cart) they remain on the Modify Profile page. I think the right flow would be to go back to thundernugs "Login to Your Account" page.

any ideas?

Quote:
Originally Posted by thundernugs
OK, so, how about this.....

create a static page called "Login to Your Account"

here is the page content

Code:
{if $login} <table width=500> <tr><td> <div class=HeadText> You are currently logged in as {$login} <br><Br> <a href="orders.php?mode=search">Click here to track or view your previous orders</a> <br><br> <a href="register.php?mode=update">Click here to view or modify your profile</a> <br><br> <a href="include/login.php?mode=logout&redirect=customer">Click here to Log Out</a> </td></tr></table> {else} <table width=500><tr><td>Please login here using your username and password<br><br> { include file="auth.tpl" } </td> </tr> </table> </div> {/if}

make sure that in "General Settings" you have checked "Parse Smarty tags in the content of embedded static pages:"

you account login link is = "http://www.yoursite.com/pages.php?pageid=2"

or whatever number static page you are on

this seems to be a really easy solution to this problem, almost too easy.....but it works for me.

note - i haven't got my ssl cert installed yet, so not sure if that will cause any issues.

-mike
__________________
Version 4.1.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 03:47 PM.

   

 
X-Cart forums © 2001-2020