Fixed Product Tax in Magento 2 can help the store owners to sell products to different countries and different states depending on the tax regulations. This tax is added in a bit of a peculiar way which may not be as obvious from the first glance as it seems. In this post we will cover everything you need to know about fixed product tax and how to import it to your Magento 2 store.
How to Add and Import Magento 2 Fixed Product Tax post continues the line of guides for Magento 2 import/export guide list. The other articles in the line are:
So what is the difference between the default tax and fixed product tax (FPT)? Regular Magento 2 taxes are calculated based on the order price. FPT on the other hand provides customers with a fixed tax price, that it applied at the checkout depending on the shipping destination.
As you can see at the screenshot above, the FPT for the bag is $15. This additional tax can also be a subject to taxes, meaning that regular taxes can be also applied to it.
Now that we have understood when the tax is added and what is it, let’s dive into the backend to find where the FPT is set up and what options are available.
Step 1: enable fixed product tax
Fixed Product Tax can be enabled under Stores > Configuration screen. Next, using left menu you need to navigate to Sales > Taxto findFixed Product Taxes section.
By default every option of the FPT section is set to ‘Use system values’ so to get a manual control over every option you need to untick the checkboxes. The options available are self explanatory. The only options you need to pay close attention to are:
Enable FPT – this is the main reason we have navigated here, this option allows adding fixed product taxes to products;
Apply Tax to FPT – defines whether regular taxes set up at your Magento 2 store should also be applied to the FPT;
Include FPT in Subtotal – defines whether the FPT should be added to the order subtotal, meaning that it can be a subject to discounts.
Configure these options carefully per tax regulations applied in your country.
Step 2: create product attribute
Having the FPT enabled is not enough to have its options available for all products in your catalog. Enabling FPT allows the store owner to create a Fixed Product Tax product attribute which later be added to the selected products. Let’s see how the Fixed Product Tax attribute is created. To do this we navigated to Stores > Attributes > Product. Here we need to add new attribute.
The new attribute will act as any other Magento 2 product attribute – it will be added to the product details where you can edit it. For the fixed product tax attribute you need to specify:
Default Label – a label of the attribute that is also the attribute’s name;
Catalog Input Type for Store Owner – here you need to select ‘Fixed Product Tax’ value, which will not be available if you haven’t completed Step 1;
Attribute Code – the code will be used for internal Magento 2 purposes and for importing fixed product taxes;
Add to Column Options and Use in Filter Options – allows you to add this attribute to the filters at the store front which are available to customers.
When you are done setting up properties and advanced attribute properties you may want to manage attribute label for different store view you may have. Otherwise click ‘Save’ button and proceed to the next step.
Step 3: add it to the attribute set
As you know, in Magento 2 product attributes should be added to the attribute sets to be available for configuration in product details. The pattern is the following.
Create attribute > Add attribute to the attribute set > Assign the attribute set to products > Configure attribute
To add fixed product tax attribute to the attribute set navigate to Stores > Attributes > Attribute Set.
Here you need to select either existing attribute set or create a new one depending on your goal. For the guide purposes let’s add the Fixed Product Tax attribute to Default attribute set.
To add the created attribute to the attribute set find it in the Unassigned Attributes list and drag & drop it to the Groups list. When you are done click ‘Save’ button.
That’s it, now every product belonging to the Default attribute set will have a new attribute Fixed Product Tax. Let’s proceed to the product catalog to find a product of the Default set to configure it.
Step 4: configure fixed tax
In the product catalog find a product belonging to the product set you have added FPT attribute to and proceed to edit it.
The options are pretty simple, you select a country and a state where applicable and specify the flat tax value. Remember, the tax is not a percent value, meaning that specifying ‘10’ will charge customer $10.
That’s it. You have enabled and configured fixed product tax. Now, whenever customer purchases a product, the fixed tax value will be added to the order.
Importing Magento 2 fixed product tax
As any other product attribute, the fixed product taxes can be imported to your Magento 2 store. The attribute for fixed product tax is:
wee_tax_variations
The attribute can be added to any product import table you are using. If you do not have an import table, you can:
Export your product catalog using native Magento 2 import at System > Export;
At the Master Table, composed by FireBear team, you can find all product attributes with their description. At the Magento 2 Google Sheet you can also get sample import tables covering complex product data import, taxes, tier prices and country and state codes.
At the screenshot above you can see an example of the fixed product tax import table with values filled it. Let’s break down what values are expected. wee_tax_variations attribute responsible for FPT has the following value structure:
Note how sub-values are separated by comma and values are separated by DOUBLE pipe symbol.
For example, if you want to add fixed product tax of $20.5 for Alabama, United States and $5 for Barcelona, Spain your wee_tax_variations value will look like:
Note, that value for Alabama is ‘1’ and for Barcelona it is ‘139’. You can find all country codes and state codes in the separate sheet of Master Table.
When you are done with the table proceed to System > Import, or System > Import Jobs if you are using Improved Import and Export extension by FireBear studio.
You have just imported fixed product taxes to your Magento 2 store. Hope the article was helpful. If you still have any questions on fixed product taxes feel free to post comments below.