I am using 1.3.8, ups shipping only, and I have the file: /module/shipping/ups.php -I have tried everything from other posts for about 4 hrs. now and none of them address/fix my specific need. I believe I need to insert a--> global $cart check for master_categories_id '2', to only allow 2 day/Overnight shipping if anything from that category is in the cart. I cannot seem to find the right code, ...or the right place to put it. Here is some of the ups.php code to help identify where and what I need to place the needed code:

global $order, $db, $template;

$this->code = 'ups';
$this->title = MODULE_SHIPPING_UPS_TEXT_TITLE;
$this->description = MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_UPS_SORT_ORDER;
$this->icon = $template->get_template_dir('shipping_ups.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'shipping_ups.gif';
$this->tax_class = MODULE_SHIPPING_UPS_TAX_CLASS;
$this->tax_basis = MODULE_SHIPPING_UPS_TAX_BASIS;

// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);
}

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_UPS_ZONE > 0) ) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}

if ($check_flag == false) {
$this->enabled = false;
}
}

$this->types = array('1DM' => 'Next Day Air Early AM',
'1DML' => 'Next Day Air Early AM Letter',
'1DA' => 'Next Day Air',
'1DAL' => 'Next Day Air Letter',
'1DAPI' => 'Next Day Air Intra (Puerto Rico)',
'1DP' => 'Next Day Air Saver',
'1DPL' => 'Next Day Air Saver Letter',
'2DM' => '2nd Day Air AM',
'2DML' => '2nd Day Air AM Letter',
'2DA' => '2nd Day Air',
'2DAL' => '2nd Day Air Letter',
'3DS' => '3 Day Select',
'GND' => 'Ground',
'GNDCOM' => 'Ground Commercial',
'GNDRES' => 'Ground Residential',
'STD' => 'Canada Standard',
'XPR' => 'Worldwide Express',
'XPRL' => 'worldwide Express Letter',
'XDM' => 'Worldwide Express Plus',
'XDML' => 'Worldwide Express Plus Letter',
'XPD' => 'Worldwide Expedited',
'WXS' => 'Worldwide Saver');
}

THANKS!