You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: display dynamic estimate tag only when the shipping method is "delivery" (#3041)
Display dynamic estimate tag only when the shipping method is
"delivery".
Now IS returns the shipping method information for the tags object, so
we can take this into consideration when displaying tags.
For now, the IS update is only in a workspace, so you'll have to test it
locally. Make sure that the `gabiru` workspace (`vtex login vendemo -w
gabiru`) has the app `vtex.intelligent-search-api` installed in the
version `0.58.0-beta.999` (`vtex ls`). Then, make some changes in the
`packages/core/discovery.config.default.js` and
`packages/api/src/platforms/vtex/clients/search/index.ts`:
- Use the `vendemo` account, `BRA` country and `pt-BR` locale.
- Add the workspace to the `base` URL in `index.ts`, it should be:
```
const base = `https://gabiru--${account}.${environment}.com.br/api/io`
```
After setting a postal code, go to the Power tools category, see that
the product `BLACK+DECKER 20V MAX 5-1/2-Inch Cordless Circular Saw, Tool
Only (BDCCS20B)` doesn't have a tag associated.
<img width="1501" height="792" alt="Screenshot 2025-09-17 at 14 58 02"
src="https://github.com/user-attachments/assets/a2c91587-3957-46e7-87ec-36f5d7e978f0"
/>
In the case of this req to IS, this product has only the pickup dynamic
estimate, so we don't display it.
<img width="1001" height="639" alt="Screenshot 2025-09-17 at 15 16 32"
src="https://github.com/user-attachments/assets/9f45ec28-710f-482b-9a9a-8d5597872eb8"
/>
The other products in this query have the `delivery` estimate for
`next-day` only, so it displays `Receive tomorrow`.
<img width="1038" height="650" alt="Screenshot 2025-09-17 at 15 17 35"
src="https://github.com/user-attachments/assets/583e34c0-0ad5-4f47-9a44-a9c3fec5e354"
/>
You can compare how it was before this change using this preview
https://vendemo-cm9sir9v900u7z6llkl62l70j-g96ol5wx6.b.vtex.app/ - ⚠️
note that it'll show "Receive today" because there is the
"pickup-in-point" tag for `same-day` and we weren't checking the
shipping method.
<img width="1492" height="771" alt="Screenshot 2025-09-17 at 15 20 50"
src="https://github.com/user-attachments/assets/7c4092b4-8127-400e-aab6-85a1029a7b83"
/>
- [Jira task](https://vtex-dev.atlassian.net/browse/SFS-2858)
- [Slack
thread](https://vtex.slack.com/archives/C08SZUBMFDK/p1758113222697079)
0 commit comments