Events Made Easy Forums How do I … Countries

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #60736
    Anonymous
    Inactive

    Hi there, maybe I’m lazy, but I am wondering if anyone have a list of csv countries ready for importing to EME ? maybe also states in us/canada… etc?

    https://www.e-dynamics.be/wordpress/csv-import-countries-states/

    #60742
    Franky
    Keymaster

    For the countries: go to https://en.wikipedia.org/wiki/ISO_3166-1, select the table and copy/paste it as “unformatted text” in LibreOffice. Then remove the trailing spaces and you can save it in CSV format (check the option “quote all cells”). I’ll do it now as a courtesy and put the file on the page you listed.

    #60745
    Franky
    Keymaster

    Btw: it seems they changed the state codes for the US to something more than 2 characters (and even my example has a string of 3 characters for Washington), so this change needs to be applied (just remove 3 lines in eme_countries.php):
    https://plugins.trac.wordpress.org/changeset/2235663/

    #60746
    Anonymous
    Inactive

    Thank you, really appreciate that,
    when I import the file it says a field is missing, does it need something else ?

    #60751
    Franky
    Keymaster

    Sorry, I forgot to add the header line. Changed now (reload the page).

    #60754
    Anonymous
    Inactive

    Thank you! 🙂
    Worked like a charm!

    #60797
    Anonymous
    Inactive

    Seems that there is similar issues with states..

    I’m getting “Not all required fields present.”..

    The format I am using in a csv file is:
    Name,Code,Country
    Alabama,AL,US
    Alaska,AK,US
    Arizona,AZ,US
    Arkansas,AR,US
    California,CA,US
    ….

    What am I doing wrong?

    #60798
    Anonymous
    Inactive

    Got a bit confused by the naming of the coulms..
    Just saw how to do it now… ignore this.

    Should be:
    name,code,country_id
    Alabama,AL,236
    Alaska,AK,236
    Arizona,AZ,236
    Arkansas,AR,236
    California,CA,236
    Colorado,CO,236
    Connecticut,CT,236

    Where the country_id is the ID of the country when you already have imported the country..

    😉

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top