Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Dec 2006
    Location
    Ohio
    Posts
    198
    Plugin Contributions
    0

    Default Adding countries

    When I set up a new store, I copied my other store's database. That database only has about 5 countries. Now, I need all the countries that came with ZC by default. What's the quickest way to add this? I do have another dB with all the countries - I just don't know how to export and import just the country table via MySQL. TIA!

  2. #2
    Join Date
    Dec 2006
    Location
    Ohio
    Posts
    198
    Plugin Contributions
    0

    Default Re: Adding countries

    Figured it out. Thx.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Adding countries

    What is the secret to your success?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Adding countries

    I also need to know this!
    We were only taking orders from the US, but now that Google Checkout and Paypal are installed, we want to accept orders from outside of the US for those methods....

    Which brings on my next question...
    I want anyone to be able to checkout using Google or Paypal, but give ONLY the US and possibly Canada the ability to use the default checkout method. If I am correct, I would just select the zones in the payment modules?

  5. #5
    Join Date
    Dec 2006
    Location
    Ohio
    Posts
    198
    Plugin Contributions
    0

    Default Re: Adding countries

    You want to double-check this list before pasting it into the SQL update screen. Some characters might need a \ (backslash) in front of it. You probably want to check the database to make sure that the numbers (countries_id) don't conflict either. I am not an SQL expert at all, so use at your own risk!

    PHP Code:
    insert into countries (countries_idcountries_namecountries_iso_code_2countries_iso_code_3address_format_idvalues
    ('240','Aaland Islands','AX','ALA','1')
    (
    '1','Afghanistan','AF','AFG','1'),
    (
    '2','Albania','AL','ALB','1'),
    (
    '3','Algeria','DZ','DZA','1'),
    (
    '4','American Samoa','AS','ASM','1'),
    (
    '5','Andorra','AD','AND','1'),
    (
    '6','Angola','AO','AGO','1'),
    (
    '7','Anguilla','AI','AIA','1'),
    (
    '8','Antarctica','AQ','ATA','1'),
    (
    '9','Antigua and Barbuda','AG','ATG','1'),
    (
    '10','Argentina','AR','ARG','1'),
    (
    '11','Armenia','AM','ARM','1'),
    (
    '12','Aruba','AW','ABW','1'),
    (
    '13','Australia','AU','AUS','1'),
    (
    '14','Austria','AT','AUT','5'),
    (
    '15','Azerbaijan','AZ','AZE','1'),
    (
    '16','Bahamas','BS','BHS','1'),
    (
    '17','Bahrain','BH','BHR','1'),
    (
    '18','Bangladesh','BD','BGD','1'),
    (
    '19','Barbados','BB','BRB','1'),
    (
    '20','Belarus','BY','BLR','1'),
    (
    '21','Belgium','BE','BEL','1'),
    (
    '22','Belize','BZ','BLZ','1'),
    (
    '23','Benin','BJ','BEN','1'),
    (
    '24','Bermuda','BM','BMU','1'),
    (
    '25','Bhutan','BT','BTN','1'),
    (
    '26','Bolivia','BO','BOL','1'),
    (
    '27','Bosnia and Herzegowina','BA','BIH','1'),
    (
    '28','Botswana','BW','BWA','1'),
    (
    '29','Bouvet Island','BV','BVT','1'),
    (
    '30','Brazil','BR','BRA','1'),
    (
    '31','British Indian Ocean Territory','IO','IOT','1'),
    (
    '32','Brunei Darussalam','BN','BRN','1'),
    (
    '33','Bulgaria','BG','BGR','1'),
    (
    '34','Burkina Faso','BF','BFA','1'),
    (
    '35','Burundi','BI','BDI','1'),
    (
    '36','Cambodia','KH','KHM','1'),
    (
    '37','Cameroon','CM','CMR','1'),
    (
    '38','Canada','CA','CAN','1'),
    (
    '39','Cape Verde','CV','CPV','1'),
    (
    '40','Cayman Islands','KY','CYM','1'),
    (
    '41','Central African Republic','CF','CAF','1'),
    (
    '42','Chad','TD','TCD','1'),
    (
    '43','Chile','CL','CHL','1'),
    (
    '44','China','CN','CHN','1'),
    (
    '45','Christmas Island','CX','CXR','1'),
    (
    '46','Cocos (Keeling) Islands','CC','CCK','1'),
    (
    '47','Colombia','CO','COL','1'),
    (
    '48','Comoros','KM','COM','1'),
    (
    '49','Congo','CG','COG','1'),
    (
    '50','Cook Islands','CK','COK','1'),
    (
    '51','Costa Rica','CR','CRI','1'),
    (
    '52','Cote D'Ivoire','CI','CIV','1'),
    ('
    53','Croatia','HR','HRV','1'),
    ('
    54','Cuba','CU','CUB','1'),
    ('
    55','Cyprus','CY','CYP','1'),
    ('
    56','Czech Republic','CZ','CZE','1'),
    ('
    57','Denmark','DK','DNK','1'),
    ('
    58','Djibouti','DJ','DJI','1'),
    ('
    59','Dominica','DM','DMA','1'),
    ('
    60','Dominican Republic','DO','DOM','1'),
    ('
    61','East Timor','TP','TMP','1'),
    ('
    62','Ecuador','EC','ECU','1'),
    ('
    63','Egypt','EG','EGY','1'),
    ('
    64','El Salvador','SV','SLV','1'),
    ('
    65','Equatorial Guinea','GQ','GNQ','1'),
    ('
    66','Eritrea','ER','ERI','1'),
    ('
    67','Estonia','EE','EST','1'),
    ('
    68','Ethiopia','ET','ETH','1'),
    ('
    69','Falkland Islands (Malvinas)','FK','FLK','1'),
    ('
    70','Faroe Islands','FO','FRO','1'),
    ('
    71','Fiji','FJ','FJI','1'),
    ('
    72','Finland','FI','FIN','1'),
    ('
    73','France','FR','FRA','1'),
    ('
    74','France Metropolitan','FX','FXX','1'),
    ('
    75','French Guiana','GF','GUF','1'),
    ('
    76','French Polynesia','PF','PYF','1'),
    ('
    77','French Southern Territories','TF','ATF','1'),
    ('
    78','Gabon','GA','GAB','1'),
    ('
    79','Gambia','GM','GMB','1'),
    ('
    80','Georgia','GE','GEO','1'),
    ('
    81','Germany','DE','DEU','5'),
    ('
    82','Ghana','GH','GHA','1'),
    ('
    83','Gibraltar','GI','GIB','1'),
    ('
    84','Greece','GR','GRC','1'),
    ('
    85','Greenland','GL','GRL','1'),
    ('
    86','Grenada','GD','GRD','1'),
    ('
    87','Guadeloupe','GP','GLP','1'),
    ('
    88','Guam','GU','GUM','1'),
    ('
    89','Guatemala','GT','GTM','1'),
    ('
    90','Guinea','GN','GIN','1'),
    ('
    91','Guinea-bissau','GW','GNB','1'),
    ('
    92','Guyana','GY','GUY','1'),
    ('
    93','Haiti','HT','HTI','1'),
    ('
    94','Heard and Mc Donald Islands','HM','HMD','1'),
    ('
    95','Honduras','HN','HND','1'),
    ('
    96','Hong Kong','HK','HKG','1'),
    ('
    97','Hungary','HU','HUN','1'),
    ('
    98','Iceland','IS','ISL','1'),
    ('
    99','India','IN','IND','1'),
    ('
    100','Indonesia','ID','IDN','1'),
    ('
    101','Iran (Islamic Republic of)','IR','IRN','1'),
    ('
    102','Iraq','IQ','IRQ','1'),
    ('
    103','Ireland','IE','IRL','1'),
    ('
    104','Israel','IL','ISR','1'),
    ('
    105','Italy','IT','ITA','1'),
    ('
    106','Jamaica','JM','JAM','1'),
    ('
    107','Japan','JP','JPN','1'),
    ('
    108','Jordan','JO','JOR','1'),
    ('
    109','Kazakhstan','KZ','KAZ','1'),
    ('
    110','Kenya','KE','KEN','1'),
    ('
    111','Kiribati','KI','KIR','1'),
    ('
    112','Korea Democratic People's Republic of','KP','PRK','1'),
    (
    '113','Korea Republic of','KR','KOR','1'),
    (
    '114','Kuwait','KW','KWT','1'),
    (
    '115','Kyrgyzstan','KG','KGZ','1'),
    (
    '116','Lao People's Democratic Republic','LA','LAO','1'),
    ('
    117','Latvia','LV','LVA','1'),
    ('
    118','Lebanon','LB','LBN','1'),
    ('
    119','Lesotho','LS','LSO','1'),
    ('
    120','Liberia','LR','LBR','1'),
    ('
    121','Libyan Arab Jamahiriya','LY','LBY','1'),
    ('
    122','Liechtenstein','LI','LIE','1'),
    ('
    123','Lithuania','LT','LTU','1'),
    ('
    124','Luxembourg','LU','LUX','1'),
    ('
    125','Macau','MO','MAC','1'),
    ('
    126','Macedonia The Former Yugoslav Republic of','MK','MKD','1'),
    ('
    127','Madagascar','MG','MDG','1'),
    ('
    128','Malawi','MW','MWI','1'),
    ('
    129','Malaysia','MY','MYS','1'), 
    ('
    130','Maldives','MV','MDV','1'),
    ('
    131','Mali','ML','MLI','1'),
    ('
    132','Malta','MT','MLT','1'), 
    ('
    133','Marshall Islands','MH','MHL','1'),
    ('
    134','Martinique','MQ','MTQ','1'),
    ('
    135','Mauritania','MR','MRT','1'),
    ('
    136','Mauritius','MU','MUS','1'),
    ('
    137','Mayotte','YT','MYT','1'),
    ('
    138','Mexico','MX','MEX','1'),
    ('
    139','Micronesia Federated States of','FM','FSM','1'),
    ('
    140','Moldova Republic of','MD','MDA','1'),
    ('
    141','Monaco','MC','MCO','1'),),
    ('
    142','Mongolia','MN','MNG','1'),
    ('
    143','Montserrat','MS','MSR','1'),
    ('
    144','Morocco','MA','MAR','1'),
    ('
    145','Mozambique','MZ','MOZ','1'),
    ('
    146','Myanmar','MM','MMR','1'),
    ('
    147','Namibia','NA','NAM','1'),
    ('
    148','Nauru','NR','NRU','1'),
    ('
    149','Nepal','NP','NPL','1'),
    ('
    150','Netherlands','NL','NLD','1'),
    ('
    151','Netherlands Antilles','AN','ANT','1'),
    ('
    152','New Caledonia','NC','NCL','1'),
    ('
    153','New Zealand','NZ','NZL','1'),
    ('
    154','Nicaragua','NI','NIC','1'),
    ('
    155','Niger','NE','NER','1'),
    ('
    156','Nigeria','NG','NGA','1'),
    ('
    157','Niue','NU','NIU','1'),
    ('
    158','Norfolk Island','NF','NFK','1'),
    ('
    159','Northern Mariana Islands','MP','MNP','1'),
    ('
    160','Norway','NO','NOR','1'),
    ('
    161','Oman','OM','OMN','1'),
    ('
    162','Pakistan','PK','PAK','1'),
    ('
    163','Palau','PW','PLW','1'),
    ('
    164','Panama','PA','PAN','1'),
    ('
    165','Papua New Guinea','PG','PNG','1'),
    ('
    166','Paraguay','PY','PRY','1'),
    ('
    167','Peru','PE','PER','1'),
    ('
    168','Philippines','PH','PHL','1'),
    ('
    169','Pitcairn','PN','PCN','1'),
    ('
    170','Poland','PL','POL','1'),
    ('
    171','Portugal','PT','PRT','1'),
    ('
    172','Puerto Rico','PR','PRI','1'),
    ('
    173','Qatar','QA','QAT','1'),
    ('
    174','Reunion','RE','REU','1'),
    ('
    175','Romania','RO','ROM','1'),
    ('
    176','Russian Federation','RU','RUS','1'),
    ('
    177','Rwanda','RW','RWA','1'),
    ('
    178','Saint Kitts and Nevis','KN','KNA','1'),
    ('
    179','Saint Lucia','LC','LCA','1'),
    ('
    180','Saint Vincent and the Grenadines','VC','VCT','1'),
    ('
    181','Samoa','WS','WSM','1'),
    ('
    182','San Marino','SM','SMR','1'),
    ('
    183','Sao Tome and Principe','ST','STP','1'),
    ('
    184','Saudi Arabia','SA','SAU','1'),
    ('
    185','Senegal','SN','SEN','1'),
    ('
    186','Seychelles','SC','SYC','1'),
    ('
    187','Sierra Leone','SL','SLE','1'),
    ('
    188','Singapore','SG','SGP','4'),
    ('
    189','Slovakia (Slovak Republic)','SK','SVK','1'),
    ('
    190','Slovenia','SI','SVN','1'),
    ('
    191','Solomon Islands','SB','SLB','1'),
    ('
    192','Somalia','SO','SOM','1'),
    ('
    193','South Africa','ZA','ZAF','1'),
    ('
    194','South Georgia and the South Sandwich Islands','GS','SGS','1'),
    ('
    195','Spain','ES','ESP','3'),
    ('
    196','Sri Lanka','LK','LKA','1'),
    ('
    197','StHelena','SH','SHN','1'),
    ('
    198','StPierre and Miquelon','PM','SPM','1'),
    ('
    199','Sudan','SD','SDN','1'),
    ('
    200','Suriname','SR','SUR','1'),
    ('
    201','Svalbard and Jan Mayen Islands','SJ','SJM','1'),
    ('
    202','Swaziland','SZ','SWZ','1'),
    ('
    203','Sweden','SE','SWE','1'),
    ('
    204','Switzerland','CH','CHE','1'),
    ('
    205','Syrian Arab Republic','SY','SYR','1'),
    ('
    206','Taiwan','TW','TWN','1'),
    ('
    207','Tajikistan','TJ','TJK','1'),
    ('
    208','Tanzania United Republic of','TZ','TZA','1'),
    ('
    209','Thailand','TH','THA','1'),
    ('
    210','Togo','TG','TGO','1'),
    ('
    211','Tokelau','TK','TKL','1'),
    ('
    212','Tonga','TO','TON','1'),
    ('
    213','Trinidad and Tobago','TT','TTO','1'),
    ('
    214','Tunisia','TN','TUN','1'),
    ('
    215','Turkey','TR','TUR','1'),
    ('
    216','Turkmenistan','TM','TKM','1'),
    ('
    217','Turks and Caicos Islands','TC','TCA','1'),
    ('
    218','Tuvalu','TV','TUV','1'),
    ('
    219','Uganda','UG','UGA','1'),
    ('
    220','Ukraine','UA','UKR','1'),
    ('
    221','United Arab Emirates','AE','ARE','1'),
    ('
    222','United Kingdom','GB','GBR','6'),
    ('
    223','United States','US','USA','2'),
    ('
    224','United States Minor Outlying Islands','UM','UMI','1'),
    ('
    225','Uruguay','UY','URY','1'),
    ('
    226','Uzbekistan','UZ','UZB','1'),
    ('
    227','Vanuatu','VU','VUT','1'),
    ('
    228','Vatican City State (Holy See)','VA','VAT','1'),
    ('
    229','Venezuela','VE','VEN','1'),
    ('
    230','Viet Nam','VN','VNM','1'),
    ('
    231','Virgin Islands (British)','VG','VGB','1'),
    ('
    232','Virgin Islands (U.S.)','VI','VIR','1'),
    ('
    233','Wallis and Futuna Islands','WF','WLF','1'),
    ('
    234','Western Sahara','EH','ESH','1'),
    ('
    235','Yemen','YE','YEM','1'),
    ('
    236','Yugoslavia','YU','YUG','1'),
    ('
    237','Zaire','ZR','ZAR','1'),
    ('
    238','Zambia','ZM','ZMB','1'),
    ('
    239','Zimbabwe','ZW','ZWE','1'); 
    I accept Paypal donations... Just kidding. I wish...

  6. #6
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Adding countries

    well i know nothing about php or mysql so you beat me there...

  7. #7
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Adding countries

    This is the error I get when trying that....

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('1','Afghanistan','AF','AFG','1'), ('2','Albania','AL','ALB','1'), ('3','Algeri' at line 1

  8. #8
    Join Date
    Dec 2006
    Location
    Ohio
    Posts
    198
    Plugin Contributions
    0

    Default Re: Adding countries

    Sorry, I can't really help you.

    If this wasn't the entire error message, I would try copying/pasting the first 2 lines to see if it takes. If not, then you should google what the syntax is for your SQL version.

    If just the first 2 lines take, then it's just a matter of finding an offending line. I think descriptions with a ' needs to be preceeded by a \. So for example, 52 would become

    [FONT=Courier New]('52','Cote D\'Ivoire','CI','CIV','1[/FONT][FONT=Courier New]'), [/FONT]

    For the ones that gave me a hard time, I just manually did it through the Admin area.

    You can also manually enter them in MySQL, which is a little easier than the Admin area. Make sure to back up first!

  9. #9
    Join Date
    Aug 2006
    Location
    portlandish, oregon
    Posts
    799
    Plugin Contributions
    0

    Default Re: Adding countries

    Hmmn, I really don't know what I am doing when it comes to this. I guess I'm stuck with just the US being able to order. Entering everything one by one seems way too tedious, and I already have too much on my plate...

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Adding countries

    There is a missing comma on the INSERT for the row starting with 240
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Adding Countries
    By pietpetoors in forum Addon Shipping Modules
    Replies: 6
    Last Post: 31 Oct 2015, 11:37 PM
  2. 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
  3. 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
  4. 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
  5. Adding countries?
    By grace83 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 6 Nov 2008, 04:20 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