Getting The Amount Of Items in the Cart

Posted Over 10 years ago. 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
Over 10 years ago
Posted by Mike Whitby to Magento (2013-09-11 14:06)