Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Feb 2011
    Location
    California
    Posts
    63
    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
    Cumbria, UK
    Posts
    10,262
    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.
    19 years a Zencart User

  3. #3
    Join Date
    Feb 2011
    Location
    California
    Posts
    63
    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
    20,024
    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:

    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.

  5. #5
    Join Date
    Feb 2011
    Location
    California
    Posts
    63
    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
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    Cumbria, UK
    Posts
    10,262
    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".
    19 years a Zencart User

  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:

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

  9. #9
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    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. v139h Not shipping in one country, how to ?
    By Akasashasha in forum General Questions
    Replies: 2
    Last Post: 6 Sep 2012, 08:29 AM
  2. How can I limit one items quanity as one per customer?
    By attroll in forum Managing Customers and Orders
    Replies: 18
    Last Post: 18 Apr 2011, 01:27 AM
  3. 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
  4. 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
  5. How do I setup Shipping Zones (not per country)
    By infocom in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 19 Mar 2008, 08:51 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR