X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Register Confirmation message clearification (https://forum.x-cart.com/showthread.php?t=14170)

sstillwell@aerostich.com 05-24-2005 08:46 AM

Register Confirmation message clearification
 
Ok, I had no idea what to call this mod, but it's really simple. I have no idea if it will break your Xcart so try it and hopefully it works for you.

Basically, after a new user registers or a current user modifies their profile, for some weird reason Xcart shows the form again to the customer. This was confusing my customers as they didn't read the little Dialog message that reads "Your profile has been successfully updated."

So basically, upon successfully creation/modification of the profile I don't want the form showing again, just the nice dialog message.

skin1/customer/home_main.tpl
Change:
Code:

{elseif $main eq "register"}
{include file="customer/main/register.tpl"}


To:
Code:

{elseif $main eq "register"}
{* Added so that form is not shown after successful completion, it was confusing customers *}
{if not ($top_message.content ne "" and $top_message.type eq "")}
{include file="customer/main/register.tpl"}
{/if}


Now when they update their profile, it gives them a nice message and no form. When there is an error, it will still give them the form with the << arrows to show where the error is.

darrylb1231 05-24-2005 09:26 AM

Thanks sstillwell,

I just took a phone order yesterday and tried entering the data and go confused myself. Great mod!

CopperB 05-24-2005 05:18 PM

Slick little mod.
Thanks sstillwell
:D

2019 05-27-2005 06:43 AM

this was what made me crazy when i first started to build my site.
this is a "must" that x-cart has to fix.

thnx great work.

jerrycl 09-27-2005 07:46 PM

Thanks for that - excellent. What a forum!

Dongan 09-27-2005 08:44 PM

nice simple trick and works in 4.0.13.

quedigital 12-06-2005 06:10 PM

No Confirmation message
 
I don't get any confirmation message - just a blank page.

electronics4less 12-27-2005 09:10 AM

Same here..I get a blank..

any suggestions?

aop 12-27-2005 05:02 PM

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

sstillwell@aerostich.com 12-29-2005 06:56 AM

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.


All times are GMT -8. The time now is 12:05 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.