0

I want to update order grand total, total paid amount and total due amount after order succes.

For this I have added a event checkout_onepage_controller_success_action in my custom module and my observer function has code as below :

...
$order->setGrandTotal($some_amount);
$order->setBaseGrandTotal($some_amount);
$order->setTotalDue($some_amount);
$order->setBaseTotalDue($some_amount);
$order->setTotalpaid($some_amount);
$order->setBaseTotalpaid($some_amount);
$order->save();
...

This code update order grand total but total_paid and total_due amount not update by this.

Is it possible to update manually total_paid and total_due amount?

Is there another way to do that?

1 Answer 1

0

Below code working for me.

$order->setGrandTotal($some_amount);
$order->setBaseGrandTotal($some_amount);
$order->setTotalPaid($some_amount);
$order->setBaseTotalPaid($some_amount);
$order->save();

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.