bigdave
Well-Known Member
I'm working on a site which is primarily based on wordpress but uses magento to deal with its e-commerce.
When a product is selected, it links through to the magento shopping cart. We have a site wide "View Cart" link in the head of the site which links to the magento cart. What I'd like to do is to hide this link if the cart is empty.
Working soley in magento I could use this to hide the link:
but it doesn't work for wordpress... Is there a way to get the cart count from magento into wp to then use something along the lines of...
When a product is selected, it links through to the magento shopping cart. We have a site wide "View Cart" link in the head of the site which links to the magento cart. What I'd like to do is to hide this link if the cart is empty.
Working soley in magento I could use this to hide the link:
PHP:
<?php $_cartQty = $this->getSummaryCount() ?>
<?php if ($_cartQty >0): ?>
<a href="link">link to cart</a>
<?php endif ?>
but it doesn't work for wordpress... Is there a way to get the cart count from magento into wp to then use something along the lines of...
PHP:
<?php if (sizeof($cart) > 1)) : ?>
<a href="link">link to cart</a>
<?php endif ?>