Code:
// bof: check Product Qty in categories_id 25
$chk_cat = 0;
$chk_cats = $_SESSION['cart']->in_cart_check('master_categories_id','25');
// eof: check Product Qty in categories_id 25
for ($i=0; $i<$PackageSize; $i++) {
Code:
if ($this->usps_countries == 'US' && MODULE_SHIPPING_USPS_FIRST_CLASS_FILTER_US == 'True' && preg_match('#First\-Class#i', $type) && $cnt_first > 1) continue;
// bof: only show First Class/First-Class when entire cart is categories_id 25
if ($chk_cats != $_SESSION['cart']->count_contents() && preg_match('#First\-Class#i', $type)) {
// echo 'USPS skip $type: ' . $type . '<br>';
// skip First Class
} else {
// echo 'USPS DO NOT skip $type: ' . $type . '<br>';
$methods[] = array('id' => $type_rebuilt,
'title' => $title,
'cost' => $cost,
);
}
// eof: only show First Class/First-Class when entire cart is categories_id 25
Bookmarks