Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Restricting sales to a single country


bw92116

Recommended Posts

I have spent time searching through this forum and I couldn't find anything that addresses this.

 

I have two installations of OSC 2.2 MS2. With one of the stores, all of the products can only be sent to customers within the United States. How do I edit the list of countries to make it so that shipping addresses can only have "United States," and no other country? Do I have to go to Admin->Locations->Countries and delete them all one at a time, or can I just edit a file? It's not clear to me whether the list of countries is stored in the database or in a file. If it's in a file, I can't find the file.

 

Thank you for your help.

Link to comment
Share on other sites

Countries reside in the database table 'countries'. If you only want United States as an option and you're sure that this won't change, you can do what I did and delete all entries other than United States from that table.

 

Backup your database so that you will have it later if you decide you want other countries back, then run the following MySQL query:

 

DELETE FROM countries WHERE countries_id != '223';

 

There are other ways to accomplish this and I'm certain that you can leave the database alone and change some code. A search for 'default country' (or similar keywords) here in the forum would probably point you to some of those options. The option I pose here has worked for me for a couple of years now.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...