user3564050
user3564050

Reputation: 138

Magento - update subtotal while runtime onepage checkout

a customer is in checkout. while the standard checkout progresses i want to renew the subtotal of the checkout session, the payment and the preview steps cause private rules for each customer group. I tried out to set the price via save shipping observer but it doesn't work (the subtotal in preview didn't change and the payment moduls are using the same price as before.. I understand.. the HTML was load before and the steps are only hidden)

Is there any way to refresh the subtotal and the onepagecheckout without loosing the current step ?

Thank u

Upvotes: 0

Views: 202

Answers (1)

Lyconal Best
Lyconal Best

Reputation: 112

On the step you are doing this on, find the save action and add:

$this->getOnepage()->getQuote()->collectTotals()->save();

To the code before the response.

Works a treat.

Upvotes: 1

Related Questions