i am developing a shipping extension that provide various options(insurance, exact hour of delivery, etc) to the customer at the checkout page. The flow is the following:

  1. The customer chooses an address.The received prices of the rates does not include the extra fee for the available options.
  2. At the shipping method section ot the checkout page, the customer can choose some option, and when she clicks the button to proceed to the payment methods section, the recalculation of the shipping rates must be triggered again.

My goal is to trigger the recollecting of shipping rates in Mage_Checkout_OnepageController::saveShippingMethod().

How can i achive this? I've tried the steps in the thread(https://stackoverflow.com/questions/5671787/unset-shipping-and-recalculate-totals-in-magento), but without any luck.

Thanks in advance!

1 Answer 1


I think you can recollect the shipping rates using:


But I'm not 100% sure.

  • 1
    This piece of code did the trick : $shipping = $this->getOnepage()->getQuote()->getShippingAddress();$this->getOnepage()->getQuote()->setTotalsCollectedFlag(false); $this->getOnepage()->getQuote()->collectTotals(); $this->getOnepage()->getQuote()->save().Thank you, Marius! Commented Jul 23, 2013 at 11:22

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.