Replace the function table in the table.php file with this new code:
Code:
function table() {
global $order, $db;
$this->code = 'table';
$this->title = MODULE_SHIPPING_TABLE_TEXT_TITLE;
$this->description = MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS;
$this->tax_basis = MODULE_SHIPPING_TABLE_TAX_BASIS;
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
}
if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE_ZONE > 0) ) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE_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 = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$this->enabled = false;
}
}
// do not show if products from master_categories_id 3 and 39 are in the cart together
global $cart;
if (!IS_ADMIN_FLAG && ($_SESSION['cart']->in_cart_check('master_categories_id','3') > 0 && $_SESSION['cart']->in_cart_check('master_categories_id','39') > 0)) {
$this->enabled = false;
}
}
/**
See if that works better for you ...
Bookmarks