feat: support international commerce with multi-store locale routing#117
Open
feat: support international commerce with multi-store locale routing#117
Conversation
Collaborator
Arnimag
commented
Apr 23, 2026
- Add store-centric config with shippingCountries (store-scoped) and projectCountries (project-wide) fetched in a single getStoreConfig call
- Scope checkout shipping address form to store countries; billing and account address forms allow all project countries via Intl.DisplayNames
- Extract useLanguageSwitcher hook shared by header LanguageSwitcher and footer CountryBlock, fixing WCAG listbox pattern on both
- Add locale routing with resolveLocalizedPath for slug-aware hreflang and locale switching (products, collections, content pages)
- Fix address deletion error caused by JSON parsing an empty 200 response
- Add store-centric config with shippingCountries (store-scoped) and
projectCountries (project-wide) fetched in a single getStoreConfig call
- Scope checkout shipping address form to store countries; billing and
account address forms allow all project countries via Intl.DisplayNames
- Extract useLanguageSwitcher hook shared by header LanguageSwitcher and
footer CountryBlock, fixing WCAG listbox pattern on both
- Add locale routing with resolveLocalizedPath for slug-aware hreflang
and locale switching (products, collections, content pages)
- Fix address deletion error caused by JSON parsing an empty 200 response
6 tasks
stacelKonrad
reviewed
May 4, 2026
| @@ -0,0 +1,102 @@ | |||
| 'use client' | |||
Collaborator
There was a problem hiding this comment.
Component seems identical to country-block. Possible duplicate?
Comment on lines
+68
to
+72
| const codes = countries ?? storeConfig.projectCountries | ||
| const displayNames = new Intl.DisplayNames([rfcLocale], { type: 'region' }) | ||
| const countryOptions = codes | ||
| .map((code) => ({ value: code, label: displayNames.of(code) ?? code })) | ||
| .sort((a, b) => a.label.localeCompare(b.label, locale)) |
Collaborator
There was a problem hiding this comment.
This will fire on every component rerender. Consider create a function that takes countries and rfcLocale as parameter and returns country options
Comment on lines
+43
to
+49
| addressType === 'shipping' | ||
| ? allAddresses.filter( | ||
| (addr) => | ||
| !addr.country || | ||
| storeConfig.shippingCountries.includes(addr.country) | ||
| ) | ||
| : allAddresses |
Collaborator
There was a problem hiding this comment.
This will fire on every component rerender. consider creating function that returns filtered addresses
| <Logo | ||
| src='/logo.svg' | ||
| href={homeHref} | ||
| alt='SHOPin' |
Collaborator
There was a problem hiding this comment.
Can we use translated alt?
| <Logo | ||
| src='/logo.svg' | ||
| href={homeHref} | ||
| alt='Logo' |
Collaborator
There was a problem hiding this comment.
Can we use translated text?
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.