Index: branches/5.1.x/units/shipping_quote_engines/custom_shipping_quote_engine.php =================================================================== diff -u -N -r13100 -r13465 --- branches/5.1.x/units/shipping_quote_engines/custom_shipping_quote_engine.php (.../custom_shipping_quote_engine.php) (revision 13100) +++ branches/5.1.x/units/shipping_quote_engines/custom_shipping_quote_engine.php (.../custom_shipping_quote_engine.php) (revision 13465) @@ -1,6 +1,6 @@ Application->GetADODBConnection(); - $user_country_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=1 AND DestAbbr = '.$db->qstr($user_country_abbr)); - $user_state_id = (int) $db->GetOne('SELECT DestId FROM '.TABLE_PREFIX.'StdDestinations WHERE DestType=2 AND DestAbbr = '.$db->qstr($user_state_abbr)); + $cs_helper =& $this->Application->recallObject('CountryStatesHelper'); + /* @var $cs_helper kCountryStatesHelper */ + + $user_country_id = $cs_helper->getCountryStateId($user_country, DESTINATION_TYPE_COUNTRY); + $user_state_id = $cs_helper->getCountryStateId($user_state, DESTINATION_TYPE_STATE); + $user_zip = (string) $user_zip; $weight = (float) $weight; $items = (int) $items;