Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Jan 2010
    Posts
    153
    Plugin Contributions
    0

    Default Removed all countries except uk, gc doesnt work!!

    a while back i followed a post made about removing countries from zen cart the post was....

    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');

    That will remove all countries except USA. Then go to Admin - Locations/Taxes - Zones and manually remove Alaska and Hawaii (and some others like Puerto Rico), depending if you want to sell there.

    You could also set up a US-only shipping zone, but I don't think that will stop people from outside the US from creating accounts.
    I altered the .sql to say GBR instead of USA.
    I am wondering is there anyway to reverse this?
    i have upgraded to the most recent zen version and installed a new payment module, now google checkout is giving me an error from the integration console saying "the cart was posted with an unrecognised country code" I can only assume it to be this that is causing the problem, i did have a coder that had made google checkout work for me before via an express checkout button but i can unfortunatly no longer get in touch with this person.
    Any help would be greatly appreciated.

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Removed all countries except uk, gc doesnt work!!

    You should be able to restore the 'countries' table in phpMyAdmin.

    I have never done this (or something similar) but I would just install another instance of Zen Cart on a sub domain (make sure it's the same version of ZC), then go to phpMyAdmin on that new install and export the 'countries' table to my HD.

    Next step would be to back up my live DB and then import the previously exported 'countries' table from my HD into my live DB.

    That should restore all your country codes (I hope..... )

  3. #3
    Join Date
    Jan 2010
    Posts
    153
    Plugin Contributions
    0

    Default Re: Removed all countries except uk, gc doesnt work!!

    thankyou for your response, im not that well adapt but i shall give it a go.

  4. #4
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Removed all countries except uk, gc doesnt work!!

    Quote Originally Posted by Xbox Memberships View Post
    thankyou for your response, im not that well adapt but i shall give it a go.
    Just make sure that you back up your live DB before doing this!

    You may want to post the result here when you are done.
    Last edited by frank18; 5 Mar 2012 at 12:56 PM.

  5. #5
    Join Date
    Jan 2010
    Posts
    153
    Plugin Contributions
    0

    Default Re: Removed all countries except uk, gc doesnt work!!

    ive posted it as a job on vworker as knowing me id try it and it result in complete anarchy

  6. #6
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Removed all countries except uk, gc doesnt work!!

    Check your PM

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Removed all countries except uk, gc doesnt work!!

    I just tested Frank's method on a couple of test sites and it worked as he described. You'll get an error message as the Import function tries to copy the country that's already there, but you can ignore it.

  8. #8
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Removed all countries except uk, gc doesnt work!!

    Quote Originally Posted by stevesh View Post
    I just tested Frank's method on a couple of test sites and it worked as he described. You'll get an error message as the Import function tries to copy the country that's already there, but you can ignore it.
    Thanks, stevesh, I thought that error may bob up.

    But other than that it should work easily as this table (countries) is what I would call a 'static' table, it does not change every 5 minutes - unlike the 'customers' or 'orders' tables ...

  9. #9
    Join Date
    Jan 2010
    Posts
    153
    Plugin Contributions
    0

    Default Re: Removed all countries except uk, gc doesnt work!!

    great stuff good to know it will work. im having trouble using my ftp. i use filezilla and even the pre saved quick connect settings or importing settings from cpanel dont work? closest i can get is a folder that contains nothing named "import" and a file named ftp.quota??

  10. #10
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Removed all countries except uk, gc doesnt work!!

    No, you don't use FTP for this. Under 'databases' in your hosting control panel should be a selection called 'phpMyAdmin', which is a database tool.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Help Links work in all browsers except IE8!! It's driving me nuts
    By Darion in forum General Questions
    Replies: 2
    Last Post: 2 Feb 2013, 04:15 AM
  2. 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
  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

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