Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    328
    Plugin Contributions
    0

    help question 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:
    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:
    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

  2. #2
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Welcome Guest! Would you like to log yourself in?

    Use the override system. Start by reading https://www.zen-cart.com/tutorials/i...hp?article=128.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  3. #3
    Join Date
    Jun 2008
    Posts
    328
    Plugin Contributions
    0

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

  4. #4
    Join Date
    Jun 2008
    Posts
    328
    Plugin Contributions
    0

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

 

 

Similar Threads

  1. Welcome Guest! Would you like to log yourself in?
    By warrenkg in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 7 Sep 2012, 06:35 PM
  2. Replies: 2
    Last Post: 25 Apr 2011, 08:46 AM
  3. Remove Welcome: Guest! Would you like to log yourself in?
    By Elysea in forum General Questions
    Replies: 2
    Last Post: 17 Jan 2011, 10:46 PM
  4. Moving this: Welcome Guest! Would you like to log yourself in?
    By kitcorsa in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 12 Mar 2010, 11:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR