Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find the appropriate tax class ids in Magento database?

Tags:

magento

When I create a product in Magento using the API, I need to supply a field that's called 'tax_class_id'. I want to find out, which id I need to supply for a VAT percentage, like 20% in Austria or 19% in Germany.

Where can I find those ids inside the database?

Side note: I actually want to write an api extension that returns a list of percentage values along with their tax class. If someone has an easier idea how to do that, it'll be fine as well!

like image 448
Daniel Lang Avatar asked Dec 13 '22 02:12

Daniel Lang


2 Answers

If you have Firefox with Firebug, or similar inspect functionality as most nowadays browsers have, you can just inspect the tax class select field in any product and view the tax class id's in the html.

If you need to read them from the database, you can find them in the table called 'tax_class'.

like image 60
Lucas Moeskops Avatar answered May 12 '23 05:05

Lucas Moeskops


You can find it inside tax_class table.

SELECT * FROM tax_class
like image 38
Ricardo Martins Avatar answered May 12 '23 03:05

Ricardo Martins