function brunei_install() {
db_query("INSERT INTO {uc_countries} (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES (96, 'Brunei', 'BN', 'BRN', 1)");
$zones = array(
array(96, 'BN-BE', 'Belait'),
array(96, 'BN-BM', 'Brunei-Muara'),
array(96, 'BN-TE', 'Temburong'),
array(96, 'BN-TU', 'Tutong'),
);
foreach ($zones as $zone) {
db_query("INSERT INTO {uc_zones} (zone_country_id, zone_code, zone_name) VALUES (%d, '%s', '%s')", $zone);
}
uc_set_address_format(96,
"!company\r\n!first_name !last_name\r\n!street1\r\n!street2"
."\r\n!city !postal_code\r\n!zone_name\r\n!country_name_if");
}
Comments
Comment #1
tr commentedDo you know if that is the correct address format for Brunei? There is already a Brunei .cif in the Drupal 7 version of Ubercart, but it has a slightly different address format. If yours is correct, I will have to modify the Drupal 7 version also.
The Drupal 7 version has the following:
You see the only difference is where the city, zone_name, and postal_code appear in the address.
Comment #2
seakayjay commentedThe correct format should be !city !postal_code and then !zone_name.
The postal code is right after city name without any comma ( , ).
Using !zone_code is not common in Brunei.
Comment #3
tr commentedOK. Fixed. Notice I made it version 2 because I will have to update the version 1 that is already in Ubercart 7.x-3.x. The versions need to be consistent.