ok, I will worry about the sub sub cats in a bit
To start I have added:
PHP 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: skip Products in any subcategory for parents_id 486
$subcategories_array = array();
$chk_cat = '486'; // parent categories_id
$chk_cart = 0;
zen_get_subcategories($subcategories_array, $chk_cat);
for ($i=0, $n=sizeof($subcategories_array); $i<$n; $i++ ) {
$chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id', $subcategories_array[$i]);
}
//echo 'USPS products in parent category 486: ' . $chk_cart . '<br>';
// eof: skip Products in any subcategory for parents_id 486
for ($i=0; $i<$PackageSize; $i++) {
I also have this code in place
PHP Code:
$show_hiddenCost = '';
// bof: test contents for Media Mail
if ($type == 'Media Mail Parcel' && $skip_media) {
// skip Media Mail
} else {
$methods[] = array('id' => $type_rebuilt,
'title' => $title . $show_hiddenCost,
'cost' => $cost,
);
}
// eof: test contents for Media Mail
} else {
{
When I add a non media item, media mail is still offered. When I add a book from a sub cat and a non media item, media mail is still offered. Have I done something wrong? Should I be combining the code with what was posted in post #4?
Bookmarks