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

add site name to welcome

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-01-2007, 10:07 AM
 
maniac maniac is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 97
 

Default add site name to welcome

I f a user is logged in it displays Welcome back User Name

I want to display welcome back to the "Store Name" user Name

I edited the phrase "lbl_welcome_back" to read:

Code:
Welcome back to the {{company}} {{name}}

bu that results in:

Code:
Welcome back to the {{company}} User Name

I know I have to edit:

Code:
{$lng.lbl_welcome_back|substitute:"name":$_name}

in home.tpl. but I can;t figure out the syntax to add an additional "substitute" to the clause. If anyone can guide me I would appreciate it.

Thanks in advance.
__________________
Gold 4.1.6
Reply With Quote
  #2  
Old 01-01-2007, 10:28 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: add site name to welcome

It's all right there in welcome.tpl

Code:
{if ($active_modules.Greet_Visitor ne "") and ($smarty.cookies.GreetingCookie ne "") and $logout_user eq ''} {assign var="_name" value=$smarty.cookies.GreetingCookie|replace:"\'":"'"} <h3>{$lng.lbl_welcome_back|substitute:"name":$_name} </h3> {elseif $lng.lbl_site_title} <h1>{$lng.lbl_welcome_to|substitute:"company":$lng.lbl_site_title}</h1> {else} <h1>{$lng.lbl_welcome_to|substitute:"company":$config.Company.company_name}</h1> {/if}

DON'T EDIT the language variables (yet) -- edit the source in welcome.tpl first --

It sounds like you want to edit the contents of the <h3> so that it reads:

Code:
<h3>{$lng.lbl_welcome_to|substitute:"company":$config.Company.company_name},&nbsp;{$lng.lbl_welcome_back|substitute:"name":$_name} </h3>

THEN -- edit the language variable, "lbl_welcome_back" instead of:

Welcome back, {{name}}

make it,

{{name}}

That's one way to do it.

Hope this helps.

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 01-01-2007, 10:30 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: add site name to welcome

Oops... sorry... I am not sure 4.0.x has welcome.tpl --

You have 4.1 -- so it's there -- check it out.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 01-02-2007, 05:40 PM
 
maniac maniac is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 97
 

Default Re: add site name to welcome

Thank you for the promt replay carpeperdiem

I'll giove it a shot...

I'm currently in template overload...
__________________
Gold 4.1.6
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 02:22 PM.

   

 
X-Cart forums © 2001-2020