Snippets with the tag: item

All items from an order

Description

Get all items from an order.

Code

Mage::getModel('sales/order')->load($orderId)->getAllItems();

Total items added in cart

Description

Total items added in cart

Code

Mage::getModel('checkout/cart')->getQuote()->getItemsCount();
Mage::getSingleton('checkout/session')->getQuote()->getItemsCount();

Total quantity added in cart

Description

Total quantity added in cart

Code

Mage::getModel('checkout/cart')->getQuote()->getItemsQty();
Mage::getSingleton('checkout/session')->getQuote()->getItemsQty();