tags:

views:

663

answers:

2
<?php
foreach($this->getTotals() as $total)
{
    if ($total->getCode() == 'subtotal')
    {
        $subtotal = $total->getValue();
        break;
    }
}
echo $subtotal;
?>

Any way to get subtotal directly ?

A: 

The following should work:

$subtotal = $this->getQuote()->getSubtotal();
Chris Norton
A: 

According to this site:

You can get the subtotal with:

$totals = Mage::getSingleton(‘checkout/cart’)->getQuote()->getTotals();
$subtotal = $totals["subtotal"]->getValue();
Josh