Are you offering all shipping methods or just some?
NOTE: Looking at your site, categories_id 72 is a Top Level Category not a Category with Products so it really isn't a master_categories_id ...
Are you offering all shipping methods or just some?
NOTE: Looking at your site, categories_id 72 is a Top Level Category not a Category with Products so it really isn't a master_categories_id ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Like i said, New to this. I only want to allow Media Mail for that top level Category only.
The media does not, however, need to be restricted to ONLY media mail.
All of our other items are eligible for every shipping method except media mail.
Thank you for taking the time to help me.
You could use this for those two master_categories_id values:
if ($type == 'MEDIA' && (($_SESSION['cart']->in_cart_check('master_categories_id','10') + $_SESSION['cart']->in_cart_check('master_categories_id','12')) != $_SESSION['cart']->count_contents())) {
// skip MEDIA when whole cart is not from master_categories_id 10
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Will this work?
and how much is that going to slow down my shipping module? is there a way to make it work on the top level category and all subcategories?PHP Code:if ($type == 'MEDIA' && (($_SESSION['cart']->in_cart_check('master_categories_id','74') + $_SESSION['cart']->in_cart_check('master_categories_id','75') + $_SESSION['cart']->in_cart_check('master_categories_id','76') + $_SESSION['cart']->in_cart_check('master_categories_id','77') + $_SESSION['cart']->in_cart_check('master_categories_id','78') + $_SESSION['cart']->in_cart_check('master_categories_id','79') + $_SESSION['cart']->in_cart_check('master_categories_id','80') + $_SESSION['cart']->in_cart_check('master_categories_id','81') + $_SESSION['cart']->in_cart_check('master_categories_id','82') + $_SESSION['cart']->in_cart_check('master_categories_id','83') + $_SESSION['cart']->in_cart_check('master_categories_id','84') + $_SESSION['cart']->in_cart_check('master_categories_id','85') + $_SESSION['cart']->in_cart_check('master_categories_id','86') + $_SESSION['cart']->in_cart_check('master_categories_id','87') + $_SESSION['cart']->in_cart_check('master_categories_id','88') + $_SESSION['cart']->in_cart_check('master_categories_id','89') + $_SESSION['cart']->in_cart_check('master_categories_id','90') + $_SESSION['cart']->in_cart_check('master_categories_id','91') + $_SESSION['cart']->in_cart_check('master_categories_id','92') + $_SESSION['cart']->in_cart_check('master_categories_id','93') + $_SESSION['cart']->in_cart_check('master_categories_id','94') + $_SESSION['cart']->in_cart_check('master_categories_id','95') + $_SESSION['cart']->in_cart_check('master_categories_id','12')) != $_SESSION['cart']->count_contents())) {
// skip MEDIA when whole cart is not from master_categories_id 10
} else {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}