> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/components/component-library/standard-components/component-block-related-purchase-modal.md).

# Component: Block Related Purchase Modal

#### **Purpose**

Use this Enforcement Component to block purchases related to a product a customer already owns. For example, if you want someone who already has Digital + Print to not be able to buy Digital, then use this component.

Another example is if a customer has your Gold package, they should not be able to buy an add-on already included in Gold.

{% embed url="<https://69c2cf3a42a094f3cd354b8d-hbwumtssfk.chromatic.com/?path=/story/shop-components-dialogs-block-related-purchase-modal--default&full=1&shortcuts=false&singleStory=true&embed=true>" %}

### Important considerations

* This component will only work to block purchases of products specified in the **Related Products to Block Purchase** attribute of a Limio Product the user owns.
* If you want to the block to apply both ways (owning product A prevents purchasing product B and vice versa) then the attribute needs to be configured on both products.
* To display this Dialog, the checkout must be authenticated.

| **id**      | **label**            | **type**    | **default**                                       | **Purpose**                                                                                      |
| ----------- | -------------------- | ----------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| heading     | Heading              | string      | You already have a related product.               | Message visible to customers                                                                     |
| body        | Body                 | richtext    | It looks like you already have a related product. | Message visible to customers                                                                     |
| showButton  | Show a button?       | boolean     | FALSE                                             | Show a button that allows you to redirect the customer, for example to their self-service portal |
| buttonLabel | Button label         | buttonLabel | Click here                                        | Define button text                                                                               |
| buttonUrl   | Redirect Destination | buttonUrl   | /                                                 | Define button URL                                                                                |
| componentId | Component Id         | string      | block-related-purchase-modal                      |                                                                                                  |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.limio.com/components/component-library/standard-components/component-block-related-purchase-modal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
