0

I want to copy some attributes from order to invoice and creditmemo, but adjust them dependent on the discount_amount attribute of the target.

I wrote an observer for core_copy_fieldset_sales_convert_order_to_invoice and core_copy_fieldset_sales_convert_order_to_cm but at this point, the value is not set yet. I also could not find any corresponding fieldset configuration in Mage/Sales/etc/config.xml.

So my question is: Where does Magento set these values when it converts orders? And do I need to fall back to sales_invoice_save_before and sales_creditmemo_save_before events or is there a better way?

1

Discount Amount would come from Mage_Sales_Model_Order_Invoice_Total_Discountbut there are not many events around so the ones you mentioned might be the best avenue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.