Repository navigation
feat: Shipping methods integration - #2847
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
8bbbd59 to
772ebe7
Compare
There was a problem hiding this comment.
These changes shouldn't cause any type errors for other stores since I've just added a new action type case.
| } | ||
| `) | ||
|
|
||
| export const usePickupPoints = () => { |
There was a problem hiding this comment.
The important thing here is to observe the number of this query calls (Network tab), if it's being made when it shouldn't.
There was a problem hiding this comment.
Same thing here regarding type errors for other stores, here I've just added an optional param at the end of the function signature, so it shouldn't break any code using this function only with the required params.
hellofanny
left a comment
There was a problem hiding this comment.
Well Done 🥇
I've tried few scenarios:
- No pickup point available:
- no pickup point facet added ✅
- Available facets displayed + pickup point facet added when available
- params being updated according ✅
- pickup-all not being displayed because is not enabled ✅
We're aware of the pickup-nearby issue — in this case, it's not being displayed because it's not being returned by the API.
| : undefined | ||
|
|
||
| let filteredFacets = facets.filter((facet) => facet.key !== 'shipping') | ||
| if (isDeliveryPromiseEnabled) { |
There was a problem hiding this comment.
This is very similar to the filterFacets logic in FilterDesktop. It would be great if we could extract it for reuse, it would really help with maintainability. Let's try to revisit this and refactor it later. 🤞
| onClick: () => { | ||
| resetInfiniteScroll(0) | ||
|
|
||
| const noPickupInPointShippingFacet = selected.find( |
There was a problem hiding this comment.
I think I didn't understand this part 😕
There was a problem hiding this comment.
I think it'll be clear change to otherShippingFacet, but the logic is basically we'll filter the list to not have the pickupPoint facet for the other shipping methods, not the pickup-in-point.
## What's the purpose of this pull request? Feature branch for the Delivery Promise feature - phase 1.2 (filters by shipping method). - #2803 - #2826 - #2845 - #2847 - #2851 - #2852 - #2847 - #2872 - #2886 - #2909 - #2916 - #2918 - #2922 - #2887 - #2944 - #2953 - #2956 - #2955 - #2961 - #2962 ## How it works? <!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. ---> ## How to test it? <!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? ---> ### Starters Deploy Preview <!--- Add a link to a deploy preview from `starter.store` with this branch being used. ---> <!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. ---> ## References - [Jira epic](https://vtex-dev.atlassian.net/browse/SFS-2038) ## Checklist **Documentation** - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Fanny Chien <[email protected]> Co-authored-by: Otavio Moreira Meirelles <[email protected]>
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
This PR contains the shipping methods integration with API. We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario. The `usePickupPoints` hook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create the `pickup-in-point` facet on the client-side (it's not delivered by the IS API) and inject on the facets list. When the `pickup-in-point` is selected, a additional facet called `pickupPoint` is also added on the facets list, then on the Search client (`@faststore/api`) we transform it on query string param and send it in the `product_search` IS request. | Desktop | Mobile | | - | - | |  |  | - Use the following postal code: `50030-260`; - Pay attention to the behavior of each different filter: each one must send the correct parameters/variables in the query (check the `Network` tab); - Observe the behavior and visibility of the filters on both desktop and mobile, the logic is similar but they have some different details that can impact navigation; vtex-sites/faststoreqa.store#812
What's the purpose of this pull request?
This PR contains the shipping methods integration with API.
We already have some of the shipping facets being rendered, but no action was being made. After these changes, the filters should work depending on the selected scenario.
How it works?
The
usePickupPointshook is responsible to get the list of pickup points available for the specific location in session. Based on that list, we create thepickup-in-pointfacet on the client-side (it's not delivered by the IS API) and inject on the facets list.When the
pickup-in-pointis selected, a additional facet calledpickupPointis also added on the facets list, then on the Search client (@faststore/api) we transform it on query string param and send it in theproduct_searchIS request.How to test it?
50030-260;Networktab);Starters Deploy Preview
vtex-sites/faststoreqa.store#812