Let's assume that the categories_id is 10 ... and that it is the master_categories_id for all of the Seeds ...
You can edit the shipping module:
/includes/modules/shipping/item.php
and change the function quote by replacing it with:
Code:
// class methods
function quote($method = '') {
global $order, $total_count;
// adjusted count for free shipping
$item_total_count = $total_count - $_SESSION['cart']->free_shipping_items();
// check number of seeds ordered from categories_id 10
$chk_seeds = $_SESSION['cart']->in_cart_check('master_categories_id','10');
$item_total_count = $item_total_count - $chk_seeds;
if ($chk_seeds > 0) {
$chk_seeds_shipping = 1.50;
} else {
$chk_seeds_shipping = 0.00;
}
$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_ITEM_TEXT_WAY,
'cost' => (MODULE_SHIPPING_ITEM_COST * $item_total_count) + $chk_seeds_shipping + MODULE_SHIPPING_ITEM_HANDLING)));
if ($this->tax_class > 0) {
$this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);
return $this->quotes;
}
Now all Products using the master_categories_id 10 will be removed from the count that Item Rate item shipping uses and charge $1.50 if any are in the cart ...
Just change the '10' to the master_categories_id for the Seeds ...
See if that works for you ...
Bookmarks