Author Topic: Shopping Cart - Quantity Update error  (Read 849 times)


  • Beginner
  • *
  • Posts: 1
  • A beginner
Shopping Cart - Quantity Update error
« on: April 03, 2019, 18:40:54 pm »
when there is a shortage in quantity this message shows. This happens if someone has an item in the cart and they try to add more on the cart page and click continue shopping.

However when there are 2 items and the user adds more without clicking the refresh/update stock button next to the product, It proceed with the checkout with the correct amount of stock but the warning message is shown after order has been placed. This can be frustrating as it shouldn't proceed before the error message is shown so Users know that they need to contact oxford and have the option to inquire about stock before they proceed with checkout. They may not want to do 2 separate transactions if the stock can be reordered.

When its more than 2 items it should be (Click continue shopping button > Error Message and Auto Reset the quantity to the correct stock while staying on the cart page> once reset to leave it for users to click the continue shopping if they desire)

"In components/com_virtuemart/controllers/cart.php, the function updatecart($html=true,$force = null) gets called too late when a user is ordering an item.
If they order something over the max quantity and confirm their order without refreshing the quantity, the order still goes through and they get the error given by updatecart() too late." - Developer Comment


  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28154
  • Always on vacation
    • Jenkin Hill Internet

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 VirtueMart on Joomla 3.9.28 PHP 7.4.14