I've built an e-commerce site and I'm using the plugin from GetShopped to manage the shopping cart. I've placed the shopping cart in the template with this it of code:
<?php echo nzshpcrt_shopping_basket(); ?>
However, I actually want this only to appear if there is something in shopping cart. In pseudo code, what I want looks like this:
<?php if (!shopping_cart_is_empty()): ?>
<?php echo nzshpcrt_shopping_basket(); ?>
<?php endif ?>
How can I achieve this?
yves vu answers:
Hi,
you should use code:
<?php
if (isset($_SESSION['wpsc_cart']) && !empty($_SESSION['wpsc_cart']))
{
echo nzshpcrt_shopping_basket();
}
?>
cheers.