> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/adobe-commerce-magento/integration/location-parameter-support.md).

# Location Parameter Support

The ESW extension supports a `location` query parameter that forces storefront rendering for a specific market.

Use this when one Adobe Commerce website serves multiple countries and currencies from the same storefront.

Example:

`{domain}/lifelong-fitness-iv.html?location=FR`

When the parameter is present, the extension resolves the selected market and loads country-specific pricing for that request.

### Common use cases

Use the `location` parameter when you need to:

* open a product page for a specific local market
* switch between markets that share the same store view
* generate localized product feed URLs for a target country

This behavior is commonly used with [XFeed Product Feeds](/adobe-commerce-magento/additional-features/xfeed-product-feeds.md).

### Prerequisites

Before using the `location` parameter:

* configure allowed countries in Adobe Commerce
* configure the required currencies for the website
* confirm the target market is supported by the ESW checkout configuration

For pricing setup details, refer to [Pricing Model](/adobe-commerce-magento/adobe-commerce-extension-integration/getting-started/pricing-model.md).

### Cache behavior when `location` is used

When a request includes the `location` parameter, Adobe Commerce must process the request through the backend so the correct country and currency cookie values can be set.

Default Fastly or Varnish behavior can block that flow by serving cached HTML before the cookie logic runs.

To avoid this, bypass the cache for requests that include the `location` parameter.

### Fastly or Varnish configuration

Add a response rule that passes matching requests to the backend.

Use an example like this in a `vcl_fetch` snippet with priority `2`:

```sql
if (beresp.http.Content-Type ~ "text/(html|xml)" && req.url ~ "^/.*\?(.*&)?location=[a-zA-Z][a-zA-Z](&.*)?$") {
  return(pass);
}
```

{% hint style="warning" %}
This is an example snippet. Validate it against your Fastly module version, Varnish version, and any existing custom VCL before deploying it.
{% endhint %}

### Verify the setup

After the rule is deployed:

1. Open a product URL with `?location=FR` or another supported market code.
2. Confirm that the storefront switches to the expected country and currency.
3. Refresh the page and confirm the market stays correct.
4. Repeat the test for another country code.

If your storefront also uses country-specific cache variation, review [Calculated Pricing Cache Setup](/adobe-commerce-magento/integration/calculated-pricing-cache-setup.md).

### Expected result

After setup is complete:

* `location` URLs resolve to the correct local market
* the correct country and currency cookies are set
* cached storefront responses do not block market switching


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/adobe-commerce-magento/integration/location-parameter-support.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
