View Single Post
  #1  
Old 12-21-2005, 04:33 PM
 
jsa jsa is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 197
 

Default Friendlier: "Welcome back, [firstname]" in welcome

Hi. One of my cart testers asked if the welcome back code could display his first name only.

I think it might be a privacy issue for him, but it makes sense, too, because it's just friendlier. First name/last name is very clinical.

Here's my welcome.tpl:
Code:
{* $Id: welcome.tpl,v 1.23.2.1 2005/04/23 08:32:48 max Exp $ *} {if ($active_modules.Greet_Visitor ne "") and ($smarty.cookies.GreetingCookie ne "") and $logout_user eq ''} <H3>{$lng.lbl_welcome_back}, {$smarty.cookies.GreetingCookie|replace:"\'":"'"} </H3> {/if} {$lng.txt_welcome} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} {include file="customer/main/featured.tpl" f_products=$f_products}

I think the code responsible for the name is: {$smarty.cookies.GreetingCookie|replace:"\'":"'"}

However, I have no idea how to change that to first name only. It looks like fancy regex stuff at the end there. Maybe it's not. Whatever it is, though, is way over my head.

Anybody know how to display the first name only?

Thanks!
__________________
Building: X-Cart GoldPlus 4.6.1
Old cart:
XC 4.0.17 FComp-RMA-AOM-OFF-Affil
BCSE: Referral Pts-Surveys-BatchUp-OrderEZ- Reviews-RSS
FT: Glossary-OptCopt-AdvSrch-Recently Viewed-Also Bought
CM: eZConversion
XP: SalesRecovery, MultCrncy
Reply With Quote