> ## Documentation Index
> Fetch the complete documentation index at: https://order-limit.xrtotech.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set your first Shopify quantity limit: 2 units per order

> Create a two-unit product limit in Shopify. Select a test product, activate the rule and validation, then verify allowed and blocked checkout cases.

Start with one test product in Order Limit. This guide limits the total quantity of that product, including all its variants, to 2 units in a cart.

## Before you begin

Open the app from your Shopify admin. Prepare a product that customers can buy on your storefront. If it has variants, use two variants for the test.

**1. Open quantity rules**

Open **Apps** → **Order Limit**. On the app home page, choose **All quantity rules** and click **创建规则** to open the editor.

**2. Configure the rule**

Name it “Test product: maximum 2”. Select **Cart quantity limit**, leave the minimum blank, and enter `2` as the maximum. Choose **Limit each applicable item individually**.

Under **Applies to**, select **Specific products** and click **选择产品** to choose the test product. Confirm its name appears in the editor.

**3. Save and activate**

Set the timing to **Cart interactions and checkout**. Select **Active** and click **Create and activate** (**创建并启用**; **保存并启用** when editing).

Return to **Quantity limits**, turn on **Enable quantity rules**, and confirm **Cart and checkout validation** is enabled. Otherwise, click **Enable validation**.

**4. Test on your storefront**

Add 2 units and enter checkout. This rule should allow the cart. Change the quantity to 3 and verify the restriction message.

For a product with variants, also test 1 unit of variant A plus 2 of variant B. The combined product quantity of 3 should be blocked.

## Expected results

| Cart | Result for this rule |
| - | - |
| Test product: 1 unit | Allowed |
| Test product: 2 units | Allowed |
| Test product: 3 units | Blocked |
| Another product: 3 units, no test product | Outside this rule's scope |

“Allowed” means this rule passes. Other enabled rules still apply.

> [!TIP]
>
> Save an unfinished rule as **Draft**. Draft rules do not enforce restrictions. Test before applying the rule to your live promotional products.

Next: [Browse scenarios](https://order-limit.xrtotech.com/en/scenarios/index.md), [edit customer messages](https://order-limit.xrtotech.com/en/settings/messages.md), or check the [Chinese UI labels](https://order-limit.xrtotech.com/en/getting-started/how-it-works.md#find-the-settings-in-the-app).

## Apply the tested rule to live products

Reopen the rule, replace the test product with the live product and click **保存并启用**. Retest 2 units allowed and 3 blocked. To pause, choose **草稿** and **保存为草稿**; renaming the rule does not pause it.

If results differ, use [troubleshooting](https://order-limit.xrtotech.com/en/troubleshooting/rules-not-working.md). Complete the [launch checklist](https://order-limit.xrtotech.com/en/getting-started/launch-checklist.md) before rollout.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.