Skip to content

@W-18811979 BOPIS (buy online pick up in store)#2646

Merged
patricksullivansf merged 157 commits intodevelopfrom
feature/shop-in-store
Jul 1, 2025
Merged

@W-18811979 BOPIS (buy online pick up in store)#2646
patricksullivansf merged 157 commits intodevelopfrom
feature/shop-in-store

Conversation

@patricksullivansf
Copy link
Contributor

@patricksullivansf patricksullivansf commented Jun 25, 2025

Description

Implements Buy Online Pick up In Store (BOPIS) also known as "Shop the Store for Composable Storefront".

The Store Locator is enhanced to accept location data from Search Engine deep links, and the shopper can use the Store Locator to select a store. After a store is selected the shopper can browse that store's inventory on the PLP and PDP. While the cart is empty the shopper can choose between "Deliver to Address" and "Pick up in Store" when adding
to the cart on the PDP. The cart, checkout, and order confirmation pages are updated to support the Pick-up In Store flow.

The principal changes for the implementation are:

  • We assume these SFRA BOPIS system-objecttype-extensions.xml are in place.

  • We are using the STORE_LOCATOR_IS_ENABLED feature toggle to enable/disable the BOPIS feature.

  • We will enable SE discovery of the BOPIS experience by seeding the SE with deep links to explicit Store Locator page URLs. Example: site.com/store-locator?city=New York&country=US
    This includes support for location-based URL parameters such as latitude, longitude, city, zip, country, and store, enabling deep-linking and automatic pre-selection of stores when users arrive via search engines or shared links (e.g., “Shoes near me” or “Store X near me”). Once selected, the store is persisted in localStorage and visually highlighted in the Store Locator UI. Store selection parameters are then removed from the URL post-selection to maintain clean shareable links.

  • We will leverage the cached nature of useCurrentBasket#totalItems to determine if the cart is empty so we can disable store selection appropriately across the PWA Kit. Worth noting this implies adding it as a new dependency to some components like the Store Locator.

  • We will conditionally add the refine ilids=<selected store inventory ID> to the product-search API made from the PLP; this refinement filters out results that are not in the store’s stock. However, we will not add this to the PLP URL, because we want the search constrained by the shopper’s store preference when sharing URLs, and because the UX should display store names not inventory IDs. This special handling of refinements will be net new code.

  • We will add the inventoryIds=<selected store inventory ID> to the products API made from the PDP; this adds the in store inventory to the response so we can show both the global and selected store inventory simultaneously.

  • We will conditionally add the inventoryId=<selected store inventory ID> to the PDP addItemToNewOrExistingBasket handler so the correct inventory for this item is referenced during the rest of the order process.

  • We will also conditionally add an additional step to the PDP addItemToNewOrExistingBasket handler to conditionally set the shipping method to “Pick Up in Store” and the shipping address to the selected store’s shipping address. We will use the existing sandbox c_storePickupEnabled: true custom field to identify the correct shipping method ID to use; however, the initial setup for this Shipping method needs further investigation. Finally, we set the c_fromStoreId: <store ID> in the shipping section.

  • For Cart, Checkout and Order pages we will use the existing sandbox c_storePickupEnabled: true and custom shipping method field and c_fromStoreId custom shipping field to identify when BOPIS is enabled for a cart and update the UX options to: show the delivery address as the pick up in store address and to disable alternate shipping method selection.

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

How to Test-Drive This PR

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

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)

shauryemahajanSF and others added 30 commits June 5, 2025 12:09
…angesForPickupInStore

Signed-off-by: snilakandan13 <119348013+snilakandan13@users.noreply.github.com>
shauryemahajanSF and others added 10 commits June 27, 2025 16:00
…902403/fixPDPRadioBehavior

@W-18902403 - Select Off of Pickup in Store Option on PDP if New Store is Out of Stock
* W-18779257 bopis review rename selectedStore

* W-18779257 bopis review rename pickup methods

* W-18779257 bopis review minor comments addressed

* W-18779257 bopis review store locator i18n
…902413/fixErrorMessageForAddToCartWithNoVariantSelected

@W-18902413 - Fixed Incorrect Add to Cart Error
Implement feature toggle for BOPIS in PWA Kit
@patricksullivansf
Copy link
Contributor Author

For the online only retailer customers, how would they disable this feature?

it's gated by STORE_LOCATOR_IS_ENABLED

@patricksullivansf
Copy link
Contributor Author

We assume these SFRA BOPIS system-objecttype-extensions.xml are in place.

Is there a prerequisite instructions on how to enable BOPIS on the ecom instance? What would happen to the pwa kit store if the system object isn't installed?

if the extensions are not installed we expect STORE_LOCATOR_IS_ENABLED to be false. Otherwise the store locator will not return data, and no pick up in store shipping method would be available.

* @W-18942954 BOPIS revert unneeded swatch change

* @W-18942954 BOPIS revert unneeded add to cart test change

* @W-18942954 BOPIS constant for radio labels
@bfeister bfeister dismissed alexvuong’s stale review July 1, 2025 21:18

Alex is on PTO today and it's been expressed we want to move this forward without waiting

Copy link
Contributor

@bfeister bfeister left a comment

Choose a reason for hiding this comment

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

let's get this merged 🚢

@patricksullivansf patricksullivansf merged commit a12b0f8 into develop Jul 1, 2025
35 checks passed
@patricksullivansf patricksullivansf deleted the feature/shop-in-store branch July 1, 2025 21:34
{
"path": "build/main.js",
"maxSize": "57 kB"
"maxSize": "60 kB"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this keeps growing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.