VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: uthpala on October 02, 2013, 05:52:10 AM

Title: Products can be Added to Cart exceeding existing product_in_stock
Post by: uthpala on October 02, 2013, 05:52:10 AM

When shopper adds item into cart and once finished payments, I update the 'product_in_stock' variable ,by deducting the amount the shopper bought. I didn't use product_ordered variable here. This is  done inside the function plgVmOnPaymentResponseReceived(), in my payment plugin . Is this ok or wrong?

And for a partcular product item if the amount is only 1, & one shopper adds it into cart & until he does the payment, that product item can be ordered(added to cart) by someone else, which leads to over selling.
How can i find a solution for this problem

Title: Products can be Added to Cart exceeding existing product_in_stock
Post by: uthpala on October 02, 2013, 06:08:52 AM
Hi, I am using , Joomla 1.5 + Virtuemart 2.0.20
this is the status for a particular product

product_in_stock =5
product_ordered = 5


Then when I tested, to Add that product to my cart I can add any amount of this product. Why this issue?
Any help pls
Title: Re: Products can be Added to Cart exceeding existing product_in_stock
Post by: Maxim Pishnyak on October 03, 2013, 15:50:16 PM
Your versions are outdated.
Title: Re: Products can be Added to Cart exceeding existing product_in_stock
Post by: Maxim Pishnyak on October 03, 2013, 15:52:39 PM
Quote from: uthpala on October 02, 2013, 05:52:10 AM
ordered(added to cart) by someone else, which leads to over selling.
In your case ordered=sold?