-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: adds new pricing field to product variants in order to correctly display prices #6159
Conversation
display prices. Signed-off-by: Will Lopez <[email protected]>
src/plugins/simple-pricing/xforms/xformProductVariantPricing.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Will Lopez <[email protected]>
…actioncommerce/reaction into refactor-use-consistent-pricing-field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing an issue where the data in the database is saved incorrectly for Variants with Options. The price min
and max
are being saved as objects instead of as floats. I'm also seeing incorrect values for the price ranges for the Product, and top-level Variant, likely due to this bug. Something may be wrong with the updateVariantPrices
mutation or app events thereafter.
src/plugins/simple-pricing/xforms/xformProductVariantPricing.js
Outdated
Show resolved
Hide resolved
src/plugins/simple-pricing/xforms/xformProductVariantPricing.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Will Lopez <[email protected]>
creating new issue for remaining changes.
Currency symbol issue: #6162 |
Signed-off-by: Will Lopez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Resolves #6152
Impact: minor
Type: bugfix
NOTE test with PR: reactioncommerce/reaction-admin#246
Issue
Description of the issue this PR is solving, why it's happening, and how to reproduce it. This may differ from the original ticket as you now have more information at your disposal.
Solution
The
price
field on variants was not flexible enough to accommodate a variant having options with their own prices. A new fieldpricing
has been added to theProduct
andProductVariant
types. This new field has a transformer that determines the correct value to return depending on whether a variant is a parent variant or not.Breaking changes
None.
NOTE The field
price
has been deprecated in favor ofpricing
both on products and variants.Testing