You’re here because you want to run UPS XML for Zen Cart with zones. It configures ok if you have no zones set, but as soon as you add a zone it displays the “unconfigured” yellow icon.
The admin and the catalog both use the same code to determine if a UPS rate exists. The problem is, the admin doesn’t care about where that zone is, but the shipping checkout wants it to match the recipient’s zone. So by definition the admin can never be configured because it never matches an empty “order” zone, there’s no concept of an order on the admin end but the admin will not mark the UPS xml as “configured” until it matches this ghost zone.
It might configure ok in your store, but only if it’s set to “no zone,” which means it’ll show up for any destination whether you want it to or not. As soon as you try to add a zone it refuses to configure.
The fact is that whole paragraph of code was off, I wonder if people are using this module successfully. There’s NO WAY you could ever have configured it to do zones!
Change includes/modules/shipping/upsxml.php (upsxml.php,v 1.1.4 2004/12/19) right after the curl code setup to the following:
if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {
$this->enabled=false;
if (empty($order->delivery['country']['id'])) {
$admin=true; }else{$admin=false;
}
/*
$check = $db->Execute(”select zone_id from ” . TABLE_ZONES_TO_GEO_ZONES . ” where geo_zone_id = ‘” . MODULE_SHIPPING_UPSXML_RATES_ZONE . “‘ and zone_country_id = ‘” . $order->delivery['country']['id'] . “‘ order by zone_id”);
*/
if ($admin) {
$sql = “select zone_id from ” . TABLE_ZONES_TO_GEO_ZONES . ” where geo_zone_id = ‘” . MODULE_SHIPPING_UPSXML_RATES_ZONE.”‘”;
} else {
$sql = “select zone_id from ” . TABLE_ZONES_TO_GEO_ZONES . ” where zone_id=’”. $order->delivery['zone_id'] . “‘ and geo_zone_id = ‘” . MODULE_SHIPPING_UPSXML_RATES_ZONE . “‘”;
}
$check = $db->Execute($sql);
if (!$check->EOF) {
$this->enabled = true;
}
}

