saint_kitts_nevis_659_1.cif 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. function saint_kitts_nevis_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' => 659,
  8. 'country_name' => 'Saint Kitts and Nevis',
  9. 'country_iso_code_2' => 'KN',
  10. 'country_iso_code_3' => 'KNA',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(659, 'CCN', 'Christ Church Nichola Town'),
  17. array(659, 'ASP', 'Saint Anne Sandy Point'),
  18. array(659, 'GBA', 'Saint George Basseterre'),
  19. array(659, 'GGI', 'Saint George Gingerland'),
  20. array(659, 'JWI', 'Saint James Windward'),
  21. array(659, 'JCA', 'Saint John Capisterre'),
  22. array(659, 'JFI', 'Saint John Figtree'),
  23. array(659, 'MCA', 'Saint Mary Cayon'),
  24. array(659, 'PCA', 'Saint Paul Capisterre'),
  25. array(659, 'PCH', 'Saint Paul Charlestown'),
  26. array(659, 'PBS', 'Saint Peter Basseterre'),
  27. array(659, 'TLO', 'Saint Thomas Lowland'),
  28. array(659, 'TMI', 'Saint Thomas Middle Island'),
  29. array(659, 'TPP', 'Trinity Palmetto Point'),
  30. );
  31. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  32. foreach ($zones as $zone) {
  33. $query->values($zone);
  34. }
  35. $query->execute();
  36. // Set address format
  37. uc_set_address_format(
  38. 659,
  39. "!company\r\n".
  40. "!first_name !last_name\r\n".
  41. "!street1\r\n".
  42. "!street2\r\n".
  43. "!city, !zone_name !postal_code\r\n".
  44. "!country_name_if"
  45. );
  46. }