How to set two tax class on single product in magento?

How to set two tax class on single product in magento?

October 18, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to set two tax class on single product in magento?

Setting Multiple Tax Rates for a Single Product in Magento

As an experienced developer, I understand that managing tax rates can be complex in e-commerce platforms like Magento. In your case, you want to apply two distinct tax classes to a single product for the state of Virginia.

Understanding Your Requirement

You have two tax requirements:

  1. A combined 5% rate consisting of:
    • 4.0% State Sales Tax
    • 1.0% State Sales Tax
  2. An additional 1% County Sales Tax

Your current setup uses a single tax rule, which is causing the rates to combine incorrectly in the front-end display.

Setting Up Multiple Tax Rules

To achieve your desired outcome, you need to create two separate tax rules:

Step 1: Create the First Tax Rate (5% Combined State Tax)

  • Navigate to Taxes > Tax Zones and Rates.
  • Click on Create New Tax Rate.
  • Enter a name like “Virginia State Sales Tax”.
  • Set the rate to 4.0%.
  • Save the tax rate.

Step 2: Create the Second Tax Rate (1% County Sales Tax)

  • Repeat the process as above, but give it a name like “Virginia County Sales Tax” and set the rate to 1%.

Associating Tax Rates with Products

Now that you have your tax rates created:

Step 3: Assign Tax Classes to Your Product

  • Open the product you want to apply these taxes to.
  • Go to the Tax Class field in the General Information tab.
  • You’ll find options like “None,” “Taxable Goods,” etc. Choose an appropriate tax class that supports multiple rates.

Step 4: Configure Tax Rules for Your Product

  • Navigate to Sales > Tax > Manage Tax Zones and Rates.
  • Click on your product’s taxonomy (e.g., “Virginia”).
  • In the Tax Rates grid, you should see both the “Virginia State Sales Tax” and “Virginia County Sales Tax” rates.
  • Ensure these are checked and associated with your product.

Displaying Multiple Taxes in the Cart

To display both tax rates in the cart:

Step 5: Enable the Shopping Cart Price Rules Module

  • Go to Stores > Configuration > Advanced.
  • Expand the Advanced section and click on Enable Modules by Code.
  • Look for Magento_QuoteRule. If it is disabled, enable it.

After following these steps, your product should now correctly display the two separate tax rates in the shopping cart. The system will calculate them individually based on the tax rules you have set up.

Conclusion

Setting multiple tax classes for a single product requires careful configuration of tax rates and rules within Magento’s admin panel. By creating distinct tax rates for each component (State Sales Tax and County Sales Tax) and associating them with your product through its taxonomy, you can ensure that the system accurately applies and displays these rates in the cart.

Remember to thoroughly test this setup in various scenarios to ensure it works as expected for your Virginia customers. If you need further assistance with Magento development or e-commerce solutions, feel free to reach out to our team at Laravel Company. We specialize in providing expert guidance and solutions tailored to your business needs.

Catalog Configuration Pricing CLI

Our network