Take out those changes and use these changes:
Code:
// see below use of $chk_cart
// eof: example to block USPS Priority MailTM Small Flat Rate Box when anything from master_categories_id 12 or 15 are in the cart
// bof: turn off USPS if order > 75 First Class Mail Parcel
if ($_SESSION['cart']->total > 75) {
$skip_FirstClassMailParcel = true;
} else {
$skip_FirstClassMailParcel = false;
}
// eof: turn off USPS if order > 75 First Class Mail Parcel
for ($i=0; $i<$PackageSize; $i++) {
Code:
//$show_hiddenCost = ' $hiddenCost: ' . $hiddenCost;
$show_hiddenCost = '';
// bof: turn off USPS if order > 75 First Class Mail Parcel
if ($type_rebuilt != '' && $skip_FirstClassMailParcel && preg_match('#First\-Class Mail Parcel#i', $type_rebuilt)) {
//echo 'SKIP IT - $type_rebuilt: ' . $type_rebuilt . ' $type: ' . $type . ' preg: ' . preg_match('#First\-Class Mail Parcel#i') . '<br>';
// skip First Class Mail Parcel over 75
} else {
//echo 'SHOW IT - $type_rebuilt: ' . $type_rebuilt . ' $type: ' . $type . ' preg: ' . preg_match('#First\-Class Mail Parcel#i') . '<br>';
$methods[] = array('id' => $type_rebuilt,
'title' => $title . $show_hiddenCost,
'cost' => $cost,
'insurance' => $usps_insurance_charge,
);
}
// eof: turn off USPS if order > 75 First Class Mail Parcel
//echo 'setting insurance: ' . $usps_insurance_charge . '<br>';
} else {
Bookmarks