Changing the code from:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
to read:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
global $cart;
// disable when manufacturers_id = 3 is in cart for 1 or more products or number of items > 3
if (IS_ADMIN_FLAG == false && ($_SESSION['cart']->in_cart_check('manufacturers_id','3') > 0 || $_SESSION['cart']->count_contents() > 3) ) {
$this->enabled = false;
}
will disable Flat Rate flat when 1 or more Products are in the cart using manufacturers_id = 3 ... or the item count > 3 ...
Bookmarks