# Component: Block Purchase Dialog

**Purpose:** Use this Enforcement Component to block multiple purchases of any products or the same product on the checkout.

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

Important consideration:

* **This component should only be used on the Limio Checkout.** If you are using it on other pages (e.g. offers Pages), please contact <support@limio.com>.
* This component will only work for Limio Products that have been set to **Block Multiple Purchases?** to True. If the customer purchased subscription has a product with Block Multiple Purchase? set to False, the component will not activate.
* If you want to prevent multiple purchases of one product but allow the purchase of other products, you must set **Allow Purchase Different Product?** to True.
* To display this Dialog, the checkout must be authenticated.

| heading                | Heading                                                                     | string      | You're already a subscriber                                                                      | Message visible to customers                                                                                                                                                                                                                                                                                                                                           |
| ---------------------- | --------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| body                   | Body                                                                        | richtext    | It looks like you're already a subscriber. Go to your account to edit your current subscription. | Message visible to customers                                                                                                                                                                                                                                                                                                                                           |
|                        | Minimum number of subscriptions for a dialog to appear                      | number      | 0                                                                                                | <p>This block will appear only if the customer has at least X subscription(s).<br><br>This can be helpful if you want to block all purchase for existing subscribers.<br><br>If set to 0, the modal will be displayed if the customer has 1 or more subscriptions. If set to 1, the modal will be displayed if the customer has 2 or more subscriptions and so on.</p> |
| addSubRef              | Add subscription reference to URL, if present?                              | boolean     | FALSE                                                                                            | <p>If enabled, if the customer has only one subscription, Limio will add the subscription reference as a query parameter to the URL<br><br>If the customer has multiple subscriptions, this setting is ignored and no query parameter is added.</p>                                                                                                                    |
| addPurchaseCountry     | Add purchase country URL, if present?                                       | boolean     | FALSE                                                                                            |                                                                                                                                                                                                                                                                                                                                                                        |
| showButton             | Show a button?                                                              | boolean     | FALSE                                                                                            | Show a button that allows you to redirect the customer, for example to the appropriate product or to their self-service portal                                                                                                                                                                                                                                         |
| alwaysBlock            | Always show the block?                                                      | boolean     | FALSE                                                                                            | Overrides the product requirement and block if someone has ANY active subscription                                                                                                                                                                                                                                                                                     |
| allowDifferentProducts | Allow to purchase different products?                                       | boolean     | FALSE                                                                                            |                                                                                                                                                                                                                                                                                                                                                                        |
| allowClose             | Always to close the dialog for subscriptions with 'Block Multiple' disabled | boolean     | FALSE                                                                                            |                                                                                                                                                                                                                                                                                                                                                                        |
| buttonLabel            | Button label                                                                | buttonLabel | Click here                                                                                       | Define button text                                                                                                                                                                                                                                                                                                                                                     |
| buttonUrl              | Button URL                                                                  | buttonUrl   | /mma                                                                                             | Define button URL                                                                                                                                                                                                                                                                                                                                                      |
| componentId            | Component Id                                                                | string      | block-purchase-dialog-limio                                                                      |                                                                                                                                                                                                                                                                                                                                                                        |


---

# 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-purchase-dialog.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.
