Thank you for the help.
Here it is
$methods = array();
// BOF: UPS USPS
$allowed_methods = explode(", ", MODULE_SHIPPING_UPS_TYPES);
$std_rcd = false;
// EOF: UPS USPS
$qsize = sizeof($upsQuote);
for ($i=0; $i<$qsize; $i++) {
list($type, $cost) = each($upsQuote[$i]);
// BOF: UPS USPS
if ($type=='STD') {
if ($std_rcd) continue;
else $std_rcd = true;
}
if (!in_array($type, $allowed_methods)) continue;
// EOF: UPS USPS
$cost = preg_replace('/[^0-9.]/', '', $cost);
// bof: customize for extra charges
global $cart;
$chk_perishables = 0;
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','11');
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','5');
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','6');
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','7');
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','8');
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','9');
$chk_perishables += $_SESSION['cart']->in_cart_check('master_categories_id','10');
// continue adding for more categories
$perishables_handling = 0;
$perishables_handling = (.75 * $chk_perishables);
// add extra handling
}
// add $perishables_handling to cost
$methods[] = array('id' => $type,
'title' => $this->types[$type],
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) + $perishables_handling );
// eof: customize for extra charges
$methods[] = array('id' => $type,
'title' => $this->types[$type],
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) );
}
$this->quotes['methods'] = $methods;