Post by chelory » Mon Aug 15, 2011 10:48 pm

YES! This is EXACTLY what I need!

I sell a product that is in HIGH DEMAND. I have VERY limited quantities. I can NOT have oversells! Refunding 20 customers every day is not practical :choke:

Now to just find someone to DO this for me.....

::)

~Rachel

Newbie

Posts

Joined
Sat May 14, 2011 1:00 am

Post by robguitar7 » Mon Nov 17, 2014 11:25 pm

Hi all, I am looking for a solution for the negative stock issue. If anyone has a found a way to resolve this or can give me guidance / advice where to look, it would be greatly appreciated. I ran into this issue where I had one item in stock and over twenty people tried buy the same product at the same time so I had a negative inventory.

Newbie

Posts

Joined
Wed Jan 18, 2012 10:19 am

Post by FnF » Thu Nov 27, 2014 9:57 pm

System>>Settings>>Option>>Stock>>

Stock Checkout:
Allow customers to still checkout if the products they are ordering are not in stock. `NO'

User avatar
FnF
Active Member

Posts

Joined
Sat Mar 19, 2011 9:59 pm

Post by robguitar7 » Wed Jan 07, 2015 11:34 pm

FnF wrote:System>>Settings>>Option>>Stock>>

Stock Checkout:
Allow customers to still checkout if the products they are ordering are not in stock. `NO'
That doesn't work if 2 or more people have the 1 item in the cart and they checkout at the same time. The stock will go into the negative, regardless. I have the settings already set in the example you showed above.

Newbie

Posts

Joined
Wed Jan 18, 2012 10:19 am

Post by silvianikolova » Tue Jan 13, 2015 4:45 pm

Hey there, I'm interested to know if this problem is solved in the latest version of opencart or if someone is willing to write a custom script for me as well. I'm going to have the same issue and it is very important to handle stock quantities properly.

Thanks!


Posts

Joined
Fri May 23, 2014 11:38 pm

Post by fmahmud5g » Fri May 01, 2015 9:08 pm

I have just get a message from this site.
please must, try to ensure from this site whether this 5 solution is true or false.
This is the site link---
https://github.com/iSenseLabs/tutorials ... encart-20x

Newbie

Posts

Joined
Thu Apr 30, 2015 10:00 pm

Post by HAO » Thu Apr 14, 2016 11:25 pm

liquidpele wrote:This is actually a pretty big problem - a busy site might have 3 people trying to buy the same thing at the same time! The answer is: Just have the database handle it for you.

Make the table you track the carts/stock with InnoDB instead of myISAM. Then track the cart/stock in that table and use table locks to verify things if you're verifying and then updating the table. The performance doesn't matter if the only thing using the locking table are people with carts because you're not going to have 200 people checking out and refreshing at the same time and having good concurrency is more important.
If I change the oc_cart table to MyISAM engine, This is the reason for the negative result of it?

If the result is negative because of this, that if I changed back to the original InnoDB is not able to solve it?

PS.I can be empty oc_cart the table, let it be recalculated?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by qoardo » Tue Jul 11, 2017 9:53 pm

Hi
I am looking for a solution for the negative stock issue too. If anyone has a found a way to resolve this or can give me guidance / advice where to look.

Newbie

Posts

Joined
Tue Jul 11, 2017 9:47 pm

Post by Qphoria » Wed Jul 12, 2017 12:06 am

The only solution I've created is a mod that integrates with the payment option in step 6. Right before the payment is processes, I do a final stock check. If the product is out of stock, it will redirect the customer back to the cart to show the error. Otherwise, it will process the payment and subtract the stock. This, however, needs to be customized "per payment" because of the way opencart uses the actual payment form on step 6.

If you'd like a quote for the work, pm me.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 35 guests