Magento get number of cart items

If you want to show total number of items present in your shopping cart basket then following code snippet is useful.

Using Mage helper you can retrieve that information by calling Helper file checkout/cart.

To show count use following code.

echo Mage::helper('checkout/cart')->getCart()->getItemsCount();

Leave a Reply

Your email address will not be published. Required fields are marked *