SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
276 stars 126 forks source link

W-14308527 Pricing display on cart, checkout, wishlist pages #1796

Closed alexvuong closed 1 month ago

alexvuong commented 1 month ago

Description

Pricing display on cart checkout wishlist pages due to product tile revampe

Types of Changes

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

Checklists

General

Accessibility Compliance

You must check off all items in one of the follow two lists:

or...

Localization

vmarta commented 1 month ago

For this particular product, I'm not seeing the strikethrough price, even though the API response contains the list price in there.

Arc 2024-05-28 at 11 00 54

vmarta commented 1 month ago

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 commented 1 month ago

Checkout is currently broken. Entering the Checkout page from Cart shows me this error:

Arc 2024-05-28 at 11 15 04

alexvuong commented 1 month ago

For this particular product, I'm not seeing the strikethrough price, even though the API response contains the list price in there.

Arc 2024-05-28 at 11 00 54

@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 getPriceData util), we should not attempt mix these data together since it is a complicated to understand that calculation for basket pricing and we may do it incorrectly. I don't think it is a big deal to miss the strikethrough price here since it is mostly informative, the price that shopper has to pay is correct. image

alexvuong commented 1 month ago

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?

Good catch, I've fixed it to match the original behavior.

alexvuong commented 1 month ago

Checkout is currently broken. Entering the Checkout page from Cart shows me this error:

Arc 2024-05-28 at 11 15 04

This is fixed. Thanks for catching that

bendvc commented 1 month ago
image

In the above picture am I supposed to see strike-through pricing as I did on the PDP and add-to-cart modal?

alexvuong commented 1 month ago
image

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 https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1796#issuecomment-2135891084