Skip to content

@W-18669182 multiship cart support#2784

Merged
patricksullivansf merged 3 commits intofeature/multishipfrom
psullivan.W-18669182.multishipCartDraft
Jul 14, 2025
Merged

@W-18669182 multiship cart support#2784
patricksullivansf merged 3 commits intofeature/multishipfrom
psullivan.W-18669182.multishipCartDraft

Conversation

@patricksullivansf
Copy link
Contributor

@patricksullivansf patricksullivansf commented Jul 10, 2025

Description

Implements grouping by shipment type on the cart page. one group for each pickup shipment and one group for all delivery shipments.

Adds a combo to switch between shipment groups that moves items from a pickup group to the delivery group, or from the delivery group to a pickup group for the store locator's current store.

Allows store selection in the store locator even when the cart is not empty (it was restricted for BOPIS single shipment mode)

Aside:

  • styling does not yet match the Figma.
  • other pages like PDP are not yet updated to support store selection change with non-empty cart.
  • there are multiple additional bugs identified by TODO in the PR
Screenshot 2025-07-10 at 1 01 02 PM

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

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

  • (change1)

How to Test-Drive This PR

A test environment for this PR is cc-sparks-patrick

  • Add items to the cart and navigate to the cart page.
  • Change Store Locator selected store and change cart item delivery combo.

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

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

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@patricksullivansf patricksullivansf added the skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated label Jul 10, 2025
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jul 10, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

const isPickupOrder = STORE_LOCATOR_IS_ENABLED
? basket?.shipments[0]?.shippingMethod?.c_storePickupEnabled === true
: false
const storeId = basket?.shipments?.[0]?.c_fromStoreId
Copy link
Contributor

Choose a reason for hiding this comment

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

When playing around, found a bug with our exisitng BOPIS that could make this buggy - currently, if pick up in store item is added and then removed, when adding a delivery item c_fromStoreId is still filled. I'll try and fix this in my WI.

import {FormattedMessage} from 'react-intl'
import {Box, Text} from '@salesforce/retail-react-app/app/components/shared/ui'
import StoreDisplay from '@salesforce/retail-react-app/app/components/store-display'

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if we want to disable it here or above, but guessing we don't want to display this if itemsInShipment is 0. For example - Delivery - 0 out of 1 items not really needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

An empty delivery group is supposed to be deleted. There's currently a bug around 'me' but otherwise 0 out of 1 should not happen

@patricksullivansf patricksullivansf marked this pull request as ready for review July 14, 2025 18:39
@patricksullivansf patricksullivansf requested a review from a team as a code owner July 14, 2025 18:39
defaultMessage: 'Sorry, there are no locations in this area.'
})
if (hasItemsInBasket) {
if (storeSelectionDisabled && hasItemsInBasket) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there reason to keep the hasItemsInBasket check and its message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we still support BOPIS with MULTISHIP_IS_ENABLED false

@patricksullivansf patricksullivansf merged commit 432aa7c into feature/multiship Jul 14, 2025
36 checks passed
@patricksullivansf patricksullivansf deleted the psullivan.W-18669182.multishipCartDraft branch July 14, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants