- This topic has 7 replies, 2 voices, and was last updated 4 years, 9 months ago by .
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Countries
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/
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.
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/
Thank you, really appreciate that,
when I import the file it says a field is missing, does it need something else ?
Sorry, I forgot to add the header line. Changed now (reload the page).
Thank you! 🙂
Worked like a charm!
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?
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..
😉