You could use the code:
Code:
global $cart;
$chk_products15 = $_SESSION['cart']->in_cart_check('products_id','15');
$chk_products16 = $_SESSION['cart']->in_cart_check('products_id','16');
$chk_products42 = $_SESSION['cart']->in_cart_check('products_id','42');
$chk_products43 = $_SESSION['cart']->in_cart_check('products_id','43');
$skip_type = false;
if ( ($type == 'Express Mail International (EMS) Flat-Rate Envelope' || $type == 'Priority Mail International Flat-Rate Envelope') && ($chk_products15 + $chk_products16 + $chk_products42 + $chk_products43) > 0) {
$skip_type = true;
}
if ( ($type == 'First Class Mail International Package' ) && ($chk_products42 + $chk_products43) > 0) {
$skip_type = true;
}
if ($skip_type) {
// do not show excluded shipping types
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}
Bookmarks