X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   add site name to welcome (https://forum.x-cart.com/showthread.php?t=27718)

maniac 01-01-2007 10:07 AM

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.

carpeperdiem 01-01-2007 10:28 AM

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

carpeperdiem 01-01-2007 10:30 AM

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.

maniac 01-02-2007 05:40 PM

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...


All times are GMT -8. The time now is 02:20 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.