Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Feb 2011
    Location
    California
    Posts
    65
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,958
    Plugin Contributions
    3

    Default 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.
    Our latest project is Pet Tags.

  3. #3
    Join Date
    Feb 2011
    Location
    California
    Posts
    65
    Plugin Contributions
    0

    Default Re: How do I Limit to One Country in Account Setup

    Thanks, schoolboy. That's what I'll do.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    19,668
    Plugin Contributions
    3

    Default 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:

    http://tutorials.zen-cart.com/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.

  5. #5
    Join Date
    Feb 2011
    Location
    California
    Posts
    65
    Plugin Contributions
    0

    Default 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.

  6. #6
    Join Date
    Jan 2004
    Posts
    60,443
    Blog Entries
    4
    Plugin Contributions
    51

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.



  7. #7
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,958
    Plugin Contributions
    3

    Default Re: How do I Limit to One Country in Account Setup?

    Quote Originally Posted by DrByte View Post
    ...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".
    Our latest project is Pet Tags.

  8. #8
    Join Date
    Jul 2010
    Location
    Sydney, Australia
    Posts
    86
    Plugin Contributions
    0

    Default Re: How do I Limit to One Country in Account Setup?

    Quote Originally Posted by stevesh View Post
    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:

    http://tutorials.zen-cart.com/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.
    relatively new to Zen Cart

  9. #9
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    19,668
    Plugin Contributions
    3

    Default 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.

  10. #10
    Join Date
    Jul 2010
    Location
    Sydney, Australia
    Posts
    86
    Plugin Contributions
    0

    Default 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.
    relatively new to Zen Cart

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. How to limit product sales by country?
    By dduane in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 8 Jan 2011, 07:00 PM
  2. Can you limit specific products to be sold in one country? (e.g. UK only)
    By PudzPud in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 25 Jul 2010, 04:53 PM
  3. Possible to limit checkout for only 1 country?
    By wcchyau in forum General Questions
    Replies: 2
    Last Post: 5 Nov 2009, 06:07 AM
  4. Do can limit only some country can buy the products?
    By explorer1979 in forum General Questions
    Replies: 0
    Last Post: 8 Oct 2007, 08:27 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •