germany_276_1.cif 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. function germany_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' => 276,
  8. 'country_name' => 'Germany',
  9. 'country_iso_code_2' => 'DE',
  10. 'country_iso_code_3' => 'DEU',
  11. 'version' => 1,
  12. ))
  13. ->execute();
  14. // Make the entries in the zones table.
  15. $zones = array(
  16. array(276, 'BAW', 'Baden-Württemberg'),
  17. array(276, 'BAY', 'Bayern'),
  18. array(276, 'BER', 'Berlin'),
  19. array(276, 'BRG', 'Brandenburg'),
  20. array(276, 'BRE', 'Bremen'),
  21. array(276, 'HAM', 'Hamburg'),
  22. array(276, 'HES', 'Hessen'),
  23. array(276, 'MEC', 'Mecklenburg-Vorpommern'),
  24. array(276, 'NDS', 'Niedersachsen'),
  25. array(276, 'NRW', 'Nordrhein-Westfalen'),
  26. array(276, 'RHE', 'Rheinland-Pfalz'),
  27. array(276, 'SAR', 'Saarland'),
  28. array(276, 'SAS', 'Sachsen'),
  29. array(276, 'SAC', 'Sachsen-Anhalt'),
  30. array(276, 'SCN', 'Schleswig-Holstein'),
  31. array(276, 'THE', 'Thüringen'),
  32. );
  33. $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  34. foreach ($zones as $zone) {
  35. $query->values($zone);
  36. }
  37. $query->execute();
  38. // Set address format
  39. uc_set_address_format(
  40. 276,
  41. "!company\r\n".
  42. "!first_name !last_name\r\n".
  43. "!street1\r\n".
  44. "!street2\r\n".
  45. "!postal_code !city\r\n".
  46. "!country_name_if"
  47. );
  48. }