I have a website in Magento 1.9 in which I have already configured a tax class for shipping rate from admin side. I want to change the tax rate for shipping if my cart contains some specific type of products and recalculate the total after the shipping tax class update. Is there any event for this or I need to override any core files?

  • Amesh can you elaborate more, for ex you want to change the shipping tax class which you set from backend i.e Admin -> Settings -> Configuration -> Sales -> Tax ? – Sunil Verma Feb 12 '18 at 10:22
  • Yes. Admin -> Settings -> Configuration -> Sales -> Tax -> Tax Classes -> Tax Class for Shipping. This is default. I want to change the shipping tax rate programatically during checkout.Ie, i have already added a tax class with 5% tax rate in Sales->Tax section. So if my cart contain some specific products then i want to update the shipping tax class to the above one programatically. – amesh Feb 12 '18 at 10:56

Instade of changeing core files, you can used magento observer event. Some of the event which you can used are as follow.

  1. checkout_cart_add_product_complete
  2. sales_quote_save_after

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.