Known compatibility: ISC 5.0.5
Open: /admin/includes/classes/class.shipments.php
Find:
Code: Select all
$GLOBALS['BillingAddress'] = ISC_ADMIN_ORDERS::BuildOrderAddressDetails($addressDetails, false);
Code: Select all
// MOD Abbrev USA State - Shipping only.
/*
* Generates 2 letter state code for USA orders and append to zip code
* Also removes the state full text if valid state found.
*
*/
if($shipmentDetails[$addressColumnPrefix.'shipcountryid'] == 226) {
// Get the abbreviation
$query = "SELECT stateabbrv FROM [|PREFIX|]country_states WHERE stateid = ". $shipmentDetails[$addressColumnPrefix.'shipstateid'];
$query .= $GLOBALS['ISC_CLASS_DB']->AddLimit(0, 1);
$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
if($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
$shipmentDetails[$addressColumnPrefix.'shipzip'] = $row['stateabbrv']." ".$shipmentDetails[$addressColumnPrefix.'shipzip'];
$shipmentDetails[$addressColumnPrefix.'shipstate'] = '';
}
}
// END MOD.