Let's say you have 3 master_category_id values for the specific Categories that are no suppose to use UPS ...
You can test for these Products by using in the file:
/includes/modules/shipping/upsxml.php
Add the code in RED and set the master_categories_id to the Categories that you do not want to use the UPS shipping for ... if you need more Categories, just add additional lines for them ...
Code:
// bof: test for not allowed categories 10, 12 and 15
if (!IS_ADMIN_FLAG) {
$chk_cat = 0;
// check how many Products are in the cart for master_categories_id 10 and 12
$chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','10');
$chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','12');
$chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','15');
// if any are found turn off the shipping module
if ($chk_cat > 0) {
$this->enabled = false;
}
}
// eof: test for not allowed categories 10, 12 and 15
if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {
then, whether you use the Table Rate table or another shipping module, you can use similar code and just change the test ...
Bookmarks