hong_kong_344_1.cif 903 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. function hong_kong_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' => 344,
  8. 'country_name' => 'Hong Kong',
  9. 'country_iso_code_2' => 'HK',
  10. 'country_iso_code_3' => 'HKG',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(344, 'HK', 'Hong Kong'),
  17. array(344, 'NT', 'New Territories'),
  18. );
  19. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  20. foreach ($zones as $zone) {
  21. $query->values($zone);
  22. }
  23. $query->execute();
  24. // Set address format
  25. uc_set_address_format(
  26. 344,
  27. "!company\r\n".
  28. "!first_name !last_name\r\n".
  29. "!street1\r\n".
  30. "!street2\r\n".
  31. "!zone_name, !country_name"
  32. );
  33. }