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

Show firstname not login on auth box when user logged in

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 02-01-2005, 05:55 PM
  rubyaryat's Avatar 
rubyaryat rubyaryat is offline
 

eXpert
  
Join Date: Feb 2003
Location: Canada
Posts: 289
 

Default Show firstname not login on auth box when user logged in

It may be elsewhere in the forum, but someone just asked me for this one, so I'd thought I'd share how to have the auth box show the firstname instead of the login when the user is logged in.

1)
include/check_useraccount.php
add the following line to the list of smarty assignments:

$smarty->assign("login_firstname",$user_account["firstname"]);

2)
/authbox.tpl

line 7:
{$lng.txt_logged_in}{$login_firstname}!


That's it!
Rubyaryat
__________________
Rubymods.com - Your X-Cart services partner for over 9 years.
Modules offered: FedEx labels, Live currency rates, GeoIP, Order Audit, Multiple e-goods.
X-Cart Store Hosting, project management and affiliates program available.
4.2.3 gold [Unix]
Reply With Quote
  #2  
Old 02-16-2005, 06:40 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

Thanks thats what i was looking for, could you please help me how to display first name and last name as well.

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
  #3  
Old 02-17-2005, 01:14 AM
 
andreas04031 andreas04031 is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: Dallas, TX
Posts: 64
 

Default

Here it is, for 4.0.11

authbox.tpl

Code:
{$login_firstname}{$login_lastname}{$lng.txt_logged_in}
you can format this as you want, you might put a
after the {$login_lastname} to get the text "is logged in" into the next line...

in check_useraccount.php

add line

Code:
$smarty->assign("login_lastname",$user_account["lastname"]);
below the line for the first name
Code:
$smarty->assign("login_firstname",$user_account["firstname"]);

Cheers, Andy
__________________
X-Cart version 3.5.9 (online)
X-Cart Version 4.0.19 (online)
X-Cart Version 4.1.3 (in dev)
PHP 4.4.4
MySQL 4.1.21
Reply With Quote
  #4  
Old 02-17-2005, 01:36 AM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

andreas04031,

Thanks for help thanks thanks 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
  #5  
Old 03-08-2005, 03:06 PM
 
ivoiremall ivoiremall is offline
 

Newbie
  
Join Date: May 2004
Posts: 1
 

Default

Quote:
Originally Posted by andreas04031
Here it is, for 4.0.11

authbox.tpl

Code:
{$login_firstname}{$login_lastname}{$lng.txt_logged_in}
you can format this as you want, you might put a
after the {$login_lastname} to get the text "is logged in" into the next line...

in check_useraccount.php

add line

Code:
$smarty->assign("login_lastname",$user_account["lastname"]);


below the line for the first name
Code:
$smarty->assign("login_firstname",$user_account["firstname"]);

Cheers, Andy
__________________
Marina Doffou
Reply With Quote
  #6  
Old 06-01-2006, 11:11 AM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default

Works in 4.0.18, another great small addon!
Thank you

Any idea how to add the username to the Checkout section as well, I am using Jons Ezcheckout....
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:50 AM.

   

 
X-Cart forums © 2001-2020