Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    155
    Plugin Contributions
    0

    Default Remove all countries at once except one.

    How does one remove all countries except one without having to go through hundreds of clicks one by one?

    Please don't just say edit SQL without more info about that.

  2. #2
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,542
    Plugin Contributions
    19

    Default Re: Remove all countries at once except one.

    If you're 100% sure you want to remove them, an SQL command would be enough. You would need to know the ID of the country, but you could go with the name... For example, US is 223, but you could use "United States" as well.
    admin->Tools->Install SQL Patches
    Code:
    DELETE FROM countries WHERE countries_id != 223;
    or, based on name:
    Code:
    DELETE FROM countries WHERE countries_name NOT LIKE 'United States';
    As always, don't just run the query, make sure you read and follow the bold red text on the "Install SQL Patches" page...

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,499
    Plugin Contributions
    88

    Default Re: Remove all countries at once except one.

    ... or better yet, for zc156 and later, just 'disable' the countries:

    UPDATE countries SET status = 0 WHERE countries_id != 223;

    or

    UPDATE countries SET status = 0 WHERE countries_name != 'United States';

    To disable all countries but the USA.

  4. #4

    Default Re: Remove all countries at once except one.

    Hi,

    I see that there were several suggestions provided for removing all countries except one in the Zen Cart forum. Could you please share which method you chose to implement, and more importantly, could you confirm whether it worked for your specific case?

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,703
    Plugin Contributions
    123

    Default Re: Remove all countries at once except one.

    This is indeed the recommended approach:

    https://docs.zen-cart.com/user/admin...ling-countries
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. weight charges to all countries except one.
    By Afnan in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 26 Sep 2012, 06:01 PM
  2. Removed all countries except uk, gc doesnt work!!
    By Xbox Memberships in forum General Questions
    Replies: 16
    Last Post: 6 Mar 2012, 02:02 PM
  3. zone name, all countries except sweden?
    By oberheimer in forum General Questions
    Replies: 0
    Last Post: 28 Jun 2010, 01:11 PM
  4. Does anyone have zone All Countries Except the AU and NZ
    By oavs in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 17 Nov 2008, 11:55 PM
  5. quick way to delete all countries except for 2?
    By dragon designs in forum General Questions
    Replies: 2
    Last Post: 8 Sep 2007, 07:30 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