1

In table rate shipping method handling charges are either fixed or percentage of shipping fee. but I want little modification in it. say x is shipping amount as per table rate. y is fixed surcharge and z is tax which is fixed.

So total shipping fee will be x * (1 + y%) * (1 + z%)

How to apply this formula to calculate total shipping charges?

1
  • try to use checkout_controller_onepage_save_shipping_method event to get 'x' (when table rate is applied) in its observer and do your calculation and then set the shipping charge. for example/ reference visit http://magento.stackexchange.com/questions/9210/how-to-deduct-shipping-costs-in-runtime-onepage-checkout-process/9297#9297
    – Shathish
    Commented Oct 21, 2013 at 10:20

1 Answer 1

1

You can extend Mage_Shipping_Model_Carrier_Abstract and at the same time implement implements Mage_Shipping_Model_Carrier_Interface class. See the below pseudo code.

class Mynamespace_Mymodule_Model_Carrier_Myshippingmethod
    extends Mage_Shipping_Model_Carrier_Abstract
    implements Mage_Shipping_Model_Carrier_Interface
{

public function collectRates(Mage_Shipping_Model_Rate_Request $request)
    {
      // Modify the shipping charge here.
}
}

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.