OK, I've finally gotten this module to work with the ability to set a shipping zone that causes the module to be DISABLED. If the shipping address is IN the shipping zone, this module is DISABLED. If the shipping address is NOT IN the shipping zone, this module is ENABLED.
I've attached an updated rfq.php file with all the above corrections and my corrections. This is for Zen-Cart 1.38a.
Here's my corrections:
Starting at line 40 replace this code:
Code:
$check_flag = true;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id <> '" . MODULE_SHIPPING_RFQ_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check ->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = false;
break;
}
$check->MoveNext();
}
With this code:
Code:
$check_flag = true;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id <> '" . MODULE_SHIPPING_RFQ_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check ->EOF) {
if ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = false;
break;
}
$check->MoveNext();
}
WOO HOO!