Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2010
    Location
    South Africa
    Posts
    140
    Plugin Contributions
    0

    Default Adding Countries

    I would like to add some more countries to my Zen Cart. Mine only show some African countries. I installed Zencart 4 years ago and cannot remember if the other countries were there and if I deleted them or if I have to add each country separately.

    I do not know all the provinces and areas in each country. Is there a file I can upload to add all the countries?
    Only Dead Fish go with the flow

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Adding Countries

    Quote Originally Posted by pietpetoors View Post
    I would like to add some more countries to my Zen Cart. Mine only show some African countries. I installed Zencart 4 years ago
    It's probably time to upgrade.

    Quote Originally Posted by pietpetoors View Post
    and cannot remember if the other countries were there and if I deleted them or if I have to add each country separately.
    You probably deleted them (a common newbie mistake)

    Quote Originally Posted by pietpetoors View Post
    I do not know all the provinces and areas in each country. Is there a file I can upload to add all the countries?
    From the latest ZenCart Distro file there are a couple of files in the /zc_install/sql folder - one called mysql_latin1.sql and another called mysql_utf8.sql that contain what appears to be a full list of the countries and zones. Backup your database, then use the ZenCart tools->InstallSQL_patches to 'import' the relevant sql file for your database (probably mysql_latin1.sql).

    Cheers
    RodG

    ps. This is mainly an educated guess as to what you need to do. If someone gives different advice I suggest you do as they instruct rather than this.

  3. #3
    Join Date
    Jun 2010
    Location
    South Africa
    Posts
    140
    Plugin Contributions
    0

    Default Re: Adding Countries

    Thank you I will try that
    Only Dead Fish go with the flow

  4. #4
    Join Date
    Jun 2010
    Location
    South Africa
    Posts
    140
    Plugin Contributions
    0

    Default Re: Adding Countries

    When I run it I get the following message:
    "WARNING: An Error occurred, please refresh the page and try again"
    Does not matter if I copy and paste the contents of those files or if I upload the file I get the same error message
    Only Dead Fish go with the flow

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Adding Countries

    Quote Originally Posted by pietpetoors View Post
    When I run it I get the following message:
    "WARNING: An Error occurred, please refresh the page and try again"
    Does not matter if I copy and paste the contents of those files or if I upload the file I get the same error message
    This sounds like a security error.

    You have two options here.

    1) Determine what is causing the error (and fix it)
    2) Perform the update using phpMyAdmin

    There is however a caveat with using option#2 in that if your Database tables have a prefix (eg "zen_") you'll need to edit the .sql file to add this prefix.

    The quickest/easiest way to do this is with a text editor (not a word processor) with a search/replace function.

    EG: Search for
    "INSERT INTO countries"
    Replace with
    "INSERT INTO zen_countries"

    and
    Search for
    "INSERT INTO zones"
    Replace with
    "INSERT INTO zen_zones"

    and
    Search for
    "INSERT INTO configuration"
    Replace with
    "INSERT INTO zen_configuration"

    Using phpmyadmin isn't difficult (but back up your database first). The process is
    1) Select your database
    2) Click the 'import' button and select your modified .sql file
    3) Press 'Go'.

    Alternatively, you can select the database, press the SQL button, then paste the code into the text box (Followed by Go).

    If your database tables *don't* have a prefix then no edits are needed, simply import or paste the code.
    If unsure, just look at the table names using phpmyadmin.

    Cheers
    RodG
    Last edited by RodG; 7 Oct 2014 at 04:59 PM.

  6. #6
    Join Date
    Jun 2010
    Location
    South Africa
    Posts
    140
    Plugin Contributions
    0

    Default Re: Adding Countries

    I added all the countries, but now I have some duplicates like:
    Spain Albacete Albacete
    Spain Alicante Alicante
    Spain Alicante Alicante
    Spain Almeria Almeria
    Spain Almer�a Almer�a
    Spain Asturias Asturias
    Spain Asturias Asturias
    Spain Avila Avila Info
    Spain �lava �lava
    Spain �vila �vila
    Spain Badajoz Badajoz
    Spain Badajoz Badajoz
    Does it matter which ones I delete and which ones I leave?
    Any idea why some show this symbol � ?
    Only Dead Fish go with the flow

  7. #7
    Join Date
    Oct 2015
    Location
    Alaska
    Posts
    10
    Plugin Contributions
    0

    Default Re: Adding Countries

    If you have upgraded (carefully) to 1.5.4, There is an "Add Countries" button at the bottom of the countries listing in the Location/Taxes > Countries.

 

 

Similar Threads

  1. Adding countries in my store?
    By HegeES in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 30 Jan 2012, 12:31 AM
  2. Zone Shipping not Disabling for countries defined in the skip countries box
    By cpjfox in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 30 Aug 2009, 12:15 PM
  3. Adding countries to zone definition
    By MaureenT in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 27 Feb 2009, 08:37 PM
  4. Adding countries?
    By grace83 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 6 Nov 2008, 04:20 PM
  5. Adding countries
    By KTNaturals in forum General Questions
    Replies: 20
    Last Post: 5 Feb 2008, 06:06 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR