Skip to content

Stock increases automatically #12483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devendra-m opened this issue Nov 29, 2017 · 15 comments
Closed

Stock increases automatically #12483

devendra-m opened this issue Nov 29, 2017 · 15 comments
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: needs update

Comments

@devendra-m
Copy link

devendra-m commented Nov 29, 2017

Stock increases automatically for some products randomly.

Preconditions

  1. Magento ver. 2.1.7.
  2. PHP 7.0.26 (cli) (built: Nov 21 2017 14:36:41) ( NTS )

Steps to reproduce

  1. It happens randomly. Qty sometimes gets increased automatically sometimes not.

Expected result

  1. Qty should not increase when it is not updated manually from admin panel.

Actual result

  1. Qty for product automatically increases after some time
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 29, 2017
@orlangur
Copy link
Contributor

I really doubt this issue is reproducible with such steps. Can you track it a bit on your side maybe to understand the root cause?

@devendra-m
Copy link
Author

Its difficult to reproduce this issue because it happens at random times. I tried to track but couldn't find the cause.

@hellekim
Copy link

I’ll add some additional info as I run the shop.

Giving specific circumstancies is super hard as I’ve not been able figure out why this happens.

Configurable products keep getting these all the time - the stock amount keeps rising, so in this case it can be the main product for t-shirt. I usually clean these every few weeks and some (usually more popular products) might have gone up from 0 to 60 - usually I got around 60-70 of these products.

Another issue is that occasionally the product’s stock value doesn’t update when it’s purchased. I might get 10 orders with 3-4 products in them and with only one of those products have not updated with -1 to stock value.

This second issue is by far the most frutrating as it causes dissapointments to my customers occasionally.

Thanks for reading.

@orlangur
Copy link
Contributor

Looks somewhat opposite to #6363, could be related.

@magento-engcom-team
Copy link
Contributor

@devendra-m, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce.

@JeroenVanLeusden
Copy link
Member

You see any canceled orders with those products? If so, could also be related to #9969

@hellekim
Copy link

hellekim commented Dec 1, 2017

@JeroenVanLeusden this is exactly what happens - thank you!

@plastiqman
Copy link

plastiqman commented Dec 4, 2017

Hi there,
We have a similar problem @hellekim
Preconditions
Magento ver. 2.1.9.
PHP 7.0.26
Some products do not discount the amount in same order.
This errors happen in random way.
I have set a trigger in a catalog_inventory_stock_item to debugging and I can see that first discount the qty and immediately after insert the quantity again. (103)
http://vvcap.com/imoOdIWzlQ2
You can see all products in the order:
http://vvcap.com/0D2JJhsKH24
This product in other orders discount the stock. Therefore, it can not be the problem of the product.
Thanks.

@magento-engcom-team
Copy link
Contributor

@devendra-m, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

@magento-engcom-team magento-engcom-team added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Dec 13, 2017
@vishalnyati
Copy link

vishalnyati commented Feb 6, 2019

@magento-engcom-team We are also getting same issue in Magento 2.2.6 . We did migration from Magento 1.9.2 .
We also observed cataloginventory_stock_item_save_after .. this event is getting hit multiple times in a second and qty is increasing automatically.
Looking for an solution. Its creating lots of problem.

@hellekim
Copy link

hellekim commented Feb 6, 2019

For us the issue was payment extension - everytime someone canceled the order the items were returned to stock twice. Payment extension was Paytrail.

@charleskj
Copy link

charleskj commented Feb 14, 2019

This is happening to us also.
Migrated from m1 to m2-2.2.6.
In our case, stock get incremented very frequently for some particular products.

@charleskj
Copy link

This is related to this issue : #19230

Actually what happened is magento tries to cancel the expired orders in the past and put back the stock of cancelled item.
This job is throwing some error in middle, unfortunately it happened after stock get increased, but order status not updated to cancel.
So job will pick the same order again and again which result in increasing stock going on.

I turn off that cron job for quick fix.

stock increase bug fix by charleskj pull request 251 yatnam fightclubstore

@MarinaBonbonRose
Copy link

Hello, same problem for me. Migrated from m1.7 to m2-2.2.6.
I'm not sure to turn off this cron, is there any other consequence ?
Any other solutions?

@kevintieman
Copy link

Same here. Happened at 2.2.7, upgraded to 2.3.1 still the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: needs update
Projects
None yet
Development

No branches or pull requests

10 participants