0

在 Magento 中,我根据http://magento.ikantam.com/qa/how-add-discount-total-magento创建了一个模块

但我无法显示折扣金额(请参阅此http://d.pr/i/LSqW

似乎在获取功能中,$address->addTotal()无法显示折扣金额。可能是什么问题?请帮忙。

function fetch(Mage_Sales_Model_Quote_Address $address) {
//code...
 ...
 ....
 $address->addTotal(array(
      'code' => 'Discount',
      'title' => 'Discount',
       'value' => $amt
        //'value' => '18' hardocded the amount, still not working
 ));

 //code...
 .....
 return $address;
}
4

1 回答 1

0

所以工作代码是

function fetch(Mage_Sales_Model_Quote_Address $address) {
    //code...
     ...
     ....
     $address->addTotal(array(
          'code' => 'discount',
          'title' => 'discount',
           'value' => $amt
            //'value' => '18' hardocded the amount, still not working
     ));

     //code...
     .....
     return $address;
    }
于 2013-10-16T14:40:35.313 回答