Cart conditions make a rule depend on what is in the cart: the subtotal, the number of units or lines, the weight, the coupons, and which products (and how many of them) are there. You add them in a rule's Conditions section.
Cart subtotal and the Cart - Items - Subtotal conditions are available in cart discounts and checkout fees only, because product pricing rules change the subtotal themselves; Any pricing rule applied is available in cart discounts only. In product pricing rules, cart conditions only count the items product pricing works with: products matched by an Exclude products from all rules rule (and products on sale when Base price for products on sale is set to exclude them) are left out.
With product bundles, Cart total quantity, Cart item count, Cart total weight and the Cart item quantity conditions leave out every bundle's main cart item; the products inside the bundles are counted. The Cart item subtotal conditions keep the main item's line, because a bundle that isn't priced item by item carries its whole price there.
Where can you use these conditions?
| Condition | Product pricing | Cart discounts | Checkout fees |
|---|---|---|---|
| Cart subtotal | no | Conditions | Conditions |
| Cart total quantity | Conditions | Conditions | Conditions |
| Cart item count | Conditions | Conditions | Conditions |
| Cart total weight | Conditions | Conditions | Conditions |
| Coupons applied | Conditions | Conditions | Conditions |
| Cart items - Products | Conditions | Conditions | Conditions |
| Cart items - Variations | Conditions | Conditions | Conditions |
| Cart items - Categories | Conditions | Conditions | Conditions |
| Cart items - Attributes | Conditions | Conditions | Conditions |
| Cart items - Tags | Conditions | Conditions | Conditions |
| Cart items - Shipping Classes | Conditions | Conditions | Conditions |
| Cart item quantity - Products | Conditions | Conditions | Conditions |
| Cart item quantity - Variations | Conditions | Conditions | Conditions |
| Cart item quantity - Categories | Conditions | Conditions | Conditions |
| Cart item quantity - Attributes | Conditions | Conditions | Conditions |
| Cart item quantity - Tags | Conditions | Conditions | Conditions |
| Cart item quantity - Shipping classes | Conditions | Conditions | Conditions |
| Cart item subtotal - Products | no | Conditions | Conditions |
| Cart item subtotal - Variations | no | Conditions | Conditions |
| Cart item subtotal - Categories | no | Conditions | Conditions |
| Cart item subtotal - Attributes | no | Conditions | Conditions |
| Cart item subtotal - Tags | no | Conditions | Conditions |
| Cart item subtotal - Shipping classes | no | Conditions | Conditions |
| Any pricing rule applied | no | Conditions | no |
Cart conditions
Cart conditions check the cart as a whole.
Cart subtotal
The cart subtotal: the sum of line subtotals after product pricing rules and before coupons and cart discounts.
- Fields: Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart subtotal at least 100 for 10% off orders over $100.
- Includes tax when Settings > Amounts in conditions include tax is on (default) and taxes are enabled.
- Cart discounts and checkout fees only.
Cart total quantity
The total number of units in the cart.
- Fields: Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart total quantity at least 5 (see discount orders with 5 or more items).
Cart item count
The number of cart lines (different products or variations), not units.
- Fields: Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item count at least 3 for a "mix 3 products" discount.
Cart total weight
The total weight of the cart (weight x quantity, in the store's weight unit).
- Fields: Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart total weight more than 20 for a heavy order fee.
Coupons applied
The coupons applied to the cart.
- Fields: Coupons (type the start of the code to search; up to 50 coupons are listed, not counting the ones already selected, so type more to narrow it down; hidden for "at least one of any" and "none at all")
- Operators: "at least one of any", "at least one of selected", "all of selected", "only selected", "none of selected", "none at all"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Coupons applied none at all, so a discount does not add up with coupons.
- Pricepep's own cart discounts are not counted as coupons.
Cart - Items conditions
Cart - Items conditions check which products are in the cart.
Cart items - Products
Which products are in the cart (variations count as their parent product).
- Fields: Products (search and select)
- Operators: "at least one of selected", "all of selected", "only selected", "none of selected"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart items - Products at least one of selected "Camera" to discount accessories with a Simple adjustment.
Cart items - Variations
Which variations are in the cart.
- Fields: Product variations
- Operators: "at least one of selected", "all of selected", "only selected", "none of selected"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart items - Variations all of selected "Kit - Black", "Lens - 50mm".
Cart items - Categories
The categories of the products in the cart.
- Fields: Product categories (child categories included)
- Operators: "at least one of selected", "all of selected", "only selected", "none of selected"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart items - Categories only selected "Wholesale".
- Child categories count as their selected parent.
Cart items - Attributes
The attribute terms of the products in the cart.
- Fields: Attribute terms
- Operators: "at least one of selected", "all of selected", "only selected", "none of selected"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart items - Attributes at least one of selected "Material: Organic".
Cart items - Tags
The tags of the products in the cart.
- Fields: Product tags
- Operators: "at least one of selected", "all of selected", "only selected", "none of selected"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart items - Tags none of selected "no-discount".
Cart items - Shipping Classes
The shipping classes of the products in the cart.
- Fields: Shipping classes
- Operators: "at least one of selected", "all of selected", "only selected", "none of selected"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart items - Shipping Classes at least one of selected "Freight".
Cart - Items - Quantity conditions
Cart - Items - Quantity conditions add up the quantity of the cart items that match the selected products, variations, categories, attributes, tags or shipping classes.
Cart item quantity - Products
The total quantity of the selected products in the cart.
- Fields: Products (search and select); Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item quantity - Products "Coffee beans" at least 3.
Cart item quantity - Variations
The total quantity of the selected variations in the cart.
- Fields: Product variations; Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item quantity - Variations "T-shirt - XL" at least 5.
Cart item quantity - Categories
The total quantity of cart items in the selected categories (child categories included).
- Fields: Product categories (child categories included); Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item quantity - Categories "Wine" at least 6 for a 6-bottle case discount.
- A product in two selected categories counts once.
Cart item quantity - Attributes
The total quantity of cart items with the selected attribute terms.
- Fields: Attribute terms; Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item quantity - Attributes "Size: Sample" not more than 3.
Cart item quantity - Tags
The total quantity of cart items with the selected tags.
- Fields: Product tags; Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item quantity - Tags "bundle-eligible" at least 2.
Cart item quantity - Shipping classes
The total quantity of cart items in the selected shipping classes.
- Fields: Shipping classes; Number
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item quantity - Shipping classes "Bulky" at least 1 for a fee.
Cart - Items - Subtotal conditions
Cart - Items - Subtotal conditions add up the subtotal of the matching cart items.
Cart item subtotal - Products
The subtotal of the selected products in the cart.
- Fields: Products (search and select); Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item subtotal - Products "Gift card" less than 50.
Cart item subtotal - Variations
The subtotal of the selected variations.
- Fields: Product variations; Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item subtotal - Variations "Plan - Annual" at least 100.
Cart item subtotal - Categories
The subtotal of cart items in the selected categories (child categories included).
- Fields: Product categories (child categories included); Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item subtotal - Categories "Shoes" at least 200 for $20 off.
Cart item subtotal - Attributes
The subtotal of cart items with the selected attribute terms.
- Fields: Attribute terms; Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item subtotal - Attributes "Brand: House" at least 50.
Cart item subtotal - Tags
The subtotal of cart items with the selected tags.
- Fields: Product tags; Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item subtotal - Tags "summer" at least 75.
Cart item subtotal - Shipping classes
The subtotal of cart items in the selected shipping classes.
- Fields: Shipping classes; Amount
- Operators: "at least", "more than", "not more than", "less than", "equals", "does not equal"
- Available in: Cart discounts (Conditions); Checkout fees (Conditions)
- Example: Cart item subtotal - Shipping classes "Fragile" more than 0 for an insurance fee.
Other conditions
Conditions from the group Other in the admin.
Any pricing rule applied
Whether any product pricing rule changed a price in the cart.
- Fields: none (choose yes or no)
- Operators: "yes", "no"
- Available in: Cart discounts (Conditions)
- Example: Any pricing rule applied no, so a cart discount does not add up with product discounts.
- Cart discounts only.
What do the operators mean?
| Operator | Matches when |
|---|---|
| at least | The value is the number or more. |
| more than | The value is more than the number. |
| not more than | The value is the number or less. |
| less than | The value is less than the number. |
| equals | The value is the number (since 2.6.0). Amounts of money (Cart subtotal, Cart item subtotal) are compared at your store's price decimals, or at the number's own decimals when it has more, so a subtotal of 99.999 equals 100 in a store with 2 decimals. Quantities and counts must match exactly. Cart total weight is compared at 3 decimals, or at the number's own decimals when it has more, so 1.204 doesn't equal 1.2. |
| does not equal | The value isn't the number, compared as for equals (since 2.6.0). Like the other number operators, it doesn't match when there is no value at all. |
With a currency switcher, the amounts you type in Cart subtotal and Cart item subtotal conditions are converted into the customer's currency, possibly with more decimals than prices show, so equals may not match in another currency. For these amounts, prefer at least and less than; see multiple currencies.
| Operator | Matches when |
|---|---|
| at least one of any | Any coupon is applied (no coupon field). |
| at least one of selected | At least one of the selected coupons is applied. |
| all of selected | All selected coupons are applied. |
| only selected | Only the selected coupons are applied (all of them, and no other). |
| none of selected | None of the selected coupons is applied. |
| none at all | No coupon is applied (no coupon field). |
| Operator | Matches when |
|---|---|
| at least one of selected | At least one selected item is present. |
| all of selected | Every selected item is present (others may be present too). |
| only selected | The values are exactly the selected items: every selected item is present and nothing else (for categories and attributes, child terms of a selected term count as that term). |
| none of selected | None of the selected items is present. |
| Operator | Matches when |
|---|---|
| yes | The property is true. |
| no | The property is false. |
Related
Frequently asked questions
How do I give a discount when the cart is over $100?
Create a cart discount and add the condition Cart subtotal, at least, 100. The subtotal is after product pricing rules and before coupons.
What is the difference between Cart total quantity and Cart item count?
Cart total quantity counts units (3 mugs and 2 caps = 5). Cart item count counts cart lines (= 2).
Why is Cart subtotal missing in my product pricing rule?
Cart subtotal and the Cart item subtotal conditions are only offered in cart discounts and checkout fees. In product pricing rules use quantity conditions instead.
Do Pricepep cart discounts count as coupons in the Coupons applied condition?
No. Only real WooCommerce coupons count.