# Adding a Checkout Rule

The Shopify checkout rule acts as the final safeguard against invalid orders. Even if the customer bypasses earlier warnings on the product or cart pages, this rule ensures that no unauthorized purchases can slip through.

If a customer tries to check out with a cart that violates the limits you’ve set—whether by visiting the checkout URL directly or ignoring the earlier notifications—this Checkout Rule will prevent them from completing their purchase. It acts as a reliable barrier, ensuring your order limits are strictly enforced no matter how the customer attempts to proceed.

By setting this up, you protect your store from unexpected bulk purchases, avoid shipping complications, and keep your inventory balanced.

### Step 1: Accessing the Checkout rules

First, navigate to your settings by going to `Settings > Checkout > Checkout rule`. Once there, select the option to `Add rule`.

<figure><img src="https://1127841897-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNcn43OdOESI4pU0zj5tW%2Fuploads%2FrvQDqMQW8Dn656unMy86%2Fimage.png?alt=media&#x26;token=fb2c8def-97aa-4e9a-a817-63847b01b73c" alt=""><figcaption></figcaption></figure>

### Step 2: Selecting the Appropriate Validation

In the dropdown menu, choose `Avada Order Limit > avada-order-limit-validation`. This option will allow you to set specific rules for order validation during the checkout process.

<figure><img src="https://1127841897-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNcn43OdOESI4pU0zj5tW%2Fuploads%2FOw3CaszNTf1Xuwo0qyY3%2Fimage.png?alt=media&#x26;token=097af48f-fdcf-449d-a25d-43c9e5c27643" alt=""><figcaption></figcaption></figure>

### Step 3: Configuring the Checkout rules

Sometimes, Shopify checkout rules may fail to execute. To manage this scenario, adjust the following setting:<br>

* **Tick “Allow all customers to complete checkout”**

Enable this option to allow all customers to complete their purchases when Shopify's checkout rules fail to execute. While this ensures a seamless checkout experience, it may result in some orders that exceed the limits you’ve set in-app.<br>

* **Untick “Allow all customers to complete checkout”**

Disable this option to prevent checkout when Shopify's checkout rules fail. This guarantees that no orders violating your set limits will be processed.

Once you have configured the rules according to your preferences, click `Save` to apply the changes.&#x20;

<figure><img src="https://1127841897-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNcn43OdOESI4pU0zj5tW%2Fuploads%2FJHy6TW2vCINTPZpBeh4T%2Fimage.png?alt=media&#x26;token=6a5d66a6-510c-4abf-b248-48f35453a8ac" alt=""><figcaption></figcaption></figure>

### Step 4: Turn on the checkout rule

After saving your settings, ensure the checkout rule is enabled. To do this, locate the switch or toggle next to the checkout rule you've just configured and turn it on

<figure><img src="https://1127841897-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNcn43OdOESI4pU0zj5tW%2Fuploads%2FSaI7HljP6jgym7rlGZY3%2Fimage.png?alt=media&#x26;token=6ef63a37-cded-4a77-bbf2-122e02620c30" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
It is recommended to check the option: "Allow all customers to complete checkout".
{% endhint %}

After saving, your checkout rule for cart-checkout validation should appear as follows as the customer has an invalid cart.

<figure><img src="https://1127841897-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNcn43OdOESI4pU0zj5tW%2Fuploads%2FQbBrIWmjV0gONmuz406i%2Fimage.png?alt=media&#x26;token=c9b76da8-d30d-4d2b-ac94-3b44bc1f37d2" alt=""><figcaption></figcaption></figure>


---

# 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.avada.io/order-limit-help-center/adding-a-checkout-rule.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.
