Hey,
I wanted to change all the products with "Taxable Goods" which was ID 2 and change it to ID 12 that is a custom.
So I went to the catalog_product_index_price and changed all the Tax_class_ID to 12 but some products didn't change.
There is any other place where the tax might be defined?
Thanks
Solved! Go to Solution.
Hi @rui_silva1
Tax_class_id are saved in catalog_product_entity_int table based on attribute_id.
You can get attribute_id for tax_class_id from following query.
SELECT * FROM `eav_attribute` WHERE `attribute_code`='tax_class_id'
For selct products
SELECT * FROM `catalog_product_entity_int` WHERE `attribute_id` in (SELECT attribute_id FROM `eav_attribute` WHERE `attribute_code`='tax_class_id' )
For Update
Update `catalog_product_entity_int` set `tax_class_id`=12 WHERE `attribute_id` in (SELECT attribute_id FROM `eav_attribute` WHERE `attribute_code`='tax_class_id' )
NOTE: Take the DB table backup first before update query or try once with single product.
I hope it will help you!
Hi @rui_silva1
Tax_class_id are saved in catalog_product_entity_int table based on attribute_id.
You can get attribute_id for tax_class_id from following query.
SELECT * FROM `eav_attribute` WHERE `attribute_code`='tax_class_id'
For selct products
SELECT * FROM `catalog_product_entity_int` WHERE `attribute_id` in (SELECT attribute_id FROM `eav_attribute` WHERE `attribute_code`='tax_class_id' )
For Update
Update `catalog_product_entity_int` set `tax_class_id`=12 WHERE `attribute_id` in (SELECT attribute_id FROM `eav_attribute` WHERE `attribute_code`='tax_class_id' )
NOTE: Take the DB table backup first before update query or try once with single product.
I hope it will help you!
Sorry for the late reply, it worked, changed all to ID12 but some of the products in the backoffice stayed in Taxable Goods for some reason, but they were few so they were changed there.
Thanks