If you look in the:
/includes/classes/shopping_cart.php
There is a function for checking the content of a given field in the shopping cart:
PHP 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') {
You could use this to test how many products_virtual = 1 are in the cart ...
This can then be used to control the $this->enabled of any of the modules to show or hide them ...
Bookmarks