Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Moving SHOW_CUSTOMER_GREETING to tpl_header.php

Moving SHOW_CUSTOMER_GREETING to tpl_header.php

Locked

Views: 1,033

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
3 Nov 2008, 3:24 PM
#1
dunk avatar

dunk

Zen Follower

Join Date:
Dec 2007
Location:
London
Posts:
184
Plugin Contributions:
0

Moving SHOW_CUSTOMER_GREETING to tpl_header.php

Hi,

I've moved SHOW_CUSTOMER_GREETING (the "Welcome Guest, would you like to log yourself in" message) from tpl_index_default.php to the tpl_header.php file as I want this message displayed on every page until the user logs in.

The problem is, when I navigate away from the index page, either to log in/register or to browse through products or other pages the greeting message is replaced with "TEXT_GREETING_GUEST".

I understand why this is happening but I'm not sure how to remedy it, any ideas?

You can see exactly what I mean by heading over to http://www.tradersupplies.co.uk (it's in the early stages of customization so ignore all the ugly div borders!).

3 Nov 2008, 4:21 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Moving SHOW_CUSTOMER_GREETING to tpl_header.php

That's defined in includes/languages/english/index.php

You may have changed it accidentally, but you can enter whatever text you want in that definition.

3 Nov 2008, 7:29 PM
#3
dunk avatar

dunk

Zen Follower

Join Date:
Dec 2007
Location:
London
Posts:
184
Plugin Contributions:
0

Re: Moving SHOW_CUSTOMER_GREETING to tpl_header.php

stevesh:

That's defined in includes/languages/english/index.php

You may have changed it accidentally, but you can enter whatever text you want in that definition.

Sorry maybe I didn't explain very well. I know how to define the greeting text, that's not the problem.

My problem is this... I moved the php call for the customer greeting from tpl_index_default.php to tpl_header.php
Everything looks fine when you first visit the page, the greeting works as it should. The problem is when I navigate away from the index page, such as to the log in page, the customer greeting becomes "TEXT_GREETING_GUEST". It's like the script isn't calling for the customer greeting. My knowledge of php is pretty bad though so I'm not sure how to fix it! :oops:

Here's an example of what I mean

http://www.tradersupplies.co.uk/index.php?main_page=login

Now try going to http://www.tradersupplies.co.uk/ - this is how it should look.

3 Nov 2008, 8:03 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Moving SHOW_CUSTOMER_GREETING to tpl_header.php

It might be me who doesn't understand.

My thinking was that, for whatever reason, the greeting changes from SHOW_CUSTOMER_GREETING to TEXT_GREETING_GUEST when you navigate to certain pages.

If you define both as the same message, it'll read the same regardless.