Index: branches/5.1.x/units/orders/orders_config.php =================================================================== diff -u -r13156 -r13465 --- branches/5.1.x/units/orders/orders_config.php (.../orders_config.php) (revision 13156) +++ branches/5.1.x/units/orders/orders_config.php (.../orders_config.php) (revision 13465) @@ -1,6 +1,6 @@ Array( 'type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT %1$s - FROM '.TABLE_PREFIX.'StdDestinations - LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName - WHERE DestType = 1 - ORDER BY l%2$s_Translation', - 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM '.TABLE_PREFIX.'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 'USA' ), 'VAT' => Array('type' => 'float','formatter'=>'kFormatter','not_null'=>1,'default' => '0','format'=>'%01.2f'), @@ -365,12 +364,11 @@ 'ShippingZip' => Array('type' => 'string','not_null' => '1','default' => ''), 'ShippingCountry' => Array( 'type' => 'string', 'formatter' => 'kOptionsFormatter', - 'options_sql' => ' SELECT %1$s - FROM '.TABLE_PREFIX.'StdDestinations - LEFT JOIN '.TABLE_PREFIX.'Phrase ON '.TABLE_PREFIX.'Phrase.Phrase = '.TABLE_PREFIX.'StdDestinations.DestName - WHERE DestType = 1 - ORDER BY l%2$s_Translation', - 'option_key_field' => 'DestAbbr', 'option_title_field' => 'l%2$s_Translation', + 'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode + FROM '.TABLE_PREFIX.'CountryStates + WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' + ORDER BY Name', + 'option_key_field' => 'IsoCode', 'option_title_field' => 'Name', 'not_null' => 1, 'default' => 'USA' ), 'ShippingType' => Array('type' => 'int','formatter'=>'kOptionsFormatter','options_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'ShippingType WHERE Status = 1','option_key_field'=>'ShippingID','option_title_field'=>'Name', 'not_null' => 1, 'default' => 0),