> 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/additional-features/global-product-restriction.md).

# Global Product Restriction

Global Product Restriction lets retailers control which products can be sold in specific countries. Use it to prevent restricted items from appearing in valid purchase flows for selected markets.

### Global Product Restriction configuration

To use this feature, enable it in **eShopWorld → Settings → Checkout → General configuration**.

After the feature is enabled, product-level country restrictions can be configured from the Adobe Commerce product page.

### Restrict a product by country

To restrict a product in selected countries:

1. Open the product you want to restrict.
2. Scroll to the **eShopWorld** section.
3. Find the **Product Restriction by Country** attribute.
4. Select one or more countries from the list.
5. To restrict the product in every ESW-enabled market, select **All Eshopworld Countries**.
6. Save the product.

For example, if you select **Ireland**, the product cannot be purchased when the shopper country is Ireland.

### Frontend behavior

When a restricted product is targeted for a blocked country, the extension prevents checkout actions and shows a restriction message.

#### Product detail page

If the shopper clicks **Add to Cart** on the product detail page, the product is not added to the cart and an error message is shown.

#### Product listing page

If the shopper clicks **Add to Cart** from the product listing page, the shopper is redirected to the product detail page. The restriction message is shown there, and the product is not added to the cart.

#### Cart page

If the cart already contains a restricted product and the shopper clicks **Proceed to Checkout**, the extension shows an error message and highlights the restricted item. The shopper cannot continue to checkout until the restricted product is removed.

### Headless implementation

Global Product Restriction also supports PWA and other headless storefronts through GraphQL.

#### Scenario 1: Add restricted product to cart

If a user tries to add a restricted product to the cart through GraphQL, the mutation returns a restriction message and the product is not added.

#### Scenario 2: Restricted product already exists in cart

If a product was added to the cart before the restriction was configured, later GraphQL cart queries return a message showing that a restricted product is present in the cart.

#### Scenario 3: Request checkout URL with restricted product in cart

If a user requests the checkout URL while the cart contains a restricted product, the restriction message is returned and the checkout flow is blocked.

### Expected result

After setup is complete:

* restricted products cannot be purchased in blocked countries
* shoppers see clear restriction messages on storefront and checkout actions
* headless storefronts receive the same restriction logic through GraphQL


---

# 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/additional-features/global-product-restriction.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.
