Hi everyone,
I am building a Customer Account UI Extension and need to provide a link/redirect back to a specific page on the Online Store.
Our store uses Shopify Markets with subfolders (e.g., /en-ca, /fr-fr). When a customer is in their account portal and clicks a link to go back to the storefront, we need to ensure they land on the URL with their specific market prefix attached.
The Issue:
We haven’t found a documented way within the ui-extensions API to:
-
Dynamically retrieve the current customer’s Market subfolderSuffix or Storefront URL including the subfolder.
-
Programmatically trigger a redirect that respects these localized routes.
What we’ve tried:
-
Hardcoding the root URL (loses the market context).
-
Checking the
LocalizationAPI, but it primarily offers currency/country codes rather than the URL subfolder path.
Is there a standard way to get the “Current Market Storefront Root” from within a Customer Account extension, or a recommended method to handle this navigation?
Thanks!