VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: kalsoom.abbas on April 03, 2019, 18:40:54 PM

Title: Shopping Cart - Quantity Update error
Post by: kalsoom.abbas 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
Title: Re: Shopping Cart - Quantity Update error
Post by: jenkinhill on April 03, 2019, 18:59:11 PM
See http://forum.virtuemart.net/index.php?topic=79800.0