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

# Shopify product limit: up to 2 units per order

> Limit one Shopify product to two units per order, including its variants. Configure the scope, activate validation and test allowed and blocked carts.

You are launching a limited-edition cup and want each order to contain at most 2 units. An individual quantity rule totals all variants of that product.

## When to use this

Use this for limited launches and retail promotions that cap each product in one purchase.

## Before you begin

Prepare a purchasable cup with enough stock. Red and blue must be variants of the same product. Use an unselected coaster to test scope.

## Settings

Open the app home page → **All quantity rules** → create a rule.

| Setting | Example value |
| - | - |
| Rule name | Limited cup: maximum 2 |
| Rule type | Cart quantity limit |
| Minimum quantity | Leave blank |
| Maximum quantity | 2 |
| Calculation | Limit each applicable item individually |
| Scope | Specific products: limited cup |
| Timing | Cart interactions and checkout |

## Steps

1. Open **Apps** → **订单限购** in Shopify. From the app home page, open **所有数量规则** and click **创建规则**.
2. Enter the rule name and thresholds from the settings table. The name is for admin use only.
3. Under **规则应用于**, select the scope in the table. For selected products or collections, click **选择产品** or **选择产品系列** and confirm the selected names appear.
4. Set the timing from the table. Under **保存后的状态**, select **已启用** and click **创建并启用**. When editing an existing rule, click **保存并启用**.
5. Return to **数量限制** and turn on **开启数量规则**. Confirm **购物车与结账校验** is enabled, using **启用校验** if necessary.
6. Reopen the rule to confirm its thresholds, scope, customer conditions and active state were saved. Run the storefront tests below.

## Test your configuration

Each result describes this recipe only. Keep the product scope consistent and verify checkout; other active rules may still block the cart.

| Test | Expected result for this scenario |
| - | - |
| 2 cups | Allowed |
| 3 cups | Blocked |
| 1 red cup + 2 blue cups, variants of the same product | Blocked: product total is 3 |
| 2 cups + 3 coasters outside the scope | Allowed by this rule |

> [!NOTE]
>
> This rule checks each cart. It does not share a 2-unit allowance across multiple orders by the same customer.

For repeat purchases, see [sample purchase limits](https://order-limit.xrtotech.com/en/scenarios/repeat-purchase.md).

## If results differ

Two units of each color exceed this cap because variants share the product allowance. To share an allowance across different products, use a combined rule.

Use [troubleshooting](https://order-limit.xrtotech.com/en/troubleshooting/rules-not-working.md) to investigate. Complete the [launch checklist](https://order-limit.xrtotech.com/en/getting-started/launch-checklist.md) before rolling out.


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