MYSQL Snippet for ec_region configuration of countries

The flexibility of the eCommerce modules is one of it's core strengths, however, there are occasions when it would be useful to have a collection of MYSQL snippets that saves time when configuring an eCommerce shop. One such occasion is setting up regions, which is a wonderful feature, but, takes a while to configure all the countries.

This MYSQL snippet sets up the following shipping regions for your eCommerce shop:

  1. Ireland
  2. UK & Northern Ireland
  3. European Union
  4. Europe (Other)
  5. United States & Canada
  6. Australia & New Zealand

Notes

This region configuration was designed for an ecommerce shop based in Ireland (Client: tuesdayschildalbum.com) so the client could specify postage and shipping rates per region using the ec_charge.module. The above are the obvious/expected core regions that customers were likely to be from when visiting that music shop.

Countries not included would fall into the Rest of The World charges category. You can obviously edit the Ireland region and add it to the European Union region once you have executed the snippet.

Usage
Only use this snippet if you have not setup any regions yet and the eC_regions.module is enabled. It will save you about 30 minutes if you were to setup the regions manually.

  1. Open your database in PHPMYADMIN or another database manager
  2. Backup your existing database by clicking on the EXPORT tab and saving the database to your local drive.
  3. Click on the SQL tab
  4. Copy & paste the following snippet into the textarea provided for SQL queries
  5. Click on GO
  6. You should receive a "Your SQL query has been executed successfully" message
  7. Open your Drupal eCommerce Configuration screens and click on REGIONS. You will now have all the above regions setup for shipping
  8. Edit/change to suit


------------------------------------------------------------------------
INSERT INTO `ec_region` VALUES(1, 'UK & Northern Ireland', 'fl_shipping');
INSERT INTO `ec_region` VALUES(2, 'Ireland', 'fl_shipping');
INSERT INTO `ec_region` VALUES(3, 'European Union', 'fl_shipping');
INSERT INTO `ec_region` VALUES(4, 'Europe (Other)', 'fl_shipping');
INSERT INTO `ec_region` VALUES(5, 'United States & Canada', 'fl_shipping');
INSERT INTO `ec_region` VALUES(6, 'Australia & New Zealand', 'fl_shipping');

INSERT INTO `ec_region_configuration` VALUES(1, 'country', 'uk');
INSERT INTO `ec_region_configuration` VALUES(2, 'country', 'ie');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'at');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'be');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'bg');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'cy');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'cz');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'de');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'dk');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'ee');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'es');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'fi');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'fr');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'gr');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'hu');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'it');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'lt');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'lu');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'lv');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'mt');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'nl');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'pl');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'pt');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'se');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'si');
INSERT INTO `ec_region_configuration` VALUES(3, 'country', 'sk');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'ad');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'al');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'ba');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'by');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'ch');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'cs');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'fo');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'ge');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'gi');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'gl');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'hr');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'is');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'li');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'mc');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'md');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'no');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'ru');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'sm');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'tr');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'ua');
INSERT INTO `ec_region_configuration` VALUES(4, 'country', 'va');
INSERT INTO `ec_region_configuration` VALUES(5, 'country', 'ca');
INSERT INTO `ec_region_configuration` VALUES(5, 'country', 'us');
INSERT INTO `ec_region_configuration` VALUES(6, 'country', 'au');
INSERT INTO `ec_region_configuration` VALUES(6, 'country', 'nz');
------------------------------------------------------------------------

Comments

ซื้อขายลง

ซื้อขายลงโฆษณาฟรีขายสินค้าฟรี อ่านเรื่องย่อซีรีย์เกาหลีละครเกาหลี ออกกำลังกายดูแลสุขภาพกินอาหารที่มีประโยชน์ รถตู้เช่าไปเที่ยวปายหน้าหนาว ดูทีวีย้อนหลัง Blog การลงทุน battery duracell free stuff online classified facial hair laser removalTags: