v1.3.8a
This is what I have so far,
What I would like is to have the word "item(s)" be either "item" or "items" depending on the cart contents being 1 item or multiple items.
I need coding help to add "echo" and "if" commands to the tpl_header.php to call on the following new defines that I've added to .../custom/english.php
..CUSTOM/english.php
PHP Code:
// Shopping Cart Totals in Header display
// only for where one item in cart:
define('ONE_ITEM_IN_CART', 'item');
// only for where multiple items in cart:
define('MULTIPLE_ITEMS_IN_CART', 'items');
...templates/CUSTOM/common/tpl_header.php
PHP Code:
<!--bof Shopping Cart Totals in Header Add-on-->
<!--NOTE: this add-on was modified to correct an error in cart totals $$ (check forum post subsciptions for code details)-->
<!--"//"Comment or Uncomment to use-->
<span class="style1">
<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>">
My Cart: <?php echo ($_SESSION['cart']->count_contents()); ?> item(s)
</a>
<?php $header_cart = $currencies->format($_SESSION['cart']->show_total()); echo $header_cart;?>
</li>
</span>
<!--eof Shopping Cart Totals in Header Add-on-->
<!--"//" comment or uncomment to hide/use this original code-->
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<!--keep tag info commented out if php is commented out otherwise it will cause an invisible link to the index next to the LogIn link in nav
<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 }?>
I'm not a programmer but I kind of get the idea of what I need, just not sure how to execute the code.
Any help is greatly appreciated!
Bookmarks