Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Move the header sales text to the nav bar?

Move the header sales text to the nav bar?

Locked

Views: 1,397

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
16 Apr 2007, 3:22 AM
#1
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Move the header sales text to the nav bar?

Hello all!
I would like to be able to move the "sales text" from beside of the store logo up to the very top of my shop between "Home Log In" (and) the "search box". I see in tpl_header.php where it says ```html

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div> <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?> <div id="taglineWrapper"> <?php if (HEADER_SALES_TEXT != '') { ?> <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div> <?php } ?> <?php if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div> <?php } } ?> </div> <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?> </div> <div class="clearBoth" /></div> <!--eof-branding display--> ``` Can someone please point me in the right direction on how to accomplish this? Thank you!
16 Apr 2007, 8:26 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Move the header sales text to the nav bar?

If you put

 <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>

here

<!--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><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><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>


     <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>


<?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 id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->

it will show where you want it.
You might need to change the div to span - I'm not sure divs play well inside a ul list, and feeling too lazy to look it up right now : )

17 Apr 2007, 5:39 AM
#3
beasleybub avatar

beasleybub

Zen Follower

Join Date:
May 2006
Location:
Virginia U.S
Posts:
176
Plugin Contributions:
1

Re: Move the header sales text to the nav bar?

Glenn, Thanks for your quick reply. I know very little about php code but have been trying to learn. I did not realize it would be as simple as that. I was terrified that I would have to place the whole chunk of code in there somehow. I see what you are saying, by your example it is clear that I can basically place the code snipplet just about anywhere in the layout because it is calling for "echo". Thanks a million man!:smartalec:

17 Apr 2007, 5:58 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Move the header sales text to the nav bar?

Oh, and if you want to protect yourself you could put the whole chunk which first makes sure there is something to display before trying to display it:

<?php
              if (HEADER_SALES_TEXT != '') {
?>
      <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php
              }
?>