Getting The Amount Of Items in the Cart

Updated . Posted . Visible to the public.

To get the amount of line items (i.e. 10 of 1 product is 1):

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

To get the total number of items (i.e. 10 of 1 product is 10):

Mage::helper('checkout/cart')->getSummaryCount();

Mike Whitby
Last edit
Posted by Mike Whitby to Magento (2013-09-11 14:06)