View Single Post
  #11  
Old 05-24-2011, 10:33 PM
 
Stizerg Stizerg is offline
 

Senior Member
  
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 195
 

Default Re: Don't show "Out of stock" after add to cart

OK, I found it. In \modules\Product_Options\func.php
PHP Code:
if ($kv == func_get_variantid($v['options'], $productid)) 
    
$variants[$kv]['avail'] -= $v['amount']; 

replaced with
PHP Code:
if ($kv == func_get_variantid($v['options'], $productid)) {
    
$variants[$kv]['avail'] -= $v['amount'];
    if (
$variants[$kv]['avail'] <= 0)
      
$variants[$kv]['avail'] = 1;


It works well for products that current customer put into cart.
__________________
X-Cart Gold Plus 4.6.6
A lot of custom mods
Reply With Quote