You could customize the code for:
/includes/modules/shipping/zones.php
and check the content in the cart and the Zone being used by changing the code:
Code:
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => $shipping_method,
'cost' => $shipping_cost)));
to be:
Code:
// check cart for Zone 2
$chk_cat = 0;
$chk_cat += $_SESSION['cart']->in_cart_check('products_id','115');
$chk_cat += $_SESSION['cart']->in_cart_check('products_id','112');
echo '$dest_zone: ' . $dest_zone . ' $chk_cat: ' . $chk_cat . '<br>';
if ($dest_zone == 2 and $chk_cat > 0) {
echo '<br>Products blocked in cart! ' . $chk_cat . '<br>';
} else {
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_ZONES_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => $shipping_method,
'cost' => $shipping_cost)));
}
if ($this->tax_class > 0) {
Now, Zone 2 will not display if products_id 115 or 112 are in the cart ...
If you need additional Products, just add another line, with the products_id:
Code:
$chk_cat += $_SESSION['cart']->in_cart_check('products_id','XXX');
where XXX is the products_id ...
Bookmarks