In that same file, a few lines lower, is a function for update_status(). Add your shipping-module check there by adding the new code shown:```
function update_status() {
global $order, $db;
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
$check_flag = false;
$check_query = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
while (!$check_query->EOF) {
if ($check_query->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check_query->fields['zone_id'] == $order->billing['zone_id']) {
$check_flag = true;
break;
}
$check_query->MoveNext();
}
[B] // disable for certain shipping module only:
if ($_SESSION['shipping'] == 'name_of_code_from_shipping_module') $check_flag = false;
[/B]
if ($check_flag == false) {
$this->enabled = false;
}
}
}
Granted, if your shipping module generates various different $_SESSION['shipping'] values depending on which offered service the customer selects, you may have to alter the logic in that "if" statement to accomodate.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.