
Originally Posted by
[email protected]
I'm looking to move my currencies and shopping basket out of their sideboxes and into the Header, but I've searched and searched but can't find out how to do the 'includes' coding.
Here's a snippet of code that I have used recently on a site to place the shopping cart in the header
PHP Code:
<ul id="cart">
<?php
// replace by image
echo '<li><a class="imgButton" href="' . zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . HEADER_TITLE_CART_CONTENTS . '</a></li>' . "\n";
$num_items = $_SESSION['cart']->count_contents();
echo '<li>' . $num_items . ($num_items != 1 ? HEADER_CART_ITEMS : HEADER_CART_ITEM) . '</li>' . "\n";
$header_cart = $currencies->format($_SESSION['cart']->show_total());
echo '<li>' . $header_cart . '</li>' . "\n";
if ($num_items > 0) {
echo '<li class="button"><a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . HEADER_TITLE_CHECKOUT . '</a></li>';
}
?>
</ul>
You would need to style the items to have them appear as you wish. In the above example I used a background image for the shopping cart and styled the checkout link to look like a button.
To put language links in the header there is an add-in module available.