magento2-disable-stock-reservation
magento2-disable-stock-reservation copied to clipboard
The requested qty is not available (truncate inventory_reservation Table)
Even though i installed this module to block writing to the inventory_reservation table. There were entries added before so they were still causing problems and was not able to order the sku products that still existed in this table
Would be good for the module to truncate this table when the module is installed/enabled.
@kingberrill Great point!
I wonder whether it would be better to do this as a CLI command so that it could be run asynchronously from the setup:upgrade deployment. On databases with massive numbers of products/reservations it could increase the downtime on deployment. Something like php bin/magento ampersand:disable-stock-reservation:truncate-reservations or something like that.
I don't have capacity for this right now, but I've added some labels and will also add a note to the README.md to truncate that table after installing
Hello @convenient
I wonder if you simply mean that the inventory_reservation should be truncated by running truncate table inventory_reservation; directly in the database or if it's something that should be done from the application?
Thanks.
@maxacarvalho Directly in the database, sorry for lack of clarity.
No problem @convenient, thank you very much.
@maxacarvalho Also make sure to test everything locally, never do this kind of thing directly on prod without backups and testing first.
Hi @convenient
Sure, it's being tested in our development environment at the moment. Thank you very much once again.
@kingberrill Great point!
I wonder whether it would be better to do this as a CLI command so that it could be run asynchronously from the
setup:upgradedeployment. On databases with massive numbers of products/reservations it could increase the downtime on deployment. Something likephp bin/magento ampersand:disable-stock-reservation:truncate-reservationsor something like that.I don't have capacity for this right now, but I've added some labels and will also add a note to the README.md to truncate that table after installing
I implemented the solution on command, I hope I can help you https://github.com/AmpersandHQ/magento2-disable-stock-reservation/pull/49
the command looks like this
bin/magento ampersand:disable-stock-reservation inventory-reservation
has the possibility to add more tables
Hey all, well.. Just stomped across here and tried the module. Upon installing it (magento 2.4.3-p2), I tried to run: bin/magento ampersand:disable-stock-reservation inventory-reservation
And found that the plugin is not being recognized properly, it does not belong to a namespace.. Should I directly go and truncate the table?
Regards
@gentookid that was never merged i'm afraid, sorry.
Manually truncate the table please
Correct, although I seem to be missing the inventory-reservation table, what I do have is:
inventory_stock_1
inventory_stock_1.website_id
inventory_stock_1.is_salable
inventory_stock_1.product_id
inventory_stock_1.quantity
inventory_stock_1.sku
inventory_stock_1.stock_id
Could it be something differs in the schema from versions?
The table is inventory_reservation
It should be there is you have the inventory tables installed
@convenient there seems to be an issue when we order all available quantities for a specific item in a single order and then cancel that order from admin. Once we cancel, the stock Quantity is back to normal but the stock status is still the same as Out of Stock which as a result disappears the item from the frontend and does not let users add to the cart.
@zeeshan2523806 same issue. Any ideea, someone, on how to resolve this? If u set manually the product, from out_of_Stock and set the value in+stock, its returning the salable_qunatity to the initial value (the correct value). the problem is on 2.4.3.p1
@zeeshan2523806 @bogdanignat
This is not an issue with this module, but rather the default behavior of Magento itself. Magento does not register how a product reached it's out of stock status (automatically when the stock falls below the out of stock threshold, or because the stock status attribute was changed) therefore Magento cannot (and does not) assume an increase in available qty means the product itself is back in stock.
If you want this to work you could look at the answer in this stack overflow post: https://magento.stackexchange.com/questions/320979/how-to-automatically-change-the-status-to-in-stock-if-products-are-added-to-the
Hello peeps, is this still an issue? Thanks