Results 1 to 8 of 8
  1. #1
    Join Date
    May 2006
    Posts
    188
    Plugin Contributions
    0

    Default Moving Index Greeting

    I've recently installed the Alternative Header mod.

    Is there a way in which I can move the Index Greeting ["Welcome Guest! Would you like to sign in"] within this header?

    Thanks!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Moving Index Greeting

    Yes, you will have to find this in the /includes/languages/english/index.php and move the full function (to keep it configurable from the admin) to where you want it in your copy of includes/templates/your_template/common/tpl_header.php
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2006
    Posts
    188
    Plugin Contributions
    0

    Default Re: Moving Index Greeting

    Hi Kobra,

    I thought of doing this at first, but went against it because I would be putting something that was [defined] into a set of [PHP] codes. Nonetheless, I tried it because of your suggestion. I have no clue how to edit things into PHP, so this is what I saved in my tpl_header

    PHP Code:
    <!--bof-navigation display-->
    <div id="navMainWrapper">
    <div id="navMain">
        <ul class="back">
        <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
    <?php if ($_SESSION['customer_id']) { ?>
        <li><div id="LogOff"><a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a></li>
    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
        <li><div id="LogIn"><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
    <?php } } ?>


    Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in



    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a></li>
    <?php }?>
    </ul>
    </div>
    <div class="navMainSearch forward"><?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?></div>
    <br class="clearBoth" />
    </div>
    <!--eof-navigation display-->
    No clue if that was what you meant though. When I sign in on my account, I still get the 'Welcome, Guest' instead of the 'Welcome Chelle'.

    :confused

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Moving Index Greeting

    Where you added
    Code:
    Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in
    I meant for you to move the full function and not just some text...

    It would have been:
    Code:
    <?php
    
    // Showcase vs Store
    if (STORE_STATUS == '0') {
      define('TEXT_GREETING_GUEST', 'To create your profile, <span class="greetUser">Please</span> select <a href="%s">Login</a>::');
    } else {
      define('TEXT_GREETING_GUEST', 'Welcome, please view our services and contact us with your requirements.');
    }
    
    define('TEXT_GREETING_PERSONAL', 'Hello <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?');
                  if (HEADER_SALES_TEXT != '') {
    ?>
    BUT I tried this and it dosen't work so the function of the "TEXT_GREETING_GUEST" and where it is used and defined would have to be followed completely to change this.

    Sorry this was not easy...
    Zen-Venom Get Bitten

  5. #5
    Join Date
    May 2006
    Posts
    188
    Plugin Contributions
    0

    Default Re: Moving Index Greeting

    How would I alter the "TEXT_GREETING_GUEST" functions and such?


  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Moving Index Greeting

    You would have to follow the cart logic for this and search the files for this term.

    Might be easier to use the tagline entry if you are not currently using it and enter the href link and text there and then in the admin > config > layout settings >Customer Greeting - Show on Index Page > set to "0" to turn off the default one
    Code:
    <a href="http://www.your_domain.com/index.php?main_page=login">Welcome  Guest!  Would you like to log yourself in</a>
    The above will make the whole line a hot link - adjust it if your shop is in a folder
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jun 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Moving Index Greeting

    Thanks kobra - your last post answered a question I had about disabling that greeting!

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Moving Index Greeting

    Megs,
    Thanks kobra - your last post answered a question I had about disabling that greeting!
    This and many other common questions are all covered in the FAQ's
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. index.php displaying 'TEXT_GREETING_PERSONAL' instead of greeting
    By ms4104 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 May 2011, 03:11 AM
  2. Moving the Customer Greeting
    By yourstruly in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 Aug 2009, 10:33 PM
  3. Replies: 1
    Last Post: 29 Apr 2007, 07:25 PM
  4. Moving Customer greeting to main nav bar?
    By softget in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Feb 2007, 01:29 PM
  5. I tried moving the greeting and have errors
    By maxima in forum General Questions
    Replies: 1
    Last Post: 19 Oct 2006, 06:47 AM

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