[5.x]: Changing the line items in an order does not alter the inventory #4256
Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the detailed write-up! This is actually expected behaviour that has been present since Commerce 1.0 — editing an order in the control panel does not affect the inventory/stock system. So what you're seeing isn't a regression, though we fully appreciate that it can catch people off guard. That said, we do plan to improve this. The roadmap includes:
This improved stock management on the order edit page is slated to come after the Laravel transition in Craft 6, along with a broader set of inventory improvements we have planned. Moving this to a GitHub Discussion so it can be tracked there. Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Description
The webshop client placed an order via the website and called the store to alter that order from 1 product to 5 of the same product.
The order can currently not be fulfilled.
My first guess was that the product variant did not have inventory enabled because I could also not find the order in the inventory history for the product variant.
However when I look at the configuration for the product variant then everything seems to be correct.
Also, when I now change the amount of products for the same order it also does not change anything in the order history.
To isolate the issue I create a completely new order for the same product with an amount of 5.
This gets added to the inventory history.
Then I change the order product amount from 5 to 3 and save the order.
This does not change the inventory history and it does also not remove 2 from the committed column to the available column.
This is a pretty big bug since this means that the inventory is not correct and cannot be trusted.
I still have no clue why the original order does not show up in the order history.
I also cannot prove that our client had inventory disabled for that product variant since there is no edit history for product variants.
Steps to reproduce
Expected behavior
The inventory should be updated always even after an order has been made.
Actual behavior
The inventory keeps its original state from when the order has been created.
Craft CMS version
5.9.14
Craft Commerce version
5.5.4
PHP version
8.4
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Beta Was this translation helpful? Give feedback.
All reactions