1

I want to add "Total Items" row to display current amount of items in the cart.

Something like this: items

How can I display the $_cartQty in this summary section?

2 Answers 2

1

If you want to edit app\design\frontend\THEME\PACKAGE\template\checkout\cart\totals.phtml, you can use

<?php echo $this->getQuote()->getItemsSummaryQty(); ?>
0
2

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.