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

How do I show Customer's name instead of login??

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 01-30-2005, 12:37 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default Re: Hi

Quote:
Originally Posted by eaglemobiles
Then use {$name.firstname} and {$name.lastname}

where shall use this code, Thanks for help

Wherever you want to show a customer's first and/or last name.
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #12  
Old 01-30-2005, 03:15 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default Hi

I want to show it on top of login manu
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #13  
Old 01-31-2005, 01:05 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default Re: Hi

Quote:
Originally Posted by eaglemobiles
I want to show it on top of login manu

Open up authbox.tpl and add the following wherever you would like it positioned.
Code:
{if $active_modules.Greet_Visitor ne '' and $login}{$name.firstname} {$name.lastname}{/if}
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #14  
Old 01-31-2005, 05:04 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

Thanks for help, but I tried but it doesnt work. I posted my code below please have look what actually wrong. I want to display customer first and last name on top of login manu.

Thanks

{* $Id: auth.tpl,v 1.39.2.1 2005/01/11 14:30:09 mclap Exp $ *}
{capture name=menu}
<TABLE border="0" cellpadding="0" cellspacing="0" 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>
{assign var="slogin_url_add" value=""}
{if $usertype eq "C"}
{assign var="slogin_url" value=$catalogs_secure.customer}
{if $catalogs_secure.customer ne $catalogs.customer}
{assign var="slogin_url_add" value="?`$XCARTSESSNAME`=`$XCARTSESSID`"}
{/if}
{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 class="VertMenuItems">
<FONT class="VertMenuItems">{$lng.lbl_username}</FONT>

<INPUT type="text" name="username" size="16" value="{#default_login#}">

<FONT class="VertMenuItems">{$lng.lbl_password}</FONT>

<INPUT type="password" name="password" size="16" value="{#default_password#}">
{if $js_enabled}
{include file="buttons/login_menu.tpl"}
{else}
{include file="buttons/login_menu.tpl"}
{/if}


<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 height="24" class="VertMenuItems">
</TD>
</TR>
{/if} {* use_secure_login_page *}
{if $usertype eq "C" or ($usertype eq "B" and $config.XAffiliate.partner_register eq "Y")}
<TR>
<TD height="16" nowrap class="VertMenuItems">
{$lng.lbl_register} l
{/if}
{if $login eq ""}
{$lng.lbl_recover_password}
</TD>
</TR>
{/if}

{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 $usertype eq "C"}
<TR>
<TD class="VertMenuItems" align="right">


{if $js_enabled}
{$lng.txt_javascript_disabled}
{else}
{$lng.txt_javascript_enabled}
{/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 }



and

{* $Id: authbox.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *}
{capture name=menu}
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<FORM action="{$xcart_web_dir}/include/login.php" method="post" name="loginform">
<TR>
<TD></TD>
<TD class="VertMenuItems" valign="top">
{$login}

{$lng.txt_logged_in}



{if $js_enabled}
{include file="buttons/logout_menu.tpl"}
{else}
{include file="buttons/logout_menu.tpl"}
{/if}


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


{if $js_enabled}
{$lng.txt_javascript_disabled}
{else}
{$lng.txt_javascript_enabled}
{/if}
</TD>
</TR>
{/if}
<INPUT type="hidden" name="mode" value="logout">
<INPUT type="hidden" name="redirect" value="{$redirect}">
</FORM>
</TABLE>
{/capture}
{ include file="menu.tpl" dingbats="dingbats_authentification.gif" menu_title=$lng.lbl_authentication menu_content=$smarty.capture.menu }
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #15  
Old 01-31-2005, 05:32 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Did you add Jon's code into auth.php?
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #16  
Old 01-31-2005, 05:46 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default hi

Sorry but i am new so I dont know where shall i put which code. will be grateful for help

Thanks
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #17  
Old 01-31-2005, 05:49 PM
 
NuAlpha NuAlpha is offline
 

X-Adept
  
Join Date: Aug 2003
Location: US
Posts: 598
 

Default

Just insert the code posted earlier by Jon somewhere near the bottom of auth.php for the customer area.
__________________
X-Cart Pro 4.5.5 Platinum
X-Payments 1.0.6
PHP 5.3.14
MySQL 5.1.68
Apache 2.2.23
Reply With Quote
  #18  
Old 07-18-2005, 08:24 PM
 
rcg rcg is offline
 

Member
  
Join Date: Mar 2005
Posts: 18
 

Default

I know this thread is old but I saw this and wanted to do the mod.

It works for me but only in Admin area - the customer area is blank where the name should appear.

As presented I inserted the code in auth.php and inserted

Code:
{if $active_modules.Greet_Visitor ne '' and $login}{$name.firstname} {$name.lastname}{/if}

in authbox.tpl
__________________
X-Cart GOLD 4.0.17
Affiliate
RMA
AOM
Configurator
---
PHP 4.4.2
MYSQL 4.1.21
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:19 PM.

   

 
X-Cart forums © 2001-2020