Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    331
    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,159
    Plugin Contributions
    0

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

    Use the override system. Start by reading http://tutorials.zen-cart.com/index.php?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
    331
    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
    331
    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. Guest book help?
    By windrising in forum General Questions
    Replies: 3
    Last Post: 24 Nov 2010, 02:05 AM
  2. Welcome Guest! Would you like to
    By Goofster in forum General Questions
    Replies: 1
    Last Post: 8 Jul 2008, 11:45 AM
  3. Welcome Guest Message
    By hamburgler100 in forum Basic Configuration
    Replies: 0
    Last Post: 14 Nov 2007, 04:31 AM

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
  •