-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix/regionalization behaviour #96
base: master
Are you sure you want to change the base?
Conversation
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
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.
I've tested this feature on this customer:
https://sfp--qalojacolgate.myvtex.com/
Cy-Runner
Cypress Dashboard
Success
|
…ex-apps/storefront-permissions into fix/regionalization-behaviour
…issions into fix/regionalization-behaviour
Kudos, SonarCloud Quality Gate passed! |
Hi @cesarocampov. Could you please help fix those conflicts? After that I think we can ask @arturmagalhaesjr and @wender a final review. Thanks! |
@cesarocampov Hi, can you please resolve the conflicts? |
What problem is this solving?
The current implementation of the storefront permissions apply both regionv2 and private-seller regionalization types at the same time.
These two regionalisation are not supported at the same time by IS team. thus breaking the search.
the PR is adding a new default prop to the sessionWatcher which is regionalizationType, to control the regionalization behaviour that will happen on the site.
the Prop is set as DEFAULTV2 as default to allow backwards compatibility.
Also adds the regionv1 option for stores that require it.
How should this be manually tested?
on account: https://indolaiberia.myvtex.com/admin/b2b-organizations/organizations#/organizations add a user under the second organization in the list, this has a seller assigned and a cost center which will apply regionId and private-seller filters at the same time as seen on the segmentToken:
{
"campaigns": null,
"channel": "1",
"priceTables": null,
"regionId": "v2.E95EF045DF737D9448B8590373D19E5E",
"utm_campaign": null,
"utm_source": null,
"utmi_campaign": null,
"currencyCode": "EUR",
"currencySymbol": "€",
"countryCode": "ESP",
"cultureInfo": "es-ES",
"admin_cultureInfo": "en-US",
"channelPrivacy": "public",
"facets": "sellername=H'almagro;private-seller=indolaiberiaswl5;"
}
See that the front end is broken:
Do the ssame thing on this workspace https://cesar--indolaiberia.myvtex.com/color/coloracion-permanente
there are no current settings so it is applying the DEFAULTV2 as shown on the segment token:
{
"campaigns": null,
"channel": "1",
"priceTables": null,
"regionId": "v2.E95EF045DF737D9448B8590373D19E5E",
"utm_campaign": null,
"utm_source": null,
"utmi_campaign": null,
"currencyCode": "EUR",
"currencySymbol": "€",
"countryCode": "ESP",
"cultureInfo": "es-ES",
"admin_cultureInfo": "en-US",
"channelPrivacy": "public"
}
on the workspace admin grapqhl-ide, you can use the mutation to change the settings:
mutation{
sessionWatcher(active:true, regionalizationType:DEFAULTV1)
}
On the workspace admin grapqhl-ide, you can use the query to get the settings:
query {
getSessionWatcher {
active
regionalizationType
}
}