Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Moving Index Greeting

Moving Index Greeting

Locked

Views: 1,536

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
10 Jun 2007, 2:03 AM
#1
turtledove avatar

turtledove

Zen Follower

Join Date:
May 2006
Posts:
182
Plugin Contributions:
0

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!

10 Jun 2007, 2:22 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

10 Jun 2007, 3:23 AM
#3
turtledove avatar

turtledove

Zen Follower

Join Date:
May 2006
Posts:
182
Plugin Contributions:
0

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]<!--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

10 Jun 2007, 10:43 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Moving Index Greeting

Where you added

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:

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

10 Jun 2007, 6:09 PM
#5
turtledove avatar

turtledove

Zen Follower

Join Date:
May 2006
Posts:
182
Plugin Contributions:
0

Re: Moving Index Greeting

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

:blink:

10 Jun 2007, 7:07 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

<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

11 Jul 2007, 6:58 PM
#7
megs avatar

megs

New Zenner

Join Date:
Jun 2007
Posts:
8
Plugin Contributions:
0

Re: Moving Index Greeting

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

12 Jul 2007, 2:07 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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