I really hope someone can help me please.
I am using the Simple PayPal Shopping Cart in my website. I am building this on my local machine at the moment using the WAMP server.
I wanted to show a count in the header so that users will know when a product is added to the basket and found the following script after much searching.
If you want to display the shopping cart total in the sidebar or somewhere similar then add the following function to the "wp_shopping_cart.php":
foreach ($_SESSION['simpleCart'] as $item)
$total += $item['price'] * $item['quantity'];
$item_total_shipping += $item['shipping'] * $item['quantity'];
$grand_total = $total + $item_total_shipping;
Now you can simply call the "simple_cart_total" function and echo it out from your sidebar.php file:
It's the yellow bit I need to tweak somehow. Although this works fine it shows the total in basket as £0 and I would like it to show as £0.00 (for instance it shows £1.50 as £1.5 which doesn't look right).
I hope someone can help me please.