bolivia_68_1.cif 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. function bolivia_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' => 68,
  8. 'country_name' => 'Bolivia, Plurinational State of',
  9. 'country_iso_code_2' => 'BO',
  10. 'country_iso_code_3' => 'BOL',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(68, 'BO-C', 'Cochabamba'),
  17. array(68, 'BO-H', 'Chuquisaca'),
  18. array(68, 'BO-B', 'El Beni'),
  19. array(68, 'BO-L', 'La Paz'),
  20. array(68, 'BO-O', 'Oruro'),
  21. array(68, 'BO-N', 'Pando'),
  22. array(68, 'BO-P', 'Potosí'),
  23. array(68, 'BO-S', 'Santa Cruz'),
  24. array(68, 'BO-T', 'Tarija'),
  25. );
  26. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  27. foreach ($zones as $zone) {
  28. $query->values($zone);
  29. }
  30. $query->execute();
  31. // Set address format
  32. uc_set_address_format(
  33. 68,
  34. "!company\r\n".
  35. "!first_name !last_name\r\n".
  36. "!street1\r\n".
  37. "!street2\r\n".
  38. "!city, !zone_name !postal_code\r\n".
  39. "!country_name_if"
  40. );
  41. }