Cart conditions
Last updated: July 18, 2026
Cart conditions look at the order as a whole: subtotal, total cost, weight, quantity, cart attributes, applied discount codes, subscriptions, gift cards, and the Shopify Market. On a per-product fee they act as gates: the whole cart must pass before any matching item is charged.
Cart subtotal
Rules: is greater than or equal to, is less than or equal to, is equal to, is not equal to.
The subtotal after discounts, in your store currency, excluding fee lines (a fee never triggers itself). Enter plain decimals: for 2.263,74 type 2263.74. Both directions are useful: at most 50 drives the small order surcharge, at least 100 the Minnesota Road Improvement Fee.
Cart subtotal by cost
Rules: is greater than or equal to, is less than or equal to, is equal to, is not equal to.
Like cart subtotal, but on your cost per item (COGS) instead of retail prices; products without a cost count as zero. Pairs naturally with cost-based fees: recover freight when the cart's underlying cost crosses a threshold, regardless of your margins.
Cart weight
Rules: is greater than or equal to, is less than or equal to, is equal to, is not equal to.
The cart's total weight in kilograms; grams, ounces, and pounds convert automatically and fee lines are excluded. The trigger for the heavy order surcharge: nothing below 20 kg, a per-kg rate above.
Total quantity in the cart
Rules: is greater than or equal to, is less than or equal to, is equal to, is not equal to.
Counts all items in the cart, not only those matched by other conditions. Twenty or more items adds a packing materials fee. For the quantity of a single line, use line quantity.
Cart attribute
Rules: contains, does not contain, is one of, is not one of. Value format: key:value1,value2 (* for any value, "" for empty).
Checks extra information your theme or other apps save on the cart, like checkboxes and delivery notes. A shipping protection checkbox that writes protection:yes is all the order protection fee needs; a gift wrap option can drive a cart-level wrapping fee the same way.
Discount code
Rules: is one of, is not one of. Value: comma-separated codes, or * for any applied code.
Matches codes actually applied to the cart. The negative direction is the famous one: a fee with discount code is not one of FEEFREE disappears the moment that code is entered, which is exactly how fee waivers work. With *, any code at all can waive (or trigger) a fee.
Subscription in cart
Rules: is equal to. Values: yes / no.
Yes when at least one line is on a selling plan (a subscription), no when none is. Charge a one-time setup fee on subscription starts, or the reverse: waive a fee for subscribers as a perk.
Gift card in cart
Rules: is equal to. Values: yes / no / only / not only.
Whether the cart contains a gift card product (one the customer buys, not a code typed at checkout). The special value not only is built for regulated fees: the Colorado Retail Delivery Fee applies to deliveries of goods, so a cart that is gift cards only should skip it, while a mixed cart should still pay.
Shopify Market
Rules: is one of, is not one of.
Matches the Shopify Market the storefront session belongs to. When you run one store for several regions, a fee can exist only in the EU market or everywhere except a market. If the market cannot be detected, is one of does not add the fee and is not one of does.