Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Restrict shipping depending on zipcode?


dblake

Recommended Posts

Is there a modification out that will retrict shiping to certain zipcodes within the U.S.? I am working on a site that sells wine, and laws regulate the shipping of wine to certain zipcodes depending state/local law. Any ideas on a good place to start if there isn't a mod?

 

Thanks,

Dennis

Link to comment
Share on other sites

First you will need a good zipcode table - there are over 70,000 in the USA :-)

 

I have only ever found commercial data files that were up to scratch on this - the better ones sell a subscription with regular updates.

 

The actual code to restrict shipping through osCommerce would not be so difficult

 

Matti

Link to comment
Share on other sites

Would I just create a table and then on the shipping checkout, add a query to check to see if that zipcode is in that table and if so error out and if not procede with checkout? I was looking at the restrict shipping to certain countries, and it seems there is a little more to this. Is there anything I need to be aware of? Normally I just go for it LOL, but I have not started this project and I am trying to get my bearings. Thanks for any help Matti

 

-Dennis

Link to comment
Share on other sites

Perhaps - you could reference this against the delivery_postcode in the orders class.

 

The big question is - do you really wish to take customers that far into the process (checkout) before telling them you cannot ship the order?

 

How about at account signup? - you must still take into account delivery address as opposed to the primary address.

 

Matti

Link to comment
Share on other sites

wine.com is a good example of what I am going to do concerning the zipcodes. It will only show products if your state allows it and yadda yadda yadda. I know how to set that part up, I just don't know the other part with the zipcodes. I know I am going to have to make tables in the database, should I make a table for each state? I haven't done anything this involved before, or I can just be thinking its overwhelming after you told me 70,000 zipcodes :o

 

-Dennis

Link to comment
Share on other sites

I did a tax/county mod for a client on a US store - the zip code table was 6mb+ as an sql file and over 70,000 rows - you should have less minus the county info.

 

I took a look at the site - many can be eliminated on a state basis as they cannot have wine shipped at all, and only five other states had restrictions based on certain zip codes.

 

Once you have this info you are better prepared to tackle the task - sounds like fun! :P

 

 

Matti

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...