Oba-san
- Join Date:
- Sep 2003
- Location:
- Ohio
- Posts:
- 62,757
- Plugin Contributions:
- 1
Different shipping methods for different categories
You could test the cart for how many products are in a given master_categories_id and if there is 1 or more from the aerosols category then it raises the rate being charged in the Flat Rate flat shipping module ...
In the shopping_cart class is this function:
/**
* Method to calculate the number of items in a cart based on an abitrary property
*
* $check_what is the fieldname example: 'products_is_free'
* $check_value is the value being tested for - default is 1
* Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
*
* @param string product field to check
* @param mixed value to check for
* @return integer number of items matching restraint
*/
function in_cart_check($check_what, $check_value='1') {
it can be used to test how many products are in the master_categories_id for this category using:
$_SESSION['cart']->in_cart_check('master_categories_id','27')
where 27 is the master_categories_id for the aerosols ...
Linda McGrath
If you have to think ... you haven't been zenned ...
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!