Update cart unit price to reflect of line item #2746
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofline_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