pakistan_586_1.cif 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. function pakistan_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' => 586,
  8. 'country_name' => 'Pakistan',
  9. 'country_iso_code_2' => 'PK',
  10. 'country_iso_code_3' => 'PAK',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table. Use %d for the zone_id and the
  15. // VALUES = Parent Country ID, Zone Abbreviation, Zone Name
  16. $zones = array(
  17. array(586, 'PB', 'Punjab'),
  18. array(586, 'SN', 'Sindh'),
  19. array(586, 'BL', 'Balochistan'),
  20. array(586, 'NW', 'N.W.F.P'),
  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. 586,
  30. "!company\r\n".
  31. "!first_name !last_name\r\n".
  32. "!street1\r\n".
  33. "!street2\r\n".
  34. "!city, !zone_code\r\n".
  35. "!country_name_if"
  36. );
  37. }