Author Topic: vmError: Max quantity of product Test reached, new quantity in cart set to 1  (Read 533 times)

kmedri

  • Beginner
  • *
  • Posts: 17
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:

Code: [Select]
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

kmedri

  • Beginner
  • *
  • Posts: 17
Hi, I still have this problem if anyone can help.
Kevin

hazael

  • Beginner
  • *
  • Posts: 33
    • Bi┼╝uteria etniczna i orientalna
  • VirtueMart Version: 3.2.14
My fix in components/com_virtuemart/helpers/cart.php in line 1769:

Just change
Code: [Select]
if ($quantity >= $productsleft ){
to
Code: [Select]
if ($quantity > $productsleft ){

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26973
  • Always on vacation
    • Jenkin Hill Internet
Is already fixed in SVN.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM..3.4.0.9935 on Joomla 3.8.12 PHP 7.0.31