Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    11
    Plugin Contributions
    0

    Default Getting the ISO codes for all countries?

    We have a shop where we ship world wide and need to devide the wold as follows, All countries in Europe in one redgion and the rest of the world in another for the shipping rates.

    Is there anywhere I can copy and paste the Iso codes for all countries so that I don't have to write them all by hand into the zencart?

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: Getting the ISO codes for all countries?

    Its already there in the countries table
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Oct 2006
    Posts
    11
    Plugin Contributions
    0

    Default Re: Getting the ISO codes for all countries?

    Quote Originally Posted by superprg
    Its already there in the countries table
    I saw that but I would need them as a list with commas to paste into zones for the "zone rates" shipping module.

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

    Default Re: Getting the ISO codes for all countries?

    I just made a fix for the next release coming out for Zen Cart that addresses this issue ...

    Let's say you use zones.php for shipping ... but you want a few zones with different settings and the rest of the world uses another set of settings ...

    Instead of typing in ALL zillion zones, you can just type in:
    00

    To do this, edit the file:
    /includes/modules/shipping/zones.php

    Find the code:
    PHP Code:
          for ($i=1$i<=$this->num_zones$i++) {
            
    $countries_table constant('MODULE_SHIPPING_ZONES_COUNTRIES_' $i);
            
    $countries_table strtoupper(str_replace(' '''$countries_table));
            
    $country_zones split("[,]"$countries_table);
            if (
    in_array($dest_country$country_zones)) {
              
    $dest_zone $i;
              break;
            }
          } 
    Change it to read:
    PHP Code:
          for ($i=1$i<=$this->num_zones$i++) {
            
    $countries_table constant('MODULE_SHIPPING_ZONES_COUNTRIES_' $i);
            
    $countries_table strtoupper(str_replace(' '''$countries_table));
            
    $country_zones split("[,]"$countries_table);
            if (
    in_array($dest_country$country_zones)) {
              
    $dest_zone $i;
              break;
            }
            if (
    in_array('00'$country_zones)) {
              
    $dest_zone $i;
              break;
            }
          } 
    See if that doesn't help you out ...
    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!]
    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!

 

 

Similar Threads

  1. ISO codes for australia post zones
    By tpeck in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 11 Oct 2008, 03:12 AM
  2. replace ISO codes for country codes
    By froldao in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 May 2008, 05:39 PM
  3. ISO Codes For States?
    By naitsirhc26 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 May 2007, 04:33 AM
  4. Cut & Paste International ISO Codes for Zone Rate Shipping
    By shannda in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 6 Sep 2006, 07:03 AM

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