-
-
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
Expose admin-ui for custom fields on ProductVariantPrice. #3020
Comments
I would be up to work on a contribution for this, @michaelbromley could you point me at where to start? Are there any example to follow in the source? For the ui part I imagine probably to work here, but not sure if also the services should be addressed |
Great, here's some pointers:
|
This comment was marked as outdated.
This comment was marked as outdated.
After some tryouts I realized that ProductVariantPrice is actually an array of prices, so had to consider that when dealing with the binding. The customFields are rendered properly now, but an error that comes when trying to update them is
@michaelbromley I'm wondering if I have to include it in the type definition somewhere? |
@lzzfnc you might need to update the input type here:
|
Hey thanks for the hint! I had a look at the schema you linked, but it doesn't seem that hard coding the customField field to the input there is the way to deal with it? Mostly because there are no other inputs with custom fields there. I wonder if the way to do it could be to add a function and then using it in the
|
Is your feature request related to a problem? Please describe.
Custom fields for
ProductVariantPrice
at the moment don't expose an admin-ui.Describe the solution you'd like
Custom fields are rendered as it happens for other entities.
Describe alternatives you've considered
@michaelbromley mentioned a workaround here:
#2654 (comment)
Additional context
I'm trying to setup a system to show discounts on product variants in the catalog. As far as I understood, In order to display the discounted prices in the catalog this cannot be made with a promotion, since it gets applied during checkout, so I'm going with custom fields.
At the moment I managed to implement a single channel version adding a Recommended Retail Price custom field to the ProductVariant, the only problem is that this custom field seems to be not channel aware, meaning that I cannot have the same product with different discounts in different channels. It seems that is possible to set the custom field to ProductVariantPrice intead, and that would be channel-aware apparently. However it doesn't expose any field in the admin UI.
The text was updated successfully, but these errors were encountered: