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

有什么办法直接得到小计?

最佳答案

根据this site:

关于Magento Checkout : Get Subtotal Value without iterating,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2245436/

10-09 21:39