
Originally Posted by
shopyoungway
ok i have a question and i hope this is right. I want to take out the 3 linked images in the header and in it place put shopping cart in header this is the code i have to work with...
<?php if ($_SESSION['cart']->count_contents() > 0) {
$products = $_SESSION['cart']->get_products();
echo '<p><a href="/index.php?main_page=shopping_cart">' . $_SESSION['cart']->count_contents().' Item(s) - Total: £';
echo $currencies->format($_SESSION['cart']->show_total());
}
if ($_SESSION['cart']->count_contents() == 0) {
$products = $_SESSION['cart']->get_products();
echo '<p><a href="/index.php?main_page=shopping_cart"> Item(s) £0.00';
}
?></a></p>
But i have tried twice and it seems to break up in IE. Can someone help me
Thanks
Try this instead:
Code:
<li><?php if ($_SESSION['cart']->count_contents() > 0) {
$products = $_SESSION['cart']->get_products();
echo '<a href="/index.php?main_page=shopping_cart">' . $_SESSION['cart']->count_contents().' Item(s) - Total: £';
echo $currencies->format($_SESSION['cart']->show_total());
}
if ($_SESSION['cart']->count_contents() == 0) {
$products = $_SESSION['cart']->get_products();
echo '<a href="/index.php?main_page=shopping_cart"> Item(s) £0.00';
}
?></a></li>