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

Welcome FirstName instead of UserName

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-16-2008, 12:04 AM
 
Troy Troy is offline
 

Member
  
Join Date: Apr 2008
Location: Santa Barbara CA
Posts: 13
 

Default Welcome FirstName instead of UserName

I want to welcome people by their first name, not their login name.

Here is current code from authobox.tpl:

<td class="VertMenuItems" valign="top">
<b>Welcome {$login}!</td>

This displays "Welcome UserName!".

However, simply replacing {$login} with {$firstname} or {$userinfo.firstname} doesn't bring me the first name; it just shows "Welcome !".

I tried cloning what I found in
1) Fast_Lane_Checkout/customer_details_html.tpl, where it plugs the first name into an edit field by referencing {$userinfo.firstname}; and
2) Fast_Lane_Checkout/checkout_2_method.tpl, where it displays a number of customer profile fields as text on the page, (I tried {$userinfo.b_zipcode} just to see if another type of field might work) but alas ...
in both cases to no avail.

I have tried turning on the Greet Visitor module, but that didn't work either. We're using the above code in conjunction with a customized logout routine which evidently overrides the normal GreetVisitor approach. I have also searched the forums about ten ways looking for an answer. (I was optimistic when I saw the GreetVisitor solution offered to someone.)

Seems like this should be pretty simple, so I'm probably overlooking an obvious thing.

Thank you.
__________________
Troy
X-Cart 4.1.8 Win
CalligraphyByCarla
In Preview mode
Reply With Quote
  #2  
Old 04-16-2008, 01:00 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: Welcome FirstName instead of UserName

The welcoming is normally done in skin1/customer/main/welcome.tpl
Have a look at this file to see the code used to welcome by name.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 04-16-2008, 11:10 AM
 
Troy Troy is offline
 

Member
  
Join Date: Apr 2008
Location: Santa Barbara CA
Posts: 13
 

Default Re: Welcome FirstName instead of UserName

Thanks, Paul. Unfortunately, that routine supplies "First Last" as it's found in the cookies file, not "FirstNameOnly" as it's found in the user profile.

Any other ideas out there?
Thanks.
__________________
Troy
X-Cart 4.1.8 Win
CalligraphyByCarla
In Preview mode
Reply With Quote
  #4  
Old 05-10-2008, 11:48 PM
 
Troy Troy is offline
 

Member
  
Join Date: Apr 2008
Location: Santa Barbara CA
Posts: 13
 

Default Re: Welcome FirstName instead of UserName

I found the answer to this in http://forum.x-cart.com/showthread.php?t=26065. (Had originally listed an incorrect link. Sorry, folks. And thanks for pitching in on that, PhilJ.)
__________________
Troy
X-Cart 4.1.8 Win
CalligraphyByCarla
In Preview mode
Reply With Quote
  #5  
Old 05-14-2008, 10:03 AM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Welcome FirstName instead of UserName

No link to the thread and the thread # does not exist
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
Reply With Quote
  #6  
Old 05-14-2008, 10:12 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Welcome FirstName instead of UserName

http://forum.x-cart.com/showthread.php?t=26065
__________________
xcartmods.co.uk
Reply With Quote
  #7  
Old 05-14-2008, 11:05 AM
 
Thedae2k Thedae2k is offline
 

eXpert
  
Join Date: Jan 2004
Posts: 288
 

Default Re: Welcome FirstName instead of UserName

Fixed it already...I used {$userinfo.firstname} {$userinfo.lastname} instead of {$login)
__________________
X-Cart Pro 4.1.9
PHP5.2.5
MySQL 5.0.54
IIS/Apache/NGINX Webservers
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 07:04 PM.

   

 
X-Cart forums © 2001-2020