Here is what I have so far:::>
<?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 } } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
You have <?php echo $_SESSION['cart']->count_contents(); ?> <?php echo $_SESSION['cart']->count_contents() == "1" ? "item " : "items " ; ?> in your <a href="shopping_cart.html" target="_top">basket</a>
<?php }?>
<?php
if (SHOW_TOTALS_IN_CART == '0') {
echo TEXT_TOTAL_ITEMS . ' ' . $_SESSION['cart']->count_contents() . ' ' . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
}
?>
<?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>
I just added this part of it from BIGboy:
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
You have <?php echo $_SESSION['cart']->count_contents(); ?> <?php echo $_SESSION['cart']->count_contents() == "1" ? "item " : "items " ; ?> in your <a href="shopping_cart.html" target="_top">basket</a>
<?php }?>
It doesn't seem to work unless I delete:::>
if (SHOW_TOTALS_IN_CART == '0') {
echo TEXT_TOTAL_ITEMS . ' ' . $_SESSION['cart']->count_contents() . ' ' . TEXT_TOTAL_AMOUNT . $currencies->format($_SESSION['cart']->show_total());
}
?>
Then I get what I want- nothing on the home page if cart is empty. EXCEPT I tested it and if not logged in or logged in and add something to cart and then select home. BAM- gone --cart is emptied all together in both options. Also when logged in the logg off options are gone also-
can anyone help fix my code. that tulips site has it perfectly.
No Basket info until something is added to the cart- then its there until you nav away from page or empty cart.