-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix(core): expose enabled field for product in shop api #2541
fix(core): expose enabled field for product in shop api #2541
Conversation
✅ Deploy Preview for effervescent-donut-4977b2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi! Can you explain the use-case for this? The "enabled" toggle currently means that the given product is not available in the Shop API when set to |
Hi, here is our use case:
Another option: We could disable all the variants when we deactivate a product but that would complicate reactivation (Were all the variants enabled?). This is an option because the productVariant enabled field is available |
ah ok I see. So this change would not alter the actual ability to access disabled variants at all. It only is relevant in that case where the variant is related to an existing OrderLine. Looking at the code, I see that currently we would return that
I'm not understanding how this would solve it - the disabled variants would still be returned with |
Exactly, it wouldn't change the way things work now. It's fine to return the variant regardless of the
I was proposing another solution, which is to listen to the change of state of the |
Did you need any other information? |
Hi, No I think we're good to include this. Can you just make the PR against the |
871e968
to
71774e2
Compare
Hi, perfect, it's moved against the minor branch |
f6f2975
into
vendure-ecommerce:minor
Description
Expose enabled field for product in shop api
Breaking changes
Screenshots
Checklist
📌 Always:
⚡ Most of the time: