comoros_174_1.cif 958 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. function comoros_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' => 174,
  8. 'country_name' => 'Comoros',
  9. 'country_iso_code_2' => 'KM',
  10. 'country_iso_code_3' => 'COM',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(174, 'A', 'Anjouan'),
  17. array(174, 'G', 'Grande Comore'),
  18. array(174, 'M', 'Moheli'),
  19. );
  20. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  21. foreach ($zones as $zone) {
  22. $query->values($zone);
  23. }
  24. $query->execute();
  25. // Set address format
  26. uc_set_address_format(
  27. 174,
  28. "!company\r\n".
  29. "!first_name !last_name\r\n".
  30. "!street1\r\n".
  31. "!street2\r\n".
  32. "!city, !zone_name !postal_code\r\n".
  33. "!country_name_if"
  34. );
  35. }