Question

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!

Was it helpful?

Solution

I think you can recollect the shipping rates using:

Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->collectShippingRates()->save();

But I'm not 100% sure.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top