Totally Zenned
- Join Date:
- Jun 2009
- Posts:
- 618
- Plugin Contributions:
- 0
Shoppingcart/Freeship in Header support
Hi Glenn,
I had previously asked you about this in post 2:
Very cool mod! Great, absolutely great readme file with clear and precise instructions and info - and here is the bonus, its not a text file!
The only thing that I would like to customize about it is, I would like to format it into 2 columns. The first column being the # of items on the first row and the second row, the Total Price. On the second column on the first row is where I want to place the View Cart button.
Can I do that via css? How? I'm a bit of a novice when it comes to css, so if someone can provide some example code, awesome!
I took the code from post 4 and placed it in the file as you instruct. I changed the image name to that of mine. Now, however, it breaks the site, nothing under the header area, just white space!
Can you take a look at my code and see if you can spot my error:
<div id="cartCount">
<?php
$cart_count = $_SESSION['cart']->count_contents();
echo ($cart_count? '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '" title="' . CART_HEADER_TITLE . '">':'') . CART_HEADER_IN_CART_PRE . $cart_count . (($cart_count == 1)? CART_HEADER_IN_CART_SINGULAR: CART_HEADER_IN_CART_PLURAL) . ($cart_count? '</a>': '');
?>
</div>
<?php if ($cart_count) {
$_SESSION['cart']->get_products();
$basket_total = $_SESSION['cart']->show_total();
echo '<div id="cartTotal">' . CART_HEADER_TOTAL . $currencies->format($basket_total) . '</div>' ;
} ?>
<?php echo '<a id="cartButton" href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL') . '" title="' . CART_HEADER_TITLE . '"><img src="button_checkout.png" /></a>'); ?>