Skip to content
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

Update cart unit price to reflect of line item #2746

Merged
merged 1 commit into from
Jul 10, 2023
Merged

Conversation

sofiamatulis
Copy link
Contributor

@sofiamatulis sofiamatulis commented Jun 27, 2023

PR Summary:

Original ticket: https://github.com/orgs/Shopify/projects/6397/views/5?pane=issue&itemId=30821952

Why are these changes introduced?

it makes sense to use the discounted unit price in cart (currently we don't). So we can use line_item.unit_price instead of line_item.variant.unit_price

UX: The unit price needs to show cost clarity of how much it will cost per unit values - the strike-through price is not important at this line level because we already display it on the total price with discount in a larger font size.

Demo links

Test cart page and cart drawer

Copy link
Contributor

@KaichenWang KaichenWang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good!

Will this cause a change in the unit price value displayed in the storefront? If so, is there an example where we can observe a change in the cart (we could also add this to scenarios we need to test for)?

@sofiamatulis
Copy link
Contributor Author

Will this cause a change in the unit price value displayed in the storefront? If so, is there an example where we can observe a change in the cart (we could also add this to scenarios we need to test for)?

Yes! the unit price will now include the discount which it didnt before.

Before: https://screenshot.click/10-26-phfku-dwv0v.png
After: https://screenshot.click/10-26-zsfgg-aq372.png

@sofiamatulis sofiamatulis merged commit f10b784 into main Jul 10, 2023
5 of 7 checks passed
@sofiamatulis sofiamatulis deleted the unitprice-cart branch July 10, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants