Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Customers username in header

Customers username in header

Views: 1,098

Results 1 to 6 of 6
11 Mar 2011, 2:58 AM
#1
mickgibbons avatar

mickgibbons

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Customers username in header

Anyone have any ideas on this?. I've looked everywhere, and can't seem to find how i would do this.

I have tried using the code from the welcome message, but with no luck.

11 Mar 2011, 3:03 PM
#3
mickgibbons avatar

mickgibbons

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: Customers username in header

Thanks for the response. I saw this post. How would i output the variables??

11 Mar 2011, 6:09 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Customers username in header

copy this from /includes/templates/template_default/templates/tpl_index_default.php:

<?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
<?php } ?>

paste in /includes/templates/YOUR_TEMPLATE/common/tpl_header.php

then copy these from /includes/languages/english/index.php

define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?'); 
define('TEXT_GREETING_PERSONAL', 'Hello <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?');  

place it in or create new file /includes/languages/english/extra_definitions/header.php

Hope this helps!

18 Sep 2011, 1:48 PM
#5
yowchuan avatar

yowchuan

New Zenner

Join Date:
Sep 2011
Posts:
2
Plugin Contributions:
0

Re: Customers username in header

This definitely works for me! I was having the system showing me TEXT_GREETING_GUEST literally and almost drove me crazy figuring what to do next. Thank you very much!

8 Nov 2011, 7:48 PM
#6
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Customers username in header

Glad this worked for you!