我需要將自定義屬性添加到商店中的選定產品。爲此,我使用Model_Price_Observer。我正在使用Magento 1.7。 到目前爲止,我可以添加自定義屬性,但計算出的價格是錯誤的 - 稅收缺失。Magento quote_item和稅收
我的代碼是(部分):
$quote_item->getProduct()->setIsSuperMode(true);
$quote_item->setOriginalCustomPrice($customprice);
$quote_item->setCustomPrice($customprice);
$quote_item->setTaxAmount($taxAmount);
$quote_item->setBaseTaxAmount($taxAmount);
任何想法,我究竟做錯了什麼?
我使用正確的觸發器嗎?
你在觀察哪個事件?你想達到什麼目的? – Ventus 2013-04-09 06:38:42
_sales_quote_add_item_ - 一些產品有自定義選項,確定其價格,然後添加到購物車我需要得到適當的價格。它的工作,但稅收缺失;) – arekstasiewicz 2013-04-09 09:22:46
你找到一個解決方案? – Wienczny 2014-12-18 17:49:59