This example hides local delivery for orders where the total cart weight reaches 30kg or more. Use it when a local delivery service has a weight limit and the order exceeds the weight it can handle.
Prerequisite: The initial setup for delivery limits must be complete. If you haven't done this yet, see "Initial Setup (Delivery Limits)".
When the delivery rule is enabled, it evaluates the total weight of all products in the cart at checkout and switches whether local delivery is shown. The total weight is calculated by multiplying each variant's weight registered in Shopify by its quantity.
Total cart weight is less than 30kg: local delivery is shown.
Total cart weight is 30kg or more: local delivery is hidden.
(1) Create a delivery rule
Open the app admin → "Delivery rules" → "Create rule".
(2) Enter the settings
Configure the following.
Field | Value |
|---|---|
Title | Any internal title |
Display mode | Hide the specified delivery options |
Delivery types | Local delivery |
Languages | All languages |
Customers | All customers |
Products | All items |
Orders | Specific orders |
Weight → Minimum weight | 30 |
Weight → Weight unit | Kilograms (kg) |
Weight → When product weight unit differs | Convert and include in calculation |
(3) Save and enable the delivery rule
After saving the settings, select "Enable." Saving alone does not apply the delivery rule.
(4) Check the behavior
Add quantities to the cart that make the total weight both under 30kg and 30kg or more, then check whether local delivery is shown at checkout.
Variants without a weight set are not included in the total.
If you set "When product weight unit differs" to "Exclude from calculation," variants with a unit different from the rule's are not included in the total.
All conditions in a delivery rule must be met (AND condition). If even one condition is not met, Shopify's shipping settings are shown as-is.
The shipping method name is compared, including case, against the name shown at checkout. For multilingual stores, add the name for each language separately.