in \includes\classes\shopping_cart.php the routine looks to start around line 1377.
PHP Code:
/**
* Method to calculate item quantity, bounded the mixed/min units settings
*
* @param boolean product id of item to check
* @return deciaml
*/
function in_cart_mixed($products_id) {
global $db;
// if nothing is in cart return 0
if (!is_array($this->contents)) return 0;
// check if mixed is on
// $product = $db->Execute("select products_id, products_quantity_mixed from " . TABLE_PRODUCTS . " where products_id='" . (int)$products_id . "' limit 1");
$product = $db->Execute("select products_id, products_quantity_mixed from " . TABLE_PRODUCTS . " where products_id='" . zen_get_prid($products_id) . "' limit 1");
// if mixed attributes is off return qty for current attribute selection
if ($product->fields['products_quantity_mixed'] == '0') {
return $this->get_quantity($products_id);
}
// compute total quantity regardless of attributes
$in_cart_mixed_qty = 0;
$chk_products_id= zen_get_prid($products_id);
// reset($this->contents); // breaks cart
$check_contents = $this->contents;
while (list($products_id, ) = each($check_contents)) {
$test_id = zen_get_prid($products_id);
if ($test_id == $chk_products_id) {
$in_cart_mixed_qty += $check_contents[$products_id]['qty'];
}
}
return $in_cart_mixed_qty;
}
/**
* Method to calculate item quantity, bounded the mixed/min units settings
*
* @param boolean product id of item to check
* @return deciaml
*/
function in_cart_mixed_discount_quantity($products_id) {
global $db;
// if nothing is in cart return 0
if (!is_array($this->contents)) return 0;