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

tr’s picture

Do 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:

  uc_set_address_format(
    96,
    "!company\r\n".
    "!first_name !last_name\r\n".
    "!street1\r\n".
    "!street2\r\n".
    "!city, !zone_name  !postal_code\r\n".
    "!country_name_if"
  );

You see the only difference is where the city, zone_name, and postal_code appear in the address.

seakayjay’s picture

The 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.

tr’s picture

Status: Needs review » Fixed

OK. 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.