PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Ubercart Country Add State

June7

The country United Arab Emirates states are listed wrongly, to correct I went directly to table uc_zones and corrected.  It is easy to add a state or emirate, modify or change the state spelling etc.

I have also modified the united_arab_emirates_784_1.cif to fit in the correct emirates or state. Note this file is located in the drupal modules folder domain (root folder) -> modules ->ubercart -> uc_store -> countries.

<?php
// $Id: united_arab_emirates_784_1.cif,v 1.2.2.5 2009/07/21 14:51:20 islandusurper Exp $

function united_arab_emirates_install() {

db_query(”INSERT INTO {uc_countries} VALUES (784, ‘United Arab Emirates’, ‘AE’, ‘ARE’, 1)”);

// Make the entries in the zones table.
$zones = array(
array(784, ‘DXB’, ‘Dubai’),
array(784, ‘SHJ’, ‘Sharjah’),
array(784, ‘ABU’, ‘Abu dhabi’),
array(784, ‘AJM’, ‘Ajman’),
array(784, ‘RAS’, ‘Ras Al Khaimah’),
array(784, ‘UAQ’, ‘Umm Al Quwain’),
array(784, ‘FUJ’, ‘Fujairah’),
);

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(784,
“!company\r\n!first_name !last_name\r\n!street1\r\n!street2″
.”\r\n!city, !zone_code\r\n!country_name_if”);
}

function united_arab_emirates_update($version) {
}

function united_arab_emirates_uninstall() {
}
?>

posted under Drupal, Ubercart

Email will not be published

Website example

Your Comment:

 

12,831 spam comments
blocked by
Akismet