cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3.1 Concurrent checkout made stock minus/negative

Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello, my name is Mudita.

 

Currently, we have an issue when we have a concurrent checkout made our product stock minus (negative stock -1).

 

Our preconditions:

- Ubuntu 14.04

- Nginx web server

- Magento CE 2.3.1

Step to check out:

1. Access to website - add to cart a product (let call Product X) using my mobile browser and my desktop browser.

2. Both continue the checkout process, fill customers details until the final step ready to place order.

3. Hit place order at the same time (maybe there will be a difference in microsecond between mobile browser checkout and desktop browser checkout).

 

Expected Result: One of the checkouts failed and show an error message - not enough stock.

 

Actual Result: Product X stock show as minus -1 at the admin site, orders were made for each user.

 

What we already did also our config in:

 

A. Product advance inventory

1. Out of stock threshold = 0

2. Backorders = No backorders

 

B. Store options - Inventory - Stock Options

1. Decrease stock when order is placed = yes

2. Display out of stock products = No

3. Only x left threshold = 0

 

C. Store options - Inventory - Product Stock Options

1. Manage stock = yes

2. Backorders = No Backorders

3. Out-of-stock threshold = 0

 

Do we have to add some additional code or any further configurations to handle this case?

 

Note: We have found that this issue was resolved in 2.2 (https://github.com/magento/magento2/issues/6363)

 

Any help would be appreciated.

 

Thank you in advance.

 

 

Regards,

 

Mudita

7 REPLIES 7

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello @mudita_wijaya 

 

please check below link for same

 

https://github.com/Galillei/magento2-belvg-concurrent-checkout-fix/blob/master/Belvg/ConcurentChecko...

 

if works then mark as a solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello @Sunil Patel

 

Could you explain more where we can deploy this code?

 

Maybe kind of specific path or using composer?

 

Thank you for your fast response.

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello @mudita_wijaya 

 

you need to download module and you need to install it

 

app/code/Belvg/ConcurentCheckoutFix

 

Then run setup:upgrade command and do static content deploy.

 

Hope it will help you, if works then mark as a solution.

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello @Sunil Patel,

 

We already download install the module perfectly.

 

But unfortunately, our product stock still minus.

 

Screen Shot 2019-05-20 at 15.25.20.png

 

*) Product-Test-Black-L still show product default stock -1

 

Are we miss something in the process?

 

Thank you in advance.

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello @mudita_wijaya 

 

As per module as i see

https://github.com/Galillei/magento2-belvg-concurrent-checkout-fix/blob/master/Belvg/ConcurentChecko...

 

there is some setting into backend given to enable this module

 

go to Setting >> check any Magento's fix tab there if there then enable it.

 

Hope it will help you.

 

if works then mark as a solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

Hello @Sunil Patel,

 

We already enabled it before the test was conducted.

 

Screen Shot 2019-05-20 at 15.53.23.png

 

Thank you.

Re: Magento 2.3.1 Concurrent checkout made stock minus/negative

@mudita_wijaya Did you get any solution for this?
I'm also facing similar issues and looking for help.
Thanks.