How to set the usual total amount before placing an order in magento?

I added an observer to the event "sales_order_place_before" and I want to adjust the total amount before processing the payment. but I tried a lot to change the price of quotes, but it does not work.

Does anyone have any ideas?

+4
source share
2 answers

You need to add a new collector after the total total (Mage_Sales_Model_Quote_Address_Total_Grand). He must change the amount set by the great collector.

MageConf . , -, . , .

, . (. config.xml module etc) <before>subtotal</before> node, <after>grand_total</after>) () , :

$address->setGrandTotal($someValue);
$address->setBaseGrandTotal($someBaseValue);

, , . , . ( fetch()) , .

:)

+14

Mage_Sales_Model_Quote_Address_Total_Abstract Mage_Sales_Model_Order_Invoice_Total_Abstract Mage_Sales_Model_Order_Creditmemo_Total_Abstract

, .

0

All Articles