Assuming your values are 0 or 1 for product_ships_UPS_only where 1 means yes only UPS, you could use the code below in RED in the file:
/includes/modules/shipping/usps.php
Code:
global $template, $current_page_base;
// CUSTOMIZED CONDITIONS GO HERE
// Optionally add additional code here to change $this->enabled to false based on whatever custom rules you require.
// -----
// bof: check cart for UPS only products
$ups_only = $_SESSION['cart']->in_cart_check('product_ships_UPS_only','1');
if ($ups_only) {
$this->enabled = false;
}
// eof: check cart for UPS only products
// -----
// eof: optional additional code
}
$this->notify('NOTIFY_SHIPPING_USPS_UPDATE_STATUS');
You can adapt something like that for UPS, but I have not looked at it yet ...
Bookmarks