I need to add a value to Mage_Shipping_Model_Rate_Request depending on user selection.

To be more detailed: the frontend shows a checkbox depending on the selection (or not) of the checkbox my shipping model (extends Mage_Shipping_Model_Carrier_Tablerate) should recalculate different rates in the overloaded public function collectRates(Mage_Shipping_Model_Rate_Request $request).


  • Where can i inject the value of the user input from?
  • Which class should i overwrite/observe?

Store the user data as a quote/order custom option.

As an example:


where the customer can choose the Delivery Date.



You can add your value to the request in requestShippingRates method in Mage_Sales_Model_Quote_Address model. File path to the model is app/code/core/Mage/Sales/Model/Quote/Address.php. You should override this model and in the requestShippingRates method add something like this:


To override use this answer on magento stackexchange.

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.