Thanks
This is the final piece
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);
}
$extra_shipping = 0.00;
global $cart;
$chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','1');
$chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','2');
$chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','4');
$chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','5');
$chk_categories += $_SESSION['cart']->in_cart_check('master_categories_id','7');
if ($chk_categories > 0) {
$extra_shipping = 7.50;
$extra_shipping2 = 0;
}
$extra_shipping2 = 0.00;
global $cart;
$chk_categories2 += $_SESSION['cart']->in_cart_check('master_categories_id','3');
$chk_categories2 += $_SESSION['cart']->in_cart_check('master_categories_id','6');
if ($chk_categories2 > 0) {
$extra_shipping2 = 11.50;
}
if ($extra_shipping2 > 0) {
$extra_shipping = $extra_shipping2;
}
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
'cost' => MODULE_SHIPPING_FLAT_COST + $extra_shipping )));
Bookmarks