<?php
foreach($this->getTotals() as $total)
{
if ($total->getCode() == 'subtotal')
{
$subtotal = $total->getValue();
break;
}
}
echo $subtotal;
?>
Any way to get subtotal directly ?
According to this site:
You can get the subtotal with:
$totals = Mage::getSingleton('checkout/cart')->getQuote()->getTotals(); $subtotal = $totals["subtotal"]->getValue();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With