# 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-ojozztnsdo.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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
