1

The vat of my country changes early 2018, I would like to create a script that updates the products with the new vat that I will create in the back office of magento.

How can I do ?

Thank you for your help

4
  • What needs to change in the products? Change in tax will apply across all the products that have tax set, unless you need to change whether some products have tax applied this should just be a change in admin for tax. – harri Dec 21 '17 at 9:53
  • I can not change the vat directly from my admin magento, because I have to keep track of the orders for the year 2017. If I change the vat direcely like that, it means that my new vat will also apply to invoices 2017. I therefore want to create a new VAT and via a php script setter all products with this new VAT on January 2, 2018 – devmagento Dec 21 '17 at 9:57
  • than you have to simple change (like harri say) the VAT at midnight in the admin ;) . Other way is to build a php sript triggerd by a cron with a update query to the database. If I would do do this I rather programm my alarm clock – Marcel Dec 21 '17 at 10:35
  • I just tested your solution on my test envrionnment, it works perfectly, the vat changes well on the new order and the old vat is always applied on my old orders. Thank you Harri and you too Marcel :) – devmagento Dec 21 '17 at 10:45

Your Answer

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

Browse other questions tagged or ask your own question.