VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: kmedri on April 12, 2018, 12:04:22 PM

Title: vmError: Max quantity of product Test reached, new quantity in cart set to 1
Post by: kmedri on April 12, 2018, 12:04:22 PM
Hi, I have website joomla! 3.8.6 and after updating to latest VM 3.2.14 from VM 3.2.12 I now get the error when trying to buy 1 item when only 1 item in stock:

vmError: Max quantity of product Test reached, new quantity in cart set to 1

If I increase the stock level to 2 and add one item to the cart it works like normal. However if only one in stock the error occurs.

I have checked stock min and max levels and they all seem to be 0 or not set

Thank you for any suggestions
Title: Re: vmError: Max quantity of product Test reached, new quantity in cart set to 1
Post by: kmedri on May 02, 2018, 22:24:39 PM
Hi, I still have this problem if anyone can help.
Kevin
Title: Re: vmError: Max quantity of product Test reached, new quantity in cart set to 1
Post by: hazael on May 12, 2018, 13:26:23 PM
My fix in components/com_virtuemart/helpers/cart.php in line 1769:

Just change

if ($quantity >= $productsleft ){

to

if ($quantity > $productsleft ){
Title: Re: vmError: Max quantity of product Test reached, new quantity in cart set to 1
Post by: jenkinhill on May 12, 2018, 15:28:36 PM
Is already fixed in SVN.