Skip to content

feat: support international commerce with multi-store locale routing#117

Open
Arnimag wants to merge 1 commit intomainfrom
87-feat-support-international-commerce
Open

feat: support international commerce with multi-store locale routing#117
Arnimag wants to merge 1 commit intomainfrom
87-feat-support-international-commerce

Conversation

@Arnimag
Copy link
Copy Markdown
Collaborator

@Arnimag 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
@Arnimag Arnimag requested a review from a team April 23, 2026 09:36
@Arnimag Arnimag linked an issue Apr 23, 2026 that may be closed by this pull request
6 tasks
@@ -0,0 +1,102 @@
'use client'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fire on every component rerender. consider creating function that returns filtered addresses

<Logo
src='/logo.svg'
href={homeHref}
alt='SHOPin'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use translated alt?

<Logo
src='/logo.svg'
href={homeHref}
alt='Logo'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use translated text?

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

Successfully merging this pull request may close these issues.

FEAT: Support international commerce

2 participants