Okay, so I think I've found where I can fix this strange behavior but am wondering if anyone can think of any adverse consequences of doing this.
In include/search.php there is the following code:
Code:
$in_cart = 0;
if (!empty($cart['products']) && is_array($cart['products'])) {
# Modify product's quantity based the cart data
foreach ($cart['products'] as $cv) {
if ($cv['productid'] == $v['productid'] && intval($v['variantid']) == intval($cv['variantid']))
$in_cart += $cv['amount'];
}
$products[$k]['in_cart'] = $in_cart;
$products[$k]['avail'] -= $in_cart;
if ($products[$k]['avail'] < 0) {
$products[$k]['avail'] = 0;
}
}
When I comment out the line:
Code:
$products[$k]['avail'] -= $in_cart;
like so:
Code:
//$products[$k]['avail'] -= $in_cart;
then it prevents the behavior I'm talking about.
Can anyone think of any other consequences of doing this?