An example that limits the total weight of the same variant to 1kg or less per order. Use this when you want to set an upper limit for shipping size or weight.
Prerequisite: The initial setup for weight limits must be complete. If you haven't done this yet, see "Initial Setup (Weight Limits)".
When you enable the weight rule, it evaluates the total weight of the same variant in the cart. The total weight is calculated by multiplying the variant's weight registered in Shopify by its quantity.
Total weight of the same variant is 1kg or less: purchase is allowed.
Total weight of the same variant is more than 1kg: purchase is not allowed.
Note: Variants without a weight set are not included in the total and are not subject to the limit.
(1) Create a weight rule
Open the app admin → "Weight limits" → "Weight rules" → "Create rule".
(2) Enter the settings
Configure the following.
Field | Value |
|---|---|
Title | Any internal title |
Minimum weight | Not set |
Maximum weight | 1 |
Weight unit | Kilograms (kg) |
When product weight unit differs | Convert and include in calculation |
Applicability | Variant |
Eligible items | Products or variants to limit by weight |
Product message | Enter if needed |
Display timing | Cart updated and checkout |
Message for maximum weight | Enter if needed |
(3) Save and enable the weight rule
After saving the settings, select "Enable." Saving alone does not apply the weight limit.
(4) Check the behavior
Add the eligible variants to the cart in a quantity that reaches the weight above, and check the result when the cart is updated and at checkout.
You can use
{{maxWeight}}and{{currentWeight}}in the message for maximum weight. They are replaced with the value including its unit, such as "1kg," and the current total weight, respectively.If you set "When product weight unit differs" to "Convert and include in calculation," the evaluation converts weights to the rule's unit even when g, kg, oz, and lb are mixed. If you set it to "Exclude from calculation," variants with a different unit than the rule are not included in the total.