@W-17442945 BOPIS Shop the Store PLP and PDP SteelThread#2226
@W-17442945 BOPIS Shop the Store PLP and PDP SteelThread#2226hajinsuha1 merged 17 commits intofeature-bopisfrom
Conversation
…com:SalesforceCommerceCloud/pwa-kit into W-17442945-bopis-shop-the-store-steelthread
…ed in the context
| export const StoreLocatorContext = createContext() | ||
| export const StoreLocatorProvider = ({children}) => { | ||
| const storeLocator = useStoreLocator() | ||
|
|
||
| return ( | ||
| <StoreLocatorContext.Provider value={storeLocator}>{children}</StoreLocatorContext.Provider> | ||
| ) | ||
| } | ||
|
|
||
| StoreLocatorProvider.propTypes = { | ||
| children: PropTypes.node.isRequired | ||
| } |
There was a problem hiding this comment.
would it be preferred to move this to the contexts/index.js?
| children: PropTypes.node.isRequired | ||
| } | ||
|
|
||
| export const useStoreLocator = () => { |
There was a problem hiding this comment.
any preference on leaving this code here or moving it to a separate file in hooks/use-store-locator?
There was a problem hiding this comment.
Sounds good. That would make file changes to the store locator modal more easy
| /> | ||
| )} | ||
|
|
||
| <Link>{selectedStore.name}</Link> |
There was a problem hiding this comment.
it's possible to create a store with no name. Should we throw an error in that case?
There was a problem hiding this comment.
If a store is created with no name, that should be a concern on the BM/store creation side and not an error that the shoppers' UX should have to deal with. I think it would be fine to keep it simple and just display what the API gives.
|
I'm seeing the DNT notification pop up again and again. Can you try doing I don't see this issue locally but just making sure |
@jeremy-jung1 thanks for catching that! I've redeployed the site and it looks like the DNT pop up is working now |
packages/template-retail-react-app/app/hooks/use-store-locator.test.js
Outdated
Show resolved
Hide resolved
bfeister
left a comment
There was a problem hiding this comment.
One small nit on the testing strategy, but looks good overall 👍
Description
PLP: Adds a checkbox refinement to filter products by store availability
PDP: Adds text on store availability
This PR is a SteelThread for updating the PLP and PDP with base functionality of "Shop the Store" to verify the Shopper API's didn't require any changes. We have separate stories for finalizing the design for the PLP and PDP.
W-17442945
Figma PDP "BOPIS"
Figma PLP "BOPIS"
PLP
Before
After
PDP
Before
After
Types of Changes
Changes
ProductViewto include aStoreAvailabilityTextthat displays whether the item is in stock at the selected storeuseSelectStorecustom hook for handling setting and getting store info from local storageProductDetailto pass theinventoryIdof the selected store in the parameters ofuseProductProductListto include aStoreAvailabilityRefinementthat allows users to filter products by storeHow to Test-Drive This PR
For this work, i've updated
zzrf_001and added a new inventoryinventory_m_store_store12and assigned it to theSan Mateo Retail Storein BM.Latest changes have been deployed to https://cloud-jinsu-env3.mobify-storefront-staging.com/
No Store Selected
Shop by Availabilityaccordian panel with a checkbox item with the textSelect StoreIn Stock at Select StoreStore with no inventoryId Selected
PLP
PDP
Store with inventoryId Selected
PLP
United Statesfor the country and enter94086for the postal code.San Mateo Retail Store/product-searchAPI call is made with the query param:?refine: ilids=inventory_m_store_store12/product-searchAPI call is made without the query param:?refine: ilids=inventory_m_store_store12PDP
Other Tests
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization