I want to add dynamic text into the header that will display:
x items - total £x
I added this with no success as it does not pick up the basket totals:
<?php if($cart->itemcount > 0) { ?>
<?php $i=0;
foreach($cart->get_contents() as $item) { ?>
<p><?php echo $item['qty'] ?> items - total <?php echo $currency ?> <?php echo number_format($cart->total,2) ?></p>
<?php $i ++;
} ?>
<?php } ?>
I wanted to make a seperate file for the widget, but the main checkout page and widget cart run off the same file shopping_cart.php. How can I make the code above work or make a customised version of the shopping_cart.php file that can be used in place of the existing widget?