-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@W-17442945 BOPIS Shop the Store PLP and PDP SteelThread #2226
base: feature-bopis
Are you sure you want to change the base?
@W-17442945 BOPIS Shop the Store PLP and PDP SteelThread #2226
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be preferred to move this to the contexts/index.js?
StoreLocatorProvider.propTypes = { | ||
children: PropTypes.node.isRequired | ||
} | ||
|
||
export const useStoreLocator = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Test drive works for me too
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
ProductView
to include aStoreAvailabilityText
that displays whether the item is in stock at the selected storeuseSelectStore
custom hook for handling setting and getting store info from local storageProductDetail
to pass theinventoryId
of the selected store in the parameters ofuseProduct
ProductList
to include aStoreAvailabilityRefinement
that allows users to filter products by storeHow to Test-Drive This PR
For this work, i've updated
zzrf_001
and added a new inventoryinventory_m_store_store12
and assigned it to theSan Mateo Retail Store
in BM.Latest changes have been deployed to https://cloud-jinsu-env3.mobify-storefront-staging.com/
No Store Selected
Shop by Availability
accordian panel with a checkbox item with the textSelect Store
In Stock at Select Store
Store with no inventoryId Selected
PLP
PDP
Store with inventoryId Selected
PLP
United States
for the country and enter94086
for the postal code.San Mateo Retail Store
/product-search
API call is made with the query param:?refine: ilids=inventory_m_store_store12
/product-search
API call is made without the query param:?refine: ilids=inventory_m_store_store12
PDP
Other Tests
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization