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 124 forks source link

Fix: Ensure product bundle child variant selections are respected @W-15110504@ #1858

Closed joeluong-sfcc closed 5 days ago

joeluong-sfcc commented 1 week ago

Description

This PR uses the updateItemsInBasket endpoint to update the variant selections in for product bundle children.

As of July 1st, 2024, the changes are deployed here and can be manually tested: https://scaffold-pwa-test-env-3.mobify-storefront.com/global/en-GB/product/test-bundle

Screenshot 2024-07-01 at 10 07 49 AM

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

How to Test-Drive This PR

If you'd like to test against an instance with a bundle with children products that have variant selections instead of the default turquoise jewelry bundle, DM for details for updating your default.js

  1. git checkout ju/update_child_variant
  2. start the template-retail-react-app
  3. look for a product bundle
  4. add product bundle to cart selecting variants
  5. navigate to cart page and observe that variant selections are reflected in the line item
  6. edit the product bundle by using the product modal
  7. observe that the changes are reflected in the cart

Checklists

General

Accessibility Compliance

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

or...

Localization

vcua-mobify commented 1 week ago

Left some comments in a slack thread. I think I am following the right steps for testing this change?

Could you please add some test steps here @joeluong-sfcc ?