0

I modified the products price in my custom module. How can I store correctly the product price with tax in the order? I need to store the net amount and tax amount separately for each product in the order. It is necessary create a tax class for do this ? In which event it is the better to do this ?

1 Answer 1

0

usually the event it's sales_order_place_before.

But you must understand that the product added to the cart becomes quoteItem and when ordering it becomes orderItem. Do you want to change the orderItem price when placing the right place order?

If so, you need to change the orderItem's BasePriceWithTax that you find using the event I wrote to you above by doing $order->getBasePriceWithTax()

Cheers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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