Repository navigation
fix: channel's regionId and seller - #2768
Merged
Merged
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. |
lucasfp13
approved these changes
Apr 8, 2025
lariciamota
marked this pull request as ready for review
April 8, 2025 15:12
lariciamota
requested review from
eduardoformiga,
emersonlaurentino and
hellofanny
and removed request for
a team,
eduardoformiga and
emersonlaurentino
April 8, 2025 15:12
hellofanny
approved these changes
Apr 8, 2025
3 tasks
lariciamota
added a commit
that referenced
this pull request
Apr 11, 2025
## What's the purpose of this pull request? The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. ## How it works? The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. ## How to test it? Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for 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 <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
Apr 22, 2025
## What's the purpose of this pull request? The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. ## How it works? The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. ## How to test it? Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for 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 <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
May 8, 2025
## What's the purpose of this pull request? The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. ## How it works? The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. ## How to test it? Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for 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 <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
May 12, 2025
## What's the purpose of this pull request? The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. ## How it works? The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. ## How to test it? Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for 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 <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
May 13, 2025
## What's the purpose of this pull request? Feature branch for the Delivery Promise feature - phase 1 (navigation based on shopper location). - #2708 - #2728 - #2739 - #2745 - #2749 - #2750 - #2768 - #2772 - #2775 - #2809 - #2817 - #2824 - #2835 ## How it works? ## How to test it? ### Starters Deploy Preview ## References - [Jira epic](https://vtex-dev.atlassian.net/browse/SFS-1696) ## Checklist - [ ] For documentation changes, ping `@Mariana-Caetano` to review and update (Or submit a doc request) - [ ] TODO: Request Doc for PopOver - [ ] TODO: Remind to run cms sync in the default account when the feature branch is merged since new section was added. (And add the new section in the admin!) --------- Co-authored-by: Lucas Feijó <[email protected]> Co-authored-by: Fanny Chien <[email protected]>
lariciamota
added a commit
that referenced
this pull request
May 13, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
May 13, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
May 14, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
Jun 20, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
Jun 20, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lucasfp13
pushed a commit
that referenced
this pull request
Jun 20, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lucasfp13
pushed a commit
that referenced
this pull request
Jun 20, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
Jun 23, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
lariciamota
added a commit
that referenced
this pull request
Jul 2, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
hellofanny
pushed a commit
that referenced
this pull request
Jul 2, 2025
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel `regionId` wasn't being updated. The Checkout updates the session's `regionId` when we update the session to add info about `geoCoordinates`, `country`, and `postalCode`. But we were only doing that when the Delivery Promise feature was enabled. This conditional was removed. For the `sellers` info that we get from Checkout request, we only need to make this request if there is a `seller` info inside the `channel`. So a conditional was introduced to reduce the need of making this request every time. Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add `regionId` inside the channel when a `postalCode` is added in the RegionBar. To check the `seller` info: an option is changing the config inside `discovery.config`: `channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',` and also set a `postalCode` there: `postalCode: '90210',` The session in the IndexedDB should contain the valid seller (example: `storeframework01`) inside the channel if it was added (in config, for example). <!--- 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. ---> <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What's the purpose of this pull request?
The PR #2749 introduced a bug: when the store doesn't have the Delivery Promise feature enabled, the channel
regionIdwasn't being updated.How it works?
The Checkout updates the session's
regionIdwhen we update the session to add info aboutgeoCoordinates,country, andpostalCode. But we were only doing that when the Delivery Promise feature was enabled.This conditional was removed.
For the
sellersinfo that we get from Checkout request, we only need to make this request if there is asellerinfo inside thechannel. So a conditional was introduced to reduce the need of making this request every time.How to test it?
Check it with Delivery Promise enabled and disabled. On both flows the session in the IndexedDB should be updated to add
regionIdinside the channel when apostalCodeis added in the RegionBar.To check the
sellerinfo: an option is changing the config insidediscovery.config:channel: '{"salesChannel":"1","regionId":"","hasOnlyDefaultSalesChannel":"true", "seller":"storeframework01"}',and also set a
postalCodethere:postalCode: '90210',The session in the IndexedDB should contain the valid seller (example:
storeframework01) inside the channel if it was added (in config, for example).Starters Deploy Preview
References