In this article by William Rice, we will see how to create Tax Rules in Magento. In the real world, the tax rate that you pay is based on three things: location, product type, and purchaser type. In Magento, we can create Tax Rules that determine the amount of tax that a customer pays, based upon the shipping address, product class, and customer class.
When you buy a product, you sometimes pay sales tax on that product. The sales tax that you pay is based on:
A Tax Rule is a combination of the tax rate, shipping address, product class, customer class, and amount of purchase.
A Tax Rule states that you pay this amount of tax if you are this class of purchaser, and you bought this class of product for this amount, and are shipping it to this place.
The components of a Tax Rule are shown in the following screenshot. This screen is found under Sales | Tax | Manage Tax Rules | Add New Tax Rule.
You will see the Name of the Tax Rule while working in the backend.
Customer Tax Class is a type of customer that is making a purchase. Before creating a Tax Rule, you will need to have at least one Customer Tax Class. Magento provides you with a Tax Rule called Retail Customer. If you serve different types of customers—retail, business, and nonprofit—you will need to create different Customer Tax Classes.
Product Tax Class is a type of Product that is being purchased. When you create a Product, you will assign a Product Tax Class to that Product. Magento comes with two Product Tax Classes:Taxable Goods and Shipping. The class Shipping is applied to shipping charges because some places charge sales tax on shipping. If your customer’s sales tax is different for different types of Products, then you will need to create a Product Tax Class for each type of Product.
Tax Rate is a combination of place, or tax zone, and percentage. A zone can be a country, state, or zip code.
Each zone that you specify can have up to five sales tax percentages. For example, in the default installation of Magento, there is one tax rate for the zone New York. This is 8.3750 percent, and applies to retail customers. The following window can be found at Sales | Tax | Manage Tax Zones & Rates and then clicking on US-NY-*-Rate 1:
So in the screenshot of our Tax Rule, the Tax Rate US-NY-*-Rate 1 doesn’t mean “a sales tax of 1 percent.” It means “Tax rate number 1 for New York, which is 8.3750 percent.”
In this scenario, New York charges 8.3750 percent sales tax on retail sales. If New York does not charge sales tax for wholesale customers, and you sell to wholesale customers, then you will need to create another Tax Rate for New York:
Whenever a zone has different sales taxes for different types of products or customers, you will need to create different Tax Rates for that zone.
If several Tax Rules try to apply several Tax Rates at the same time, how should Magento handle them? Should it add them all together? Or, should it apply one rate, calculate the total, and then apply the second rate to that total? That is, should Magento add them or compound them?
For example, suppose you sell a product in Philadelphia, Pennsylvania. Further suppose that according to the Tax Rule for Pennsylvania, the sales tax for that item is 6 percent, and that the Tax Rule for Philadelphia adds another 1 percent. In this case, you want Magento to add the two sales taxes. So, you would give the two Tax Rates the same Priority.
By contrast, Tax Rates that belong to Tax Rules with different Priorities are compounded. The Tax Rate with the higher Priority (the lower number) is applied, and the next higher Priority is applied to that total, and so on.
Sort Order determines the Tax Rules’ position in the list of Tax Rules.
Why create a Tax Rule now, before adding our first Product? When you add a Product to your store, you put that Product into a Category, assign an Attribute Set, and select a Tax Class for that Product. By default, Magento comes with two Product Tax Classes and one Tax Rule already created. The Product Tax Classes are Taxable Goods and Shipping. The Tax Rule is Retail Customer-Taxable Goods-Rate 1. If you sell anything other than taxable goods, or sell to anyone other than retail customers, you will need to create a new Tax Rule to cover that situation.
The process for creating a Tax Rule is:
Create and name the Tax Rule:
Each of these steps is covered in the subsections that follow.
A Tax Rule is composed of a Customer Class, Product Class, Tax Rate, and the location of the purchaser. You have just created the first part of that formula: the Customer Class.
A Tax Rule is composed of a Customer Class, Product Class, Tax Rate, and the location of the purchaser. You have just created the second part of that formula: the Product Class.
In Magento, you can create Tax Rates one at a time. You can also import Tax Rates in bulk. Each method is covered in the next section.
The Manage Tax Rates page is displayed. If this is a new installation, only two Tax Rates are listed: US-CA-*-Rate 1 and US-NY-*-Rate 1.
A Tax Rule is composed of a Customer Class, Product Class, Tax Rate, and the location of the purchaser. You have just created the third part of that formula: the Tax Rate. The Tax Rate included the location and the percentage of tax. You created the Tax Rate by manually entering the information into the system, which is suitable if you don’t have too many Tax Rates to type.
In my demo store, I have created a Tax Rate for the state of Pennsylvania. The Tax Rate for the city of Philadelphia is different. However, Magento doesn’t enable me to choose a separate Tax Rate based on the city. So I must create a Tax Rate for each zip code in the city of Philadelphia. At this time there are 84 zip codes, and are shown here:
19019 | 19092 | 19093 | 19099 | 19101 | 19102 | 19103 | 19104 | 19105 | 19106 | 19107 |
19108 | 19109 | 19110 | 19111 | 19112 | 19113 | 19114 | 19115 | 19116 | 19118 | 19119 |
19120 | 19121 | 19122 | 19123 | 19124 | 19125 | 19126 | 19127 | 19128 | 19129 | 19130 |
19131 | 19132 | 19133 | 19134 | 19135 | 19136 | 19137 | 19138 | 19139 | 19140 | 19141 |
19142 | 19143 | 19144 | 19145 | 19146 | 19147 | 19148 | 19149 | 19150 | 19151 | 19152 |
19153 | 19154 | 19155 | 19160 | 19161 | 19162 | 19170 | 19171 | 19172 | 19173 | 19175 |
19177 | 19178 | 19179 | 19181 | 19182 | 19183 | 19184 | 19185 | 19187 | 19188 | 19191 |
19192 | 19193 | 19194 | 19196 | 19197 | 19244 | 19255 |
|
|
|
|
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…