I want to calculate shipping rates and shipping methods based on shipping origin. In Cart page shipping estimation and checkout page i want to calculate shipping charges based on different shipping origin locations.
I will have different shipping origins at cart page shipping estimation and checkout page after shipping address save.Now i want to pass dynamic shipping origins to calculate shipping charges.
any suggestions or ideas on where to start and how to get it.

I want same as Where is the code that calculates shipping from origin.
but how to handle getRateOriginRequest and Mage_Shipping_Model_Shipping::collectRates()

I Want to replace ship-from configuration fields dynamically in shipping estimation and checkout process

  • Do you have your set up for multiple shipping origins ?
    – Prateek
    Commented Jan 22, 2016 at 7:29
  • @Prateek Please check my updated question. Commented Jan 22, 2016 at 7:33
  • Event-observers and re-writes are 2 different approaches. Which one you want to use ?
    – Prateek
    Commented Jan 22, 2016 at 7:38
  • I want to overwrite Mage_Tax_Model_Calculation::getRateOriginRequest and Mage_Shipping_Model_Shipping::collectRates() Commented Jan 22, 2016 at 7:41
  • There are plenty of articles about that on web, this is one of them : inchoo.net/magento/…. Is there any other problem you are facing ?
    – Prateek
    Commented Jan 22, 2016 at 9:16

1 Answer 1


To modify any shipping rates information try to change on

Mage_Tax_Model_Calculation class and getRateOriginRequest method, 
Mage_Shipping_Model_Shipping` class and 'collectRates()

In my case i have configured only ups shipping method.

So here i need to change the code on

Mage_Usa_Model_Shipping_Carrier_Ups and collectRates method.

This class is executing after

Mage_Shipping_Model_Shipping class and collectRates()

Now i could change the ship-from information.

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.