Short description of issue
We need to fetch a section in the context of the primary market, regardless of what market the user is currently browsing from
Reproduction steps
Use section rendering API to fetch a section without locale aware url /products/product-handle?sections=section-id (ie. not using Shopify.routes.root)
Expected: the section data will be returned in the context of the primary market, since the fetch url was not locale aware.
Actual: section data is returned in the context of the current market - catalog visibility, pricing, etc. matches the current market not the primary market.
Additional info
Based on posts such as: Langauge.root_url returns wrong value - #5 by stijn_code and docs (Section Rendering API) it seems like this should be possible.
What type of topic is this
Troubleshooting
Hey @Nic_Oliver - thanks for flagging this.
I checked on this, and just confirming: a non-locale-aware Section Rendering URL like /products/product-handle?sections=section-id doesn’t force the request into the primary market context. The sections / section_id parameter only controls which section markup is returned; the section still renders using the current storefront buyer/localization context.
So if the visitor is currently browsing from another market, market-contextual data like catalog visibility, pricing, currency, and localization can still reflect that current context rather than the primary market.
There isn’t currently a supported Section Rendering API parameter to explicitly say “render this section as the primary market” for a single request. If you need content from a specific market, the closest supported path is to request that market’s actual localized URL/web presence where possible. If you need primary-market reference data while the visitor remains in another market, I’d avoid relying on Section Rendering for that and expose that data from a market-independent source instead.
I definitely get this isn’t super ideal, especially for pricing/catalog use cases. I’m happy to pass this on as a feature request/docs update though, since the current behaviour around market context isn’t the most clear there, please feel free to share any other feature requests or things you’d like to see included in my feature request I’ll send up and I can get on that for you for sure.