Magento Checkout : Get Subtotal Value without iterating

Posted by MotionGrafika on Stack Overflow See other posts from Stack Overflow or by MotionGrafika
Published on 2010-02-11T15:23:35Z Indexed on 2010/05/12 21:34 UTC
Read the original article Hit count: 300

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

Any way to get subtotal directly ?

© Stack Overflow or respective owner

Related posts about magento