-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Discounts] fix: show accurate subtotal price for cart #2775
[Discounts] fix: show accurate subtotal price for cart #2775
Conversation
Hey folks, not a review but just some context around some other things we were looking into for the customer account page. We wanted to make the hierarchy of the information similar to what you (customer) also receive as an email notification. So we have some consistency. Here is a PR about it. It's not directly related but maybe good to know/be aware of for consistency across the board 👍 |
locales/en.default.json
Outdated
@@ -272,8 +272,8 @@ | |||
"title": "Your cart", | |||
"caption": "Cart items", | |||
"remove_title": "Remove {{ title }}", | |||
"subtotal": "Subtotal", | |||
"new_subtotal": "New subtotal", | |||
"estimated_total": "Estimated Total", |
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.
Localization quality issue found
The following issues may affect the quality of localized translations if they are not addressed:
- The value
Estimated Total
for keysections.cart.estimated_total
is very short. Short strings are more likely to be misunderstood by translators without context. Please provide additional context for the translators if possible.
Please look out for other instances of this issue in your PR and fix them as well if possible.
Questions about these messages? Hop in the #help-localization Slack channel.
6ae58e0
to
f35050a
Compare
f35050a
to
8e796cc
Compare
.totals__total { | ||
margin-top: .5rem; | ||
} |
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 don't think we need this. It applies that margin top even when there are no discounts above it.
We do have this existing declaration:
.cart__footer .discounts {
margin-top: 1rem;
}
Which could be changed to margin-bottom
👍
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.
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.
Spacing looks good on my end. We can revise further if we decide to bring the subtotal in here too. 👍
@@ -272,8 +272,8 @@ | |||
"title": "Your cart", | |||
"caption": "Cart items", | |||
"remove_title": "Remove {{ title }}", | |||
"subtotal": "Subtotal", | |||
"new_subtotal": "New subtotal", | |||
"estimated_total": "Estimated total", |
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.
Localization quality issue found
The following issues may affect the quality of localized translations if they are not addressed:
- The value
Estimated total
for keysections.cart.estimated_total
is very short. Short strings are more likely to be misunderstood by translators without context. Please provide additional context for the translators if possible.
Please look out for other instances of this issue in your PR and fix them as well if possible.
Questions about these messages? Hop in the #help-localization Slack channel.
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 added a new screenshot with more details for the translation platform 👍
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.
Thank you!!! 🙏
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.
Looking good to me 👍
One note, some stores could be using free shipping methods only and include taxes in their product prices. So the total amount on the cart page could be exactly the same as the one during checkout.
Though since you can always add a discount during checkout, I think it's ok to keep it as is 👍
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.
Looks good from the UX side. Thank you! 🙌
3b876ec
to
7b4e630
Compare
/shipit |
* fix: show accurate subtotal price for cart * chore: update subtotal in cart drawer * chore: update copy for estimated total, adjust spacing and placement * fix: use cart__footer selector for margin instead * fix: make copy sentence case * Update 20 translation files * Update 3 translation files * Update 7 translation files --------- Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
* fix: show accurate subtotal price for cart * chore: update subtotal in cart drawer * chore: update copy for estimated total, adjust spacing and placement * fix: use cart__footer selector for margin instead * fix: make copy sentence case * Update 20 translation files * Update 3 translation files * Update 7 translation files --------- Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
PR Summary:
Updates total price to be items_subtotal_price to more accurately represent the value after line item discounts only.
Before:
After:
Why are these changes introduced?
fixes: https://github.com/Shopify/core-issues/issues/57440
fixes: #2781
What approach did you take?
Other considerations
Decision log
Visual impact on existing themes
Testing steps/scenarios
manually edited in store editor: https://admin.web.fix-inaccurate-total.mathius-johnson.us.spin.dev/store/shop1/themes/1?key=sections%2Fmain-cart-footer.liquid
cart: https://shop1.shopify.fix-inaccurate-total.mathius-johnson.us.spin.dev/cart
Demo links
Checklist