Needs work
Project:
Commerce Stock
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2022 at 09:41 UTC
Updated:
12 Jan 2024 at 07:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
berdirComment #3
berdirOoops, wrong patch.
Comment #4
luksakWorks for me. Thanks!
Comment #5
luksakThis stopped working in a recent update I installed.
What is missing to get this committed?
Comment #6
luksakComment #9
sourabhjain@lukas could you please review MR 15 and let me know if you still facing this issue.
Comment #10
luksak@sourabhjain Nope, no luck sadly.
Comment #11
berdirThat was a misunderstanding, it was mixed up with #3309574: Field widget doesn't allow to set initial stock level if purchasable entity hasn't been created, this still fixes the problem it's meant to fix.
Comment #12
guy_schneerson commentedHi all and thanks for your attention to this.
The proposed change does not consider all the permutations of the Stock Level Widget. I assume you are all using the "Absolute stock level" and looks to me like the patch will make the use of the "Simple Stock transaction" even more confusing.
I personally discourage the use of the inline for use with stock, but if a good solution that works for all cases is proposed I will be happy to commit it.
Comment #13
alfthecat commentedTried the patch from the MR and unfortunately, no luck either.
In my case, unfortunately, it's just not an option to have users edit their variations one-by-one after they've been created on the fly via IEF during product creation.
It looks like I have to abandon commerce_stock for this reason, so I'm thinking to replicate the features of commerce_stock by simply using ECK to create a "Stock location" entity and a "Stock transaction" entity, as well as a hidden "Stock level" field on the variation entity, and have ECA update stock levels on checkout completion and on returns.
I was hoping I could leave commerce stock enabled and have ECA set the value for "always in stock" to "on" (not possible to set a default value for the boolean), then hide it from the UI and have ECA flip it to "off" when the stock level field reaches 0. I was hoping we would then still have the "Out of stock" button behavior commerce_stock provides. Except, when I try this, variations that have "Always in stock" flipped On, they still show as out of stock in the front-end. When I change the default service to "Always in stock" and I flip the boolean off, the product still shows as being in stock so that doesn't work either.