---
title: "Cart Subtotal, Cart Total and Cart Quantity conditions"
description: "Apply a discount based on the value or number of items in the whole cart, for example \"spend $100\" or \"buy 3 items\"."
url: https://docs.onecodediscounts.com/en/articles/11-cart-subtotal-cart-total-and-cart-quantity-conditions
collection: "Conditions"
updated: 2026-11-06
language: en
---

# Cart Subtotal, Cart Total and Cart Quantity conditions

Apply a discount based on the value or number of items in the whole cart, for example "spend $100" or "buy 3 items".

**In short:** **Cart Subtotal** and **Cart Total** check the value of everything in the cart, and **Cart Quantity** counts every item in the cart. Use them for rules like "spend $100 or more" or "buy 3 or more items".

## The three conditions

-   **Cart Subtotal:** the value of all items in the cart at their normal prices, before any discounts.
    
-   **Cart Total:** the value of all items after any price reductions Shopify has already made to them, but before this discount. Often it's the same as Cart Subtotal.
    
-   **Cart Quantity:** the number of items in the cart. Two of the same shirt count as 2.
    

None of them include shipping. If your prices include tax, the values include tax too.

![Global Conditions with Cart Subtotal greater than or equal to 100 USD](https://staticfiles.us.gleap.ai/p6ae440349b260bc5e19963ea/rUzhUpR8nVc99RP0qNGSbrKef8kWungZeOMwDDOP2Uy8uHbgEareMoqDHBh0V3vEwXmNHvugnTV.png "Global Conditions with Cart Subtotal greater than or equal to 100 USD")

## Operators

-   Money (Cart Subtotal, Cart Total): **Greater than or equal to**, **Greater than**, **Less than or equal to**, **Less than**.
    
-   Quantity (Cart Quantity): the same four, plus **Equals**.
    

## Worked examples

-   **Spend $100, get 15% off:** Global Condition **Cart Subtotal**, **Greater than or equal to**, `100`.
    
-   **Buy 3 or more items:** Per-Discount Condition **Cart Quantity**, **Greater than or equal to**, `3`.
    
-   **Small orders only:** **Cart Subtotal**, **Less than**, `50`.
    

![A Per-Discount Condition of Cart Quantity greater than or equal to 3, for a "buy 3 or more items" offer](https://staticfiles.us.gleap.ai/p6ae440349b260bc5e19963ea/VxJi6YYcfH4MXTfyx6wMIylXjKp9RXybOM94oOKyqvScHhWygZEcA8khX6VWkS10Yeekkd02DSm.png "A Per-Discount Condition of Cart Quantity greater than or equal to 3, for a \"buy 3 or more items\" offer")

## Cart conditions vs Group conditions

Cart conditions look at the **whole cart**, including items the discount doesn't target and items you've excluded. Product discounts also have **Group** conditions that only look at the items that discount targets. See [Group and Included Items conditions](https://jxngqfpxd.us.gleap.help/en/articles/12).

Example: 10% off the Summer Collection when the customer buys 3 items.

-   **Cart Quantity** at least 3: any 3 items in the cart count, from any collection.
    
-   **Group Quantity** at least 3: 3 items from the Summer Collection are needed.
    

## Good to know

-   Thresholds don't subtract the discount this code gives. For example, "Cart Subtotal at least $300" is met by a $310 cart even if a 20% discount from this code brings it below $300. For "spend $X" rules, **Cart Subtotal** is the safest choice because it never changes with discounts.
    
-   Values are in your store's currency. Customers paying in another currency are converted automatically. See [Using OneCode with multiple currencies](https://jxngqfpxd.us.gleap.help/en/articles/17).
    
-   Cart Quantity isn't available as a Per-Discount Condition on order discounts. Add it to **Global Conditions** instead.

## Related

- [Global conditions vs per-discount conditions](https://docs.onecodediscounts.com/en/articles/10-global-conditions-vs-per-discount-conditions.md)
- [Group and Included Items conditions](https://docs.onecodediscounts.com/en/articles/12-group-and-included-items-conditions.md)
- [Customer Tag and Customer Segment conditions](https://docs.onecodediscounts.com/en/articles/13-customer-tag-and-customer-segment-conditions.md)
- [Shipping Country condition](https://docs.onecodediscounts.com/en/articles/14-shipping-country-condition.md)
- [Product In Cart condition](https://docs.onecodediscounts.com/en/articles/15-product-in-cart-condition.md)
