Tax per Store View for Magento 2 extension helps admin to set different taxes for a product per store view by changing scope of Tax class attribute into Store View. Therefore, this module is really a good solution for Magento 2 stores with multiple store views to charge local customers particular taxes.
2. How Does It Work?
To Enable/Disable the extension, please go to Store ⇒ Configuration ⇒ BSSCOMMERCE ⇒ Tax per Store View:
+ Set Yes to enable the module or set No to disable.
This extension solves tax issues for each store view by allowing admin to select different Tax Classes with specific tax rates to apply for each product in the store view level, instead of the website level as in default Magento.
Therefore, we will follow 4 steps:
- Set scope for Tax Class as Store View.
- Create Tax Rate (if necessary).
- Create tax rules to apply for each tax class along with wanted tax rates. Tax rate in each rule will be applied for products in each store view as you want.
- Edit Produc tax class of each product per store view.
2.1. Set Scope for Tax Class attribute
You go to Store ⇒ Attributes ⇒ Product and find Tax Class attribute.
*Note: You should search the attribute code of Tax Class or Attribute Label that you name when creating it. In this case, we search attribute code of Tax Class as tax_class_id and click to edit.
In Properties, you go to Advanced Attribute Properties and change Scope into Store View:
Then click Save Attribute.
2.2. Create Tax Rates
You go to Store ⇒ Taxes ⇒Tax Zones and Rates to add new tax rates with different rates which are suitable to your store views.
To help you understand better, we take two examples: we add 2 new tax rates as below:
- UK-*-Rate 1: This tax with a rate of 8% is used for the United Kingdom.
- FR-*-Rate 1: This tax with a rate of 10% is used for France.
2.3. Create Tax Rules
After creating suitable tax rates for each country (corresponding to each Store View), you need to add tax rules as you want.
You go to Store → Taxes → Tax Rules and click Add New Tax Rule.
In our examples, we will create 2 tax rules for 2 store views as below:
- Tax rule is applied for the English store view with a rate of 8%:
In Rule Information:
+ Name: fill in the name of your rule.
+ Tax Rate: select wanted tax rates for this rule. In this case, we select the rate as UK-*-Rate 1.
*Note: You can also add new tax rates here by clicking Add New Tax Rate button and there is a popup appeared for you to create. In addition, you can quickly import/export tax rates in Additional Settings:
Hence, there are 3 ways for you to add new tax rates.
In Additional Settings:
+ Customer Tax Class: Select wanted customer class to apply this rule. If you want to create new customer tax classes to apply, let's click Add New Class button.
+ Product Tax Class: select a product tax class or multiple product tax classes to set for products. If you want to create new ones, let's click Add New Tax Class button.
In this example, we create a new one called Taxable Goods - English and select it for this tax rule.
+ Priority: enter a number to indicate the priority of this tax, when more than one tax applies
+ Calculate Off Subtotal Only: tick this box if you want taxes to be based on the order subtotal.
+ Sort Order: enter a number to indicate the order of this tax rule when listed with others.
Then Save Rule.
- Tax rule is applied for the Frech store view with a rate of 10%
You follow the same above steps by selecting the tax rate as FR-*-Rate 1, creating a new Product Tax Class as Taxable Goods - French and choose it for this tax rule.
As a result, we have 2 tax rules used for the English store view and French store view. Each rule has its own rate and is used for particular product tax class.
2.4. Apply different product tax class
After you set up tax rules as you want, you need to edit the tax class of each product in each store view.
You go to Products ⇒ Catalog ⇒ Choose a product to edit ⇒ Price and switch store view to select product tax class with your wanted tax rates set up in the tax rules.
In this case, we choose Strive Shoulder Pack product with the original price in default store view as $32.
- In English store view: we select Tax Class as Taxable goods - English (this product tax class is included in the Tax rule "Tax for English store view" with the tax rate of 8%.
- In French store view: we select Tax Class as Taxable goods - French (this product tax class is included in Tax rule "Tax for French store view" with the tax rate of 10%.
Then you go to the frontend, add this product to cart and see the results:
- In English store view: the product is taxed at the rate of 8%. You add this product to cart and see how the tax is applied as below:
- In French store view: the product is taxed at the rate of 10%.
You should clear all products in the shopping cart, then switch to French store view and add Strive Shoulder Pack to cart: