If you "assume" that any products_id that is in categories_id 15 uses master_categories_id 15 ...
You can add a filter on the UPS Shipping Module where if 1 or more products_id are using master_categories_id 15 then UPS will show ... otherwise, it will not be active or be hidden from the checkout_shipping ...
You can customize the ups.php code by adding below this code:
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
}
to read:
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);
}
// disable for one master_categories_id
if ((IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','15') > 0)) {
// show UPS
$this->enabled = true;
} else {
// hide UPS
$this->enabled = false;
}
Now, UPS will only show if at least 1 master_categories_id is 15 ...
However, if you want to turn OFF all of the other shipping modules when there is 1 or more products_id in the categories_id 15 with the same type of test, you can alter the logic to make them NOT show ...
Bookmarks