Skip to content
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

[FEATURE] Support multiple siteAliases for a B2C Commerce Site #1816

Open
johnboxall opened this issue Jun 4, 2024 · 1 comment
Open

[FEATURE] Support multiple siteAliases for a B2C Commerce Site #1816

johnboxall opened this issue Jun 4, 2024 · 1 comment

Comments

@johnboxall
Copy link
Collaborator

johnboxall commented Jun 4, 2024

The PWA Kit's support for Multiple B2C Commerce sites could be improved by allowing sites to define an array of aliases rather than one:

TODAY

// config/default.js
modules.exports {
  siteAliases: {
    RefArchGlobal: 'global'
  }
}

TOMORROW

// config/default.js
modules.exports {
  siteAliases: {
    RefArchGlobal: ['de', 'mx', 'fr']
  }
}

This approach is common when using a international B2C Commerce site to serve a number of different countries.

It would likely also be nessecary to add additional metadata to site.js to allow the correct locacle to be selected, though perhaps that could also live in a more complex "alias".

https://github.com/SalesforceCommerceCloud/pwa-kit/blob/develop/packages/template-retail-react-app/config/default.js
https://github.com/SalesforceCommerceCloud/pwa-kit/blob/develop/packages/template-retail-react-app/config/sites.js

@alexvuong
Copy link
Collaborator

@johnboxall In pwa-kit we do have util to build the url based on this settings, I am wondering if we allow this settings, how should we know which alias to choose from this list to build the urls here?
E.g When the site is RefArchGlobal, how can we determine which aliases ('de', 'mx', or 'fr')to pick here? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants