You are going to need some type of test for these Freight Products in the products table ...
This could be done with a new field and then that can be used to test if 1 or more are in the cart ... if so, then the shipping modules can be enabled/disabled using the $this->enabled by setting it to true or false in your shipping modules ...
There is a function in the shopping_cart.php class that can be used to test for what is in the cart based on a field in products table:
Code:
/**
* 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') {
Bookmarks