togo_768_1.cif 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. function togo_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' => 768,
  8. 'country_name' => 'Togo',
  9. 'country_iso_code_2' => 'TG',
  10. 'country_iso_code_3' => 'TGO',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(768, 'TG-C', 'Centre'),
  17. array(768, 'TG-K', 'Kara'),
  18. array(768, 'TG-M', 'Maritime (Région)'),
  19. array(768, 'TG-P', 'Plateaux'),
  20. array(768, 'TG-S', 'Savannes'),
  21. );
  22. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  23. foreach ($zones as $zone) {
  24. $query->values($zone);
  25. }
  26. $query->execute();
  27. // Set address format
  28. uc_set_address_format(
  29. 768,
  30. "!company\r\n".
  31. "!first_name !last_name\r\n".
  32. "!street1\r\n".
  33. "!street2\r\n".
  34. "!city, !zone_name !postal_code\r\n".
  35. "!country_name_if"
  36. );
  37. }