I have tried installing both, but that just sets up both options at the checkout.
Please, could anyone point me in the right direction.![]()
I have tried installing both, but that just sets up both options at the checkout.
Please, could anyone point me in the right direction.![]()
You could customize the Per Unit perweightunit shipping module and add the code in RED where 10 is the products_id:
NOTE: do not miss the change to the last line ...Code:function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $extra_shipping = 0.00; global $cart; $chk_products += $_SESSION['cart']->in_cart_check('products_id','10'); if ($chk_products > 0) { $extra_shipping = 2.50; } $total_weight_units = $shipping_weight; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_PERWEIGHTUNIT_TEXT_WAY, 'cost' => MODULE_SHIPPING_PERWEIGHTUNIT_COST * ($total_weight_units * $shipping_num_boxes) + (MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING) + $extra_shipping ) ));
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thanks for this Ajeh
I assume that it can be adjusted to category_id as well?
Actually sorry scrub that last answer.
I assume for multiple products it would be 'products_id', '10,'12' etc?
Sorry but I am still getting to grips with basic php.
Thx
Actually I have worked this out by looking at one of your other threads:
My burning question now, is can flat rate be added to if more than 1 product id listed is bought? So if Product ids 360 and 361 are bought together, how can we total the flat rate to £100?PHP Code:$chk_products += $_SESSION['cart']->in_cart_check('products_id','360');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','361');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','362');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','363');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','348');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','352');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','369');
$chk_products += $_SESSION['cart']->in_cart_check('products_id','367');
Please advise.
$chk_products holds the total of the Product x quantity purchased, so if it is greater than 1 than more than just 1 item is being ordered ...
If you needed to check for specific items you could change it to:
Then after the other products are checked, add something different for these two such as:Code:$chk_products360 = 0; $chk_products361 = 0; $chk_products360 = $_SESSION['cart']->in_cart_check('products_id','360'); $chk_products361 = $_SESSION['cart']->in_cart_check('products_id','361');
Or you can use those for any other kind of calculation ...Code:$chk_products += ($chk_products360 * 1.75); $chk_products += ($chk_products361 * 2.25);
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thanks Linda, well appreciated.![]()