Welcome Guest! Would you like to log yourself in?
I am not sure that I would like a first time visitor in my store to see the default:
Quote:
Welcome Guest! Would you like to log yourself in?
I would like to replace it with something else: if this is a logged in return customer, then use the default:
Quote:
Hello first1! Would you like to see our newest additions?
But if this is a visitor (or a return customer who is not logged in for some reason), then see something a little more descriptive than just "Welcome Guest". Something that will describe what this store is about.
I know that this message is in the file includes/languages/english/index.php:
PHP Code:
define('TEXT_MAIN','This is the main define statement for the page for english when no\
template defined file exists. It is located in: <strong>/includes/languages/english/i\
ndex.php</strong>');
// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would y\
ou like to <a href="%s">log yourself in</a>?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}
define('TEXT_GREETING_PERSONAL', 'Hello <span class="greetUser">%s</span>! Would you l\
ike to see our <a href="%s">newest additions</a>?');
define('TEXT_INFORMATION', 'Define your main Index page copy here.');
My question is: Is there a more correct way ("Zen Cart wise") to change that "Welcome Guest" text with more elaborate one? Or do I have to touch that PHP file (I don't really like mixing customizable text with code).
Thanks,
Daniel
Re: Welcome Guest! Would you like to log yourself in?
Re: Welcome Guest! Would you like to log yourself in?
Thanks. Your reply basically confirms that I thought: using the override system and touching that index.php file is the only way to go.
I now need to find a way to avoid "uglifying" that index.php by placing my customized intro text into a separate area. I guess I will have to learn some PHP programming for this.
Re: Welcome Guest! Would you like to log yourself in?
Update: separating the text from the code was easy - I just placed the entire text in a $VARIABLE.
However, the formatting seems "hard coded", so I grep-ed the included subdirectory and found out that the formatting is done at [FONT="Courier New"]includes/templates/template_default/templates/tpl_index_default.php[/FONT]:
PHP Code:
<h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
Would be nice to change that greeting to something other than H2 formatting.
I know that the intention was to use the DEFINE PAGES EDITOR for define_main_page.php, but the problem is that page is common to both logged-in and not-logged-in users. :(