-
Notifications
You must be signed in to change notification settings - Fork 134
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
W-14308527 Pricing display on cart, checkout, wishlist pages #1796
W-14308527 Pricing display on cart, checkout, wishlist pages #1796
Conversation
@@ -84,31 +91,41 @@ test('should render product details page', async () => { | |||
global.server.use( | |||
// Use a single product (and not a product set) | |||
rest.get('*/products/:productId', (req, res, ctx) => { | |||
return res(ctx.json(productsResponse.data[0])) | |||
return res(ctx.json(masterProduct)) |
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.
We pushed history to be a master product, we should mock the data accordingly. the productsResponse.data[0]
we used previously was a variant product, not a master one. Therefore, although the tests passed, but it caused a lot of react warning errors during the tests. This would fix these errors
For this particular product, I'm not seeing the strikethrough price, even though the API response contains the list price in there. |
In my previous screenshot, now we're showing the unit price, even when the quantity is 1. Originally we show the unit price only when the quantity is more than 1. What is the supposed to be the correct behaviour? |
@vmarta For the price here, we are using basket pricing instead of getProduct pricing since basket pricing may include different promotion/discount on basket level. For this particular product, it does not seem to return the list price of the products at all IMO, we should either use basket pricing OR product pricing to display price (via |
Good catch, I've fixed it to match the original behavior. |
packages/template-retail-react-app/app/components/item-variant/item-price.jsx
Outdated
Show resolved
Hide resolved
packages/template-retail-react-app/app/components/item-variant/item-price.jsx
Show resolved
Hide resolved
packages/template-retail-react-app/app/components/item-variant/item-price.jsx
Outdated
Show resolved
Hide resolved
packages/template-retail-react-app/app/components/product-view/index.jsx
Show resolved
Hide resolved
In the above picture am I supposed to see strike-through pricing as I did on the PDP and add-to-cart modal? Please see this comment #1796 (comment) |
Description
Pricing display on cart checkout wishlist pages due to product tile revampe
Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization