Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / All The More Complicated...multiple shipping rules for various products

All The More Complicated...multiple shipping rules for various products

Views: 2,064

Results 21 to 21 of 21
15 Mar 2012, 10:38 PM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

All The More Complicated...multiple shipping rules for various products

You have made your calculation for how much to charge to be:

      global $cart;
      $chk_cat1 = $_SESSION['cart']->in_cart_check('master_categories_id','66');

      $cat_charge = 0.00;
      $cat_charge += $chk_cat1 * 6.00;

This means you want to charge 6.00 per item in the cart from master_categories_id 66 ...

Now you need to use that in the quote:

      $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' => ($cat_charge) + MODULE_SHIPPING_ITEM_HANDLING)));