Quote:
Originally Posted by aop
Sstillwell;
thanks for share that little mod.
I have a couples of questions; I visited your Site ( nice ! ) and after I registered, showed me the a message ( succesfully .... ) in a box with
[x] to close it. When a hit to close, it took me again to a similar template
( this time "Modified Profile" ). This is much better than X-Cart , but still a little confusing. Is there any way to take customer back to other page ( I don't know maybe last page visited, or Home Page, etc ).
My other question: I see you don't have a "Member" area on your main page; instead you have a "Login" link that take customers to a Login Template. Is that template a new feature on your version ? Because I don't have that Template. If not, and if it is a Mod, could you tell me how you get it ?
I appreciate any help on this matter.
Again thank you for share with others !!
Aldo
|
Aldo,
Thanks for the questions. If you are talking about the login page, I think that is custom. I basically just made a file called
login.php
Code:
<?php
/* Custom page added by Shane 2004.11.26 */
require "./auth.php";
#
# Assign Smarty variables and show template
#
$smarty->assign("main","login_form");
$smarty->assign("location", $location);
func_display("customer/home.tpl",$smarty);
?>
Then I make a template
skin1/customer_auth.tpl
Code:
{* $Id: auth.tpl,v 1.39 2004/06/28 11:38:38 mclap Exp $ *}
{capture name=menu}
{if $login ne ""}
<h2>{$lng.lbl_welcome_back}
{$name.firstname} {$name.lastname}</h2>
{else}
<table cellpadding="3" cellspacing="0" border="0" align="center" width="100%">
<tr>
<td valign="top">
<h1>{$lng.lbl_returning_customer}</h1>
<TABLE border="0" cellpadding="0" cellspacing="2">
{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}
{include file="buttons/secure_login.tpl"}
</TD>
</TR>
{else} {* use_secure_login_page *}
<TR>
<td nowrap><FONT>{$lng.lbl_username}</FONT></td>
<td><input type="text" name="username" value="{#default_login#}" size="16" class="text" />
</td>
</tr>
<tr>
<td><FONT>{$lng.lbl_password}</FONT></td>
<td><input type="password" name="password" value="{#default_password#}" size="16" class="text" /><INPUT type="hidden" name="mode" value="login"></td>
{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}
{* Removed 2005.01.20 was causing a redirect back to the login page after a successful logon <INPUT type="hidden" name="redirect" value="{$redirect}"> *}
</TD></TR>
<TR>
<td></td>
<TD height="24">
{if $js_enabled}
{include file="buttons/button.tpl" button_title=$lng.lbl_log_in href="javascript: document.authform.submit()" style="button"}
{else}
{include file="buttons/login_menu.tpl"}
{/if}
</TD>
</TR>
{/if} {* use_secure_login_page *}
{if $usertype eq "P" and $active_modules.Simple_Mode eq "Y" or $usertype eq "A"}
<TR>
<TD class="VertMenuItems">
<DIV align="left">
{$lng.lbl_insecure_login}
</DIV>
</TD>
</TR>
{/if}
{if $login eq ""}
<TR>
<td></td>
<TD height="24">
{$lng.lbl_recover_password}
</TD>
</TR>
{/if}
</FORM>
</TABLE>
</td>
<td width="20"></td>
<td valign="top" style="background-color: #eceded;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><h1>{$lng.lbl_new} {$lng.lbl_customer}?</h1></td>
</tr>
<tr>
<td align="right">
{include file="buttons/create_profile_menu.tpl" style="button" href="register.php"}</td>
</tr>
</table>
</td>
</tr>
</table>
<dl>
<dt><span class="warning">Usernames from the old site will not work on the new site.</span></dt>
<dd>Old Site dates of operation. Feb 1999 - March 2005</dd>
<dd>New Site dates of operation. March 2005 - Now</dd>
</dl>
{/if}
{/capture}
{ include file="dialog.tpl" content=$smarty.capture.menu }
Then you just have to edit
skin1/customer/home_main.tpl
Add this line after all the "elseif" statements
Code:
{* Added by shane 2004.11.26 *}
{elseif $main eq "login_form"}
{include file="customer_auth.tpl"}
Simple as that, now you have a login page instead of a login box.