rwanda_646_1.cif 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. function rwanda_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' => 646,
  8. 'country_name' => 'Rwanda',
  9. 'country_iso_code_2' => 'RW',
  10. 'country_iso_code_3' => 'RWA',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(646, 'RW-01', 'Ville de Kigali'),
  17. array(646, 'RW-02', 'Est'),
  18. array(646, 'RW-03', 'Nord'),
  19. array(646, 'RW-04', 'Ouest'),
  20. array(646, 'RW-05', 'Sud'),
  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. 646,
  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. }