PDA

View Full Version : Fix for UPS XML



met00
04-11-2008, 12:23 PM
If you have a large zones file you will run into a simple problem...


$zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "'" );


so what if your zone file contains say TWO "Maryland"'s (One in Liberia and one in the US)


$zone_query = tep_db_query("select zone_code from " . TABLE_ZONES . " where zone_name = '" . $order->delivery['state'] . "' and zone_country_id = '".$order->delivery['country']['id']."'");

Simple fix to it sending over an invalid state id of ML instead of MD.