I want to add "Total Items" row to display current amount of items in the cart.
How can I display the $_cartQty
in this summary section?
If you want to edit app\design\frontend\THEME\PACKAGE\template\checkout\cart\totals.phtml
, you can use
<?php echo $this->getQuote()->getItemsSummaryQty(); ?>
This might help you:
$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();
foreach ($items as $item) {
echo 'Product Quantity: '.$item->getQty();
}
OR
echo Mage::helper('checkout/cart')->getCart()->getItemsCount();
OR
$count = Mage::helper('checkout/cart')->getSummaryCount(); //get total items in cart