You could use something like this code, for example say you were customizing the:
/includes/modules/shipping/flat.php
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
// bof: skip certain products_id and disable they are in the cart
if (IS_ADMIN_FLAG == false) {
global $cart;
$chk_skip_products = 0;
$chk_skip_products += $_SESSION['cart']->in_cart_check('products_id','1');
$chk_skip_products += $_SESSION['cart']->in_cart_check('products_id','38');
$chk_skip_products += $_SESSION['cart']->in_cart_check('products_id','39');
if ($chk_skip_products > 0) {
$this->enabled = false;
}
}
// eof: skip certain products_id and disable they are in the cart
You can add more or less products_id by copying the pattern ...