How do I Limit to One Country in Account Setup?
I cannot find what controls the population of the drop-down menu for COUNTRY when a customer is creating a new account. The way it is, the drop down menu has all countries listed. I deleted a few names from the Locations/Countries list and this works. I can just delete all countries from this list except the US if I need to. It probably wouldn't take more than a half hour. If I want to sell into Canada and Mexico later I could just add those back to the list.
Is this the only way, or is there a simpler, cleaner method?
Re: How do I Limit to One Country in Account Setup
Yes, deleting unwanted countries will do the trick.
remember that when / if you later add countries back to the list, make sure you include their ISO codes (both the 2-digit and 3-digit codes.)
There are various lists in the internet that tell you the official ISO codes... I use the one at wikipedia.
Re: How do I Limit to One Country in Account Setup
Thanks, schoolboy. That's what I'll do.
Re: How do I Limit to One Country in Account Setup?
If you'll never want to sell outside the US, the easiest way is probably to back up your database, then run this in Admin - Tools - Install SQL Patches :
DELETE from countries WHERE countries_iso_code_3 NOT IN('USA');
A better way might be to set up a shipping zone that only includes the US:
https://www.zen-cart.com/tutorials/index.php?article=69
That way, customers in other countries will be able to buy from you and ship the product to someone in the US - gifts, for example.
Re: How do I Limit to One Country in Account Setup?
Thanks, Stevesh. Good ideas. I was able to delete them all manually in 10-15 minutes. I am B-B only for industrial tooling, so I expect no orders from outside the US as gifts. I will probably add Canada and Mexico later. Also, I tried the zone idea, but there does not seem to be any way to apply a zone to the COUNTRY drop down in account creation. This seems to populate directly from the Countries list.
Re: How do I Limit to One Country in Account Setup?
When you *do* re-add those countries, you should put them back EXACTLY as they were in the original install, including their countries_id number.
Re: How do I Limit to One Country in Account Setup?
Quote:
Originally Posted by
DrByte
...including their countries_id number.
...critically important...
I have had to do this, and it requires a lot of care. The SQL can be found in the zc_install/sql/mysql_zencart.sql of your ZC version. You also need to know what you are doing when applying SQL "patches".
Re: How do I Limit to One Country in Account Setup?
Quote:
Originally Posted by
stevesh
If you'll never want to sell outside the US, the easiest way is probably to back up your database, then run this in Admin - Tools - Install SQL Patches :
DELETE from countries WHERE countries_iso_code_3 NOT IN('USA');
A better way might be to set up a shipping zone that only includes the US:
https://www.zen-cart.com/tutorials/index.php?article=69
That way, customers in other countries will be able to buy from you and ship the product to someone in the US - gifts, for example.
Hi Stevesh, was just wondering what the safest method to restrict to only one country would be for a beginner at coding. I'm not really confident enough to run an SQL patch to restrict my customers to only selecting Australia.
Re: How do I Limit to One Country in Account Setup?
No coding (or confidence) required. Just back up your database, then Copy the statement below, Paste it into the big box in Admin - Tools - Install SQL Patches and click the Send button.
DELETE from countries WHERE countries_iso_code_3 NOT IN('AUS');
As I said in my other post, if you follow the tutorial I referenced and set up a shipping zone just for Australia, people in other countries can still buy from you and have the products shipped within your country, if you think that might happen.
Re: How do I Limit to One Country in Account Setup?
thanks for your help. I'd rather stick to purchases within Australia also to prevent the risk of fraud for now.