http://www.zen-cart.com/forum/showpo...44&postcount=5
http://www.zen-cart.com/forum/showpo...97&postcount=9
These 2 posts discuss something akin to the following code, which is inserted into the constructor method of each of the shipping modules you want restrictions to occur in.
Basically this example looks up the "products_model" field from the data in the products in the cart, to check for certain match combinations, and enables the module if those are found.
You could do similarly using something like the products_id field and disabling the module instead (with false instead of true):
Code:
if (IS_ADMIN_FLAG == false) {
if ($_SESSION['cart']->in_cart_check('products_model','NAV') > 4) && $_SESSION['cart']->in_cart_check('products_model','MP') > 0) ) {
$this->enabled = true;
}
Other semi-related discussions:
http://www.zen-cart.com/forum/showth...104#post781104
http://www.zen-cart.com/forum/showthread.php?t=133190
http://www.zen-cart.com/forum/showthread.php?t=126162
(Or you could use the get_products() or get_product_id_list() methods and do your own looping instead.)