如何获得在magento条件下的小册子总数。
实际上我通过一个教程参考下面是链接。
http://excellencemagentoblog.com/magento-add-fee-discount-order-total
if(Excellence_Fee_Model_Fee::canApply($address)){
$TotalsData = $address->getTotals();
$exist_amount = $quote->getFeeAmount();
$fee = Excellence_Fee_Model_Fee::getFee();
$balance = $fee - $exist_amount;
//$balance = $fee;
//$this->_setAmount($balance);
//$this->_setBaseAmount($balance);
$address->setFeeAmount($balance);
$address->setBaseFeeAmount($balance);
$quote->setFeeAmount($balance);
$address->setGrandTotal($address->getGrandTotal() + $address->getFeeAmount());
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBaseFeeAmount());
}
答案 0 :(得分:1)
Vivek试试这个
$address->getSubtotal();
OR
totals = Mage::getSingleton('checkout/cart')->getQuote()->getTotals();
$subtotal = $totals["subtotal"]->getValue();