Magento 1.7 – Display Sub Total Discounted Price and Original Price

magento-1.7priceshopping-carttotals

am using this code to get Sub Total (Special Price)

$price=Mage::helper('checkout/cart')->getQuote()->getSubtotal();

How can i get the Original Price and Special Price

Best Answer

You can find the Price and special price via below code.

$cart = Mage::getModel('checkout/cart')->getQuote();
foreach ($cart->getAllItems() as $item) {
    $productName = $item->getProduct()->getName();
    $productPrice = $item->getProduct()->getPrice();
    $productSpecialPrice = $item->getProduct()->getSpecialPrice();
}

in $cart you got all collection of cart item and if you want to get product id,name you can can get from using foreach loop

Related Topic