Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Inclusion of cart into header removes cat tabs

Inclusion of cart into header removes cat tabs

Locked

Views: 1,237

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
22 Mar 2008, 3:46 PM
#1
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Inclusion of cart into header removes cat tabs

I'm having a conflict in my site between my shopping cart in my header and the flyout category tabs mod that I added to my site. Hoping someone can help.

Per a prior site design, I just added the following code into my tpl_header.php file to get the actual shopping cart contents to show in my header:

<div id="headerCart">
  <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 } } ?>
   </ul>
  </div>
  <br class="clearBoth" />
  <div>
  <?php 
   echo '<span style="text-align:right; float:right; font-size:12px; padding-top:8px; padding-bottom:8px;">' . sprintf(($_SESSION['cart']->count_contents() == 1 ? HEADER_SHOPPING_CART_CONTAINS : HEADER_SHOPPING_CART_CONTAINS_MULTIPLE), $_SESSION['cart']->count_contents()) . '</span>';
   if ($_SESSION['cart']->count_contents() != 0) {
  ?>
   <ul id="headerCartLower">
   <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>
   </ul>
  <?php }?>
  </div>
 </div>

This is situated in the file before the category tabs code to show the flyout tabs at the top of the site. The only thing I did was add this code, and added the headercart and headercartlower css to my stylesheet, but yet it is conflicting for some reason and neither the cart will show, or the flyout tabs.

Can someone help with why this is happening? Is there something within this code that would be interrupting the code for the flyout tabs mod? The main goal here is to have my shopping cart contents show in my header instead of as a sidebox.

22 Mar 2008, 3:50 PM
#2
kobra avatar

kobra

Black Belt

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

Re: Inclusion of cart into header removes cat tabs

Where is the site to see this

22 Mar 2008, 3:55 PM
#3
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Re: Inclusion of cart into header removes cat tabs

http://www.gourmetshoppe.net/index.php

I just added it back in. When I realized it wasnt working properly, I just removed the code that I had input and re-uploaded it, but yet my flyout tabs at the top are still gone! Whatever this code did, really screwed up that mod because now I cant get my tabs to redisplay even without the code in there. I didnt make any changes to any of the existing code in the tpl_header or stylesheet, the only thing I did was add code exactly where it was placed in a previous tpl_header file I had from an old site design.

22 Mar 2008, 4:07 PM
#4
kobra avatar

kobra

Black Belt

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

Re: Inclusion of cart into header removes cat tabs

Try this

   <div id="headerWrapper">
      <!--bof-navigation display-->
      <div id="navMainWrapper">
        <div id="navMainSearch">
          <?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?>
        </div>
        <div id="navMain">
          <ul>
            <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><span><?php echo HEADER_TITLE_CATALOG; ?></span></a></li>
            <?php if ($_SESSION['customer_id']) { ?>
            <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><span><?php echo HEADER_TITLE_LOGOFF; ?></span></a></li>
            <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><span><?php echo HEADER_TITLE_MY_ACCOUNT; ?></span></a></li>
            <?php
      } else {
        if (STORE_STATUS == '0') {
?>
            <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><span><?php echo HEADER_TITLE_LOGIN; ?></span></a></li>
            <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><span><?php echo HEADER_TITLE_MY_ACCOUNT; ?></span></a></li>
            <?php } } ?>
            <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><span><?php echo HEADER_TITLE_CART_CONTENTS; ?></span></a></li>
            <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><span class="last"><?php echo HEADER_TITLE_CHECKOUT; ?></span></a></li>
          </ul>
        </div>
      </div>
      <!--eof-navigation display-->
22 Mar 2008, 4:19 PM
#5
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Re: Inclusion of cart into header removes cat tabs

Unfortunately that didnt work either. This worked on my previous site and all I did was copy and paste, so I dont understand why the cart wont even show!

22 Mar 2008, 4:26 PM
#6
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Re: Inclusion of cart into header removes cat tabs

Update, I got the flyout tabs working again, but yet my cart still wont show in the header. Anyone have any ideas?

22 Mar 2008, 4:28 PM
#7
kobra avatar

kobra

Black Belt

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

Re: Inclusion of cart into header removes cat tabs

Unfortunately that didnt work either. This worked on my previous site and all I did was copy and paste, so I dont understand why the cart wont even show!
Did you replace the all the code between BOF and EOF...

This code works - it may not be exactly what you want but it does work

22 Mar 2008, 4:42 PM
#8
gourmets avatar

gourmets

New Zenner

Join Date:
Jan 2007
Posts:
61
Plugin Contributions:
0

Re: Inclusion of cart into header removes cat tabs

There must be some other problem then because it still wont show on my site. Would the placement be a problem? I have it right after the logo and banner group set 2 space, which is exactly where it was in a previous file I had.