-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Updated Unit Price Support #3772
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
base: main
Are you sure you want to change the base?
Conversation
7565e40
to
5ba5e3b
Compare
This improved handling allows for languages to customize the format and also display and handle the unit being generic and not unit based in the case of item/count Also includes: - Removes whitespace around the / (eg. $1/g) - Removes styling that capitalizes the unit (eg. $1/G) - Update 4 translation files
3ab4c72
to
9859e3e
Compare
</span> | ||
</span> | ||
</small> | ||
{%- if use_variant -%} |
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.
Where does use_variant
and target
come from?
I'm wondering why the code changed to use these instead of product.selected_or_first_available_variant
.
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.
See lines 16 & 17 above
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.
Ok yeah, I see that now. It looks like we previously would have still shown the unit price from the selected or first available variant if use_variant
was false
, so I'd want to confirm from theme folks that this change makes sense.
This comment was marked as resolved.
This comment was marked as resolved.
Remove extra dash Co-authored-by: Trish Rempel <[email protected]>
FYI, translations are updated as per translations review coordinated in #help-localization. |
Just found this PR. It feels wrong to have those translations at the theme level. Those should be provided by the platform directly. |
PR Summary:
Updates unit pricing to support new units and how they're displayed with translation support.
Why are these changes introduced?
New units would not be displayed correctly without updating the theme.
What approach did you take?
Chose to implement it completely in liquid.
Other considerations
Visual impact on existing themes
Testing steps/scenarios
shopify theme push
orshopify theme package
Checklist