netherlands_528_1.cif 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. function netherlands_install() {
  3. // Make the entry in the country table.
  4. // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  5. db_insert('uc_countries')
  6. ->fields(array(
  7. 'country_id' => 528,
  8. 'country_name' => 'Netherlands',
  9. 'country_iso_code_2' => 'NL',
  10. 'country_iso_code_3' => 'NLD',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(528, 'ZHL', 'Zuid-Holland'),
  17. array(528, 'NHL', 'Noord-Holland'),
  18. array(528, 'NBR', 'Noord-Brabant'),
  19. array(528, 'GLD', 'Gelderland'),
  20. array(528, 'UTR', 'Utrecht'),
  21. array(528, 'LIM', 'Limburg'),
  22. array(528, 'OVE', 'Overijssel'),
  23. array(528, 'FRL', 'Friesland'),
  24. array(528, 'GRO', 'Groningen'),
  25. array(528, 'DRE', 'Drenthe'),
  26. array(528, 'ZLD', 'Zeeland'),
  27. array(528, 'FLD', 'Flevoland'),
  28. );
  29. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  30. foreach ($zones as $zone) {
  31. $query->values($zone);
  32. }
  33. $query->execute();
  34. // Set address format
  35. uc_set_address_format(
  36. 528,
  37. "!company\r\n".
  38. "!first_name !last_name\r\n".
  39. "!street1\r\n".
  40. "!street2\r\n".
  41. "!postal_code !city\r\n".
  42. "!country_name_if"
  43. );
  44. }