> ## 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 product and variant quantity limits in Shopify

> Set a product cap of 3 and a variant A cap of 1 from the product table. Save, enable validation and run four test cases to check both quantity levels.

Use the product table in Order Limit for independent product or variant thresholds. This example caps all variants of a product at 3 units, while variant A has a separate cap of 1.

## Before you begin

Prepare variants A and B of the same purchasable product. Review [rule priority](https://order-limit.xrtotech.com/en/settings/rule-priority.md): an overlapping individual quantity rule can relax the product cap.

## Set both levels

**1. Find the product**

Open **Apps** → **订单限购** in Shopify. Choose **按产品设置数量限制** on the app home page. Search for the product under **搜索产品**.

![Search and filter for the target product on the product quantity limits page](https://mintcdn.com/xrto-tech/P3758RJFe7bvsvou/images/guides/%E5%AF%BB%E6%89%BE%E5%88%B0%E9%9C%80%E8%A6%81%E8%AE%BE%E7%BD%AE%E7%9A%84%E4%BA%A7%E5%93%81.png?fit=max\&auto=format\&n=P3758RJFe7bvsvou\&q=85\&s=de7030a227749ba908ffca19586585d8)

**2. Set the whole-product cap**

On the product row, set **限制状态** to **已开启**, leave **最小值** blank and enter `3` under **最大值**. This counts all variants of the product together.

![The product row is on with a maximum of 3](https://mintcdn.com/xrto-tech/P3758RJFe7bvsvou/images/guides/M05-01-%E4%BA%A7%E5%93%81%E9%99%90%E5%88%B6%E6%95%B0%E9%87%8F%E4%B8%8A%E9%99%90%E9%85%8D%E7%BD%AE.png?fit=max\&auto=format\&n=P3758RJFe7bvsvou\&q=85\&s=8c69329a88b0736d7352c51d143fa905)

**3. Set the variant A cap**

Expand the product variants. On the variant A row, select **已开启**, leave the minimum blank and set the maximum to `1`. Click **保存** at the top and wait for saving to finish.

![Filter to the target product and expand its variant rows, where each variant can have its own limits](https://mintcdn.com/xrto-tech/P3758RJFe7bvsvou/images/guides/M05-02-%E9%85%8D%E7%BD%AE%E4%BA%A7%E5%93%81%E6%95%B0%E9%87%8F%E4%B8%8A%E9%99%90.png?fit=max\&auto=format\&n=P3758RJFe7bvsvou\&q=85\&s=d17e89fc5a562d79d99cb4dfda40db2c)

**4. Enable the feature and validation**

Return to **数量限制**, turn on **开启产品数量限制**, and choose **购物车互动时和结账时**. Confirm **数量规则开关** is enabled, open the **数量规则** switch until it shows **已开启**.

## Four test cases

| Cart | Expected result | Reason |
| - | - | - |
| variant B × 3 | Allowed | Product total is 3 |
| variant A × 1 + variant B × 2 | Allowed | Total 3, variant A within 1 |
| variant A × 2 | Blocked | variant A exceeds 1 |
| variant A × 1 + variant B × 3 | Blocked | Product total exceeds 3 |

Other active rules can still block a cart that passes these settings.

Variant A × 2 exceeds the variant A cap of 1, and the storefront shows the block message:

![Variant A at 2 units, the storefront says the purchase quantity cannot exceed 1](https://mintcdn.com/xrto-tech/P3758RJFe7bvsvou/images/guides/M05-03-%E8%AE%BE%E7%BD%AEA%E5%8F%98%E4%BD%93%E4%B8%8A%E9%99%90%E6%9D%A1%E4%BB%B6.png?fit=max\&auto=format\&n=P3758RJFe7bvsvou\&q=85\&s=37fa5bbd0eef0b2c1f702ad1031c89ff)

Variant A × 1 plus variant B × 2 stays within the product cap of 3, so the cart can proceed to checkout:

![Variant A 1 unit and variant B 2 units in the cart, 3 total, can proceed to checkout](https://mintcdn.com/xrto-tech/P3758RJFe7bvsvou/images/guides/M05-05-%E6%A0%A1%E9%AA%8C%E7%BB%84%E5%90%88%E5%8F%98%E4%BD%93%E8%B4%AD%E4%B9%B0%E4%B8%A4%E4%BB%B6%E9%80%9A%E8%BF%87.png?fit=max\&auto=format\&n=P3758RJFe7bvsvou\&q=85\&s=1d0fdad365a86856359ca87af880a88f)

## Edit or pause

Change the row values and click **保存**. To pause one row, set **限制状态** to **未开启** and save. Disabling a product row does not disable its active variant rows; check each separately.

Turning off **开启产品数量限制** pauses these product and variant settings. It is separate from **数量规则**.

## If results differ

If variant A × 2 passes, check that you edited the variant A row and saved. If the whole product exceeds 3, check product status, the feature switch and overlapping individual rules. Product and individual rule limits combine using relaxed thresholds.

For a shared allowance across products, use [combined quantity](https://order-limit.xrtotech.com/en/scenarios/mix-and-match.md). Complete the [launch checklist](https://order-limit.xrtotech.com/en/getting-started/launch-checklist.md). The bold Chinese labels above match the current app.


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