I was working on an E-Commerce web application using the nopCommerce, I have installed and configured nopCommerce and started to create an E-Commerce web application. I have customized and developed each and every feature but not able to manage sales tax for US because nopCommerce managed the tax by zip code but tax by zip code doesn’t work in the US since some zip codes straddle more than 1 state. The state of California sometimes has different tax rates for each city/town.
My problem is that some zip codes in California have more than 1 tax rate. This is common in many parts of the US. Since sales taxes are usually based on State/County/City not zip code.
I have tried to find out the solution of this problem, I have searched for solution on Google also discussed this with other developers and I found some third party paid plug-in which are managing the sales tax on behalf of the city for US. There are some paid plug-in StrikeIron, Avalara, Zip2Tax, Tax Data Systems are available, which will help you to manage sales tax.
Usually Sales Tax is calculated on the basis of zip code, but if you’re looking for a solution without using any plug-in specifically for California situation where 1 zip can have 2 different tax rate, then you need to do some modifications in the code. nopCommerce uses terminology of calculating tax on bases of zip code, so the code looks for zip code stored in the database along with the tax rate In this situation we have to modify code in such a way that the code will look for Town Name which you will store in your database along with the tax rate in order to calculate tax.
I have tried to resolve this problem by doing some modification in code as well as in database. I have created a table which contains all sales tax against city name and zip code and entered all 6162 zip codes one by one into that table. After that I did some modification in code files. I have modified the sales tax calculation method , I was capturing the city and zip code for sales tax, if city and zip code exists with-in the newly created table then it will get tax rate from that table and calculate the tax accordingly else it will work as defined in nopCommerce.
We can use the plug-in or can do some modifications as mentioned above, to manage the sales tax.Tags: