What event do I need to observe to see what shipping methods are available for a given quote


You can listen to the "sales_quote_save_after" event, then use the quote to get the shipping rates. The following code can be used to get the list of shipping rates.

|improve this answer|||||
  • thanks!, is there a way to add another code to be included in the quote – pzirkind Sep 17 '14 at 15:07

There are lot of event.But i cannot find any proper event.



checkout_cart_save_after and sales_quote_collect_totals_after better because it trigger always whenever you have done any changes.

but you get list of available shipping methods.then we need some code at observer

   $quoteShippingAddress = $quote->getShippingAddress();
        if (!is_null($quoteShippingAddress->getId())) {

        try {
            $groupedRates = $quoteShippingAddress->getGroupedAllShippingRates();

            $ratesResult = array();
            foreach ($groupedRates as $carrierCode => $rates ) {
                $carrierName = $carrierCode;
                if (!is_null(Mage::getStoreConfig('carriers/'.$carrierCode.'/title'))) {
                    $carrierName = Mage::getStoreConfig('carriers/'.$carrierCode.'/title');

                foreach ($rates as $rate) {

                    $ratesResult[] =  $rate;

        } catch (Mage_Core_Exception $e) {

Here $result give of shipping method

|improve this answer|||||
  • +1 for adding a few events plus code (accepted the other answer since it was simpler) – pzirkind Sep 17 '14 at 15:09
  • @Amit this event is not calling, Whenever I am changing the address data like postcode, country, region. – Himanshu Oct 22 '18 at 13:37
  • What event used for getting shipping methods before place an order? – zus Aug 16 '19 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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