You would be altering the shipping module for UPS:
/includes/modules/shipping/ups.php
You need to know how many products are in the order are from categories_id 65 ...
The master_categories_id in the products table will contain the value 65 for this categories_id if it is the master_categories_id or if you do not use Linked Products and this is the only Category that the crabs are in ...
If you want to turn off various shipping methods of the ups.php shipping module you need to know:
1 are there 1 or more products from this category ...
2 are all of the products in the cart from this category ...
The quote is built with this section of the code:
$methods[] = array('id' => $type,
'title' => $this->types[$type],
'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
The $type is the method of ups about to be quoted ...
$type will be:
2DA for 2nd day
GND for ground
You can get the count of what's in the cart with:
// EOF: UPS USPS
global $cart;
$how_many_items = $_SESSION['cart']->count_contents();
$how_many_crabs = $_SESSION['cart']->in_cart_check('master_categories_id','65');;
echo 'I am type: ' . $type . ' how many items: ' . $how_many_items . ' how many are crabs: ' . $how_many_crabs . '<br>';
$methods[] = array('id' => $type,
'title' => $this->types[$type],
'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
The echo just displays some text when the module is run so you can see the counts based on what is in the cart and how many total items are there and how many are crabs ...
You can use the two values to determine if all the items in the cart are crabs or if there are any crabs in the cart ...
Now, you can use the $type to control when to build the shipping method and when to skip it ...