Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sales Tax Based on Zip+4


spencerb

Recommended Posts

Well, Arkansas has changed their sales tax code. As it is with some states, you now charge tax based on the ship-to destination. And it's not just the destination county. It's also the destination city, too.

 

I can't just set up county zones, because there are multiple tax rates within a county (inside and outside of city limits). Five digit zip codes won't work either, since a zip code can span multiple counties and cities.

 

The state publishes a table in MS Access format of tax rates for zip+4 codes. This table is loooong. There are 525,239 zip+4 codes in Arkansas. Of course, there aren't that many actual tax rates. Within a certain city there can be many zip+4 codes.

 

You can now see my dilemma.

 

One way would be for the customer to enter their normal 5-digit zip, and then a following page would force them to select their correct county and city. The database I have lists all the zips, rates, cities, and counties.

 

The other way would be to force Arkansas residents to enter their zip+4 (with a link to the usps site to find it, or in a perfect world an auto-lookup based on the given address), then use that zip+4 to lookup the rate.

 

I guess the easiest option would be to charge everybody the state tax rate, and I later calculate the city and county rates and just eat the cost difference.

 

Any ideas or suggestions?

Link to comment
Share on other sites

Another solution would be to allow the creation of sub-zones, based on zipcode for each county.

And a tax rate assigned to it.

 

Right now 2.2 RC2 does not allow for this so the code would need to be modified.

 

Could borrow from a mod known as ZipShip to set up the zip_zones, then need to create extra table for zip_tax_rates_to_zip_zones.

 

Then modify the tax calculations in the PHP files.

 

I can send you a rough (very rough) proto-mod as I am strapped for time.

 

I'll post it here in a day or two... okay , it might take a week :-"

 

 

 

~~~Tapuahk

Link to comment
Share on other sites

Look at what I found:

 

http://www.oscommerce.com/community/contributions,1240/

 

The 2/4/08 update looks like what I need. I searched around before I posted and didn't see this until I dug deeper. I'll try installing it and see what happens. I'm wondering how I will get all 525,239 zip+4 codes into the database, and if it can handle all that data.

 

I would also want a simple bit of code that forces Arkansas residents to enter a zip+4. It seems that the mod would just default to the 5-digit (or state default) rate if no +4 is given.

Link to comment
Share on other sites

That mod worked!

 

Now I have two things to work through:

 

1) Arkansas customers must enter their zip+4 code. If they put in just the 5-digit zip, this mod goes all squirrely (it would work fine if all I had were 5-digit zips in the database). The simple way around this is to somehow force them to enter their zip+4 and provide a link to usps so they can find it. The better way is to use usps's api web tools that automatically verifies the zip+4.

 

2) How do I populate the online database with all 525,239 zip+4 tax records?

 

Any suggestions on these two items?

Link to comment
Share on other sites

I gave up. With hundreds of thousands of zip+4 codes, the amount of data is unmanageable. Too much to handle in one Excel file, and even MS Access runs out of memory on my computer just working with the data table. Not to mention all those records having to be put into the sql database. I could import, but what a mess!

 

There are actually only 75 counties and 268 cities that have sales tax. I'm going to try and find a way for the customer to select their county, then select their city (or no city if out of city limits).

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...