Let's say your master_categories_id are 10, 12 an 15 ...
You would add the code in RED around line 390:
Code:
// bof: test contents for Media Mail
$skip_media = false;
$chk_media = 0;
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','10');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','12');
$chk_media += $_SESSION['cart']->in_cart_check('master_categories_id','15');
if ($chk_media != $_SESSION['cart']->count_contents()) {
$skip_media = true;
}
// eof: test contents for Media Mail
for ($i=0; $i<$PackageSize; $i++) {
then, add the code in RED:
Code:
//$show_hiddenCost = ' $hiddenCost: ' . $hiddenCost;
$show_hiddenCost = '';
// bof: test contents for Media Mail
if ($type == 'MEDIA' && $skip_media) {
// skip Media Mail
} else {
$methods[] = array('id' => $type_rebuilt,
'title' => $title . $show_hiddenCost,
'cost' => $cost,
);
}
// eof: test contents for Media Mail
This should then stop Media unless all Products in the cart are Media ...
Bookmarks