A product discount is on its line
A product discount changes what a line costs, and the cart reports it there and only there.
A price shown from the cart's own list of allocations would miss it.
cart {
discountCodes { code applicable }
cost { subtotalAmount { amount } totalAmount { amount } }
discountAllocations { # order and shipping discounts
discountedAmount { amount }
targetType
... on CartAutomaticDiscountAllocation { title }
... on CartCodeDiscountAllocation { code }
}
lines(first: 50) {
nodes {
quantity
cost { totalAmount { amount } }
discountAllocations { # product discounts
discountedAmount { amount }
... on CartAutomaticDiscountAllocation { title }
... on CartCodeDiscountAllocation { code }
}
}
}
deliveryGroups(first: 5) {
nodes {
selectedDeliveryOption { title estimatedCost { amount } }
discountAllocations { discountedAmount { amount } }
}
}
}Into the cart
- 1 × Single Bag at $40.00, bought once
- The cart attribute the app discount's function reads
What Shopify returned
| Line | Quantity | Price | Discounts on the line | Line total |
|---|---|---|---|---|
| Single Bag | 1 | $40.00 | −$10.00 automatic, “Offer Suite” | $30.00 |
| Discounts on the cart | none | |||
| Cart total | $30.00 | |||
What that shows
- The $40.00 line cost $30.00.
- The line carried one automatic discount allocation of $10.00, named by the discount's title.
- The cart's own list of discount allocations was empty: a product discount is reported on its line only.
An order discount is on the cart
An order discount is taken from the cart, after the lines are priced. The line keeps its own price and its own allocation; the order discount is in the cart's list.
Its target type still reads LINE_ITEM: the target type says the discount is about merchandise and not about shipping, and not which list it is in.
Into the cart
- 1 × Single Bag at $40.00, bought once
- The cart attribute the app discount's function reads
- Code VERIFY-ORDER10: 10% off the order, one-time purchases only, combines with product and shipping discounts
What Shopify returned
| Line | Quantity | Price | Discounts on the line | Line total |
|---|---|---|---|---|
| Single Bag | 1 | $40.00 | −$10.00 automatic, “Offer Suite” | $30.00 |
| Discounts on the cart | −$3.00 code VERIFY-ORDER10 | |||
| Cart total | $27.00 | |||
VERIFY-ORDER10applicable: true
What that shows
- Both applied: the line cost $30.00 after the automatic discount, and the cart total was $27.00.
- The order code took 10% of the discounted $30.00, not of the $40.00 price: $3.00.
- The order discount was in the cart's own list of allocations and not on the line.
A shipping discount is on the delivery group, once a rate is selected
A cart has delivery groups only after it has a delivery address. These carts set one and select the cheapest rate, then read the cart again.
The shipping discount is then on the group and in the cart's list, and the cart total includes the rate.
Into the cart
- 1 × Single Bag at $40.00, bought once
- The cart attribute the app discount's function reads
- A US delivery address, with the cheapest rate selected
What Shopify returned
| Line | Quantity | Price | Discounts on the line | Line total |
|---|---|---|---|---|
| Single Bag | 1 | $40.00 | −$10.00 automatic, “Offer Suite” | $30.00 |
| Discounts on the cart | none | |||
| Delivery: Standard selectedQuoted: Standard $8.00, Express $15.00 | −$8.00 automatic, “Free shipping” | $0.00 | ||
| Cart total | $30.00 | |||
What that shows
- The line cost $30.00, with a $10.00 allocation named by the discount's title.
- The selected rate, Standard at $8.00, was discounted in full on the delivery group.
- The shipping allocation was named by the message the function gave its candidate, not by the discount's title.
- The same shipping allocation was also in the cart's own list, and the cart total was $30.00.
A code that did not apply is in the warnings
A cart built with a code Shopify cannot apply is still a cart. The mutation returns it; the code is listed as not applicable and the reason is a warning.
Two reasons are shown here: a code the store does not have, and a code that exists but was not allowed beside the discount already in the cart.
mutation($input: CartInput!) {
cartCreate(input: $input) {
cart { discountCodes { code applicable } }
userErrors { message }
warnings { code message }
}
}Into the cart
- 1 × Single Bag at $40.00, bought once
- No cart attribute, so the app's functions return no operations
- Code VERIFY-NO-SUCH-CODE: not a code on the store
What Shopify returned
| Line | Quantity | Price | Discounts on the line | Line total |
|---|---|---|---|---|
| Single Bag | 1 | $40.00 | none | $40.00 |
| Discounts on the cart | none | |||
| Cart total | $40.00 | |||
VERIFY-NO-SUCH-CODEapplicable: false- warning
DISCOUNT_NOT_FOUND“Enter a valid discount code”
What that shows
- The cart was still created, at $40.00.
- It listed the code as not applicable and returned the warning DISCOUNT_NOT_FOUND.
Into the cart
- 1 × Single Bag at $40.00, bought once
- The cart attribute the app discount's function reads
- Code VERIFY-ORDER10-SOLO: 10% off the order, one-time purchases only, combines with nothing
What Shopify returned
| Line | Quantity | Price | Discounts on the line | Line total |
|---|---|---|---|---|
| Single Bag | 1 | $40.00 | −$10.00 automatic, “Offer Suite” | $30.00 |
| Discounts on the cart | none | |||
| Cart total | $30.00 | |||
VERIFY-ORDER10-SOLOapplicable: false- warning
DISCOUNT_CODE_NOT_HONOURED“The VERIFY-ORDER10-SOLO discount code is not honoured”
What that shows
- The automatic discount stayed: the line cost $30.00 and so did the cart.
- The code was listed as not applicable, with the warning DISCOUNT_CODE_NOT_HONOURED.
A partly discounted line comes back as two
One line in does not mean one line out. A discount on some of a line's units splits it.
Into the cart
- 2 × Single Bag at $40.00, bought once
- The cart attribute the app discount's function reads
What Shopify returned
| Line | Quantity | Price | Discounts on the line | Line total |
|---|---|---|---|---|
| Single Bag | 1 | $40.00 | none | $40.00 |
| Single Bag | 1 | $40.00 | −$10.00 automatic, “Offer Suite” | $30.00 |
| Discounts on the cart | none | |||
| Cart total | $70.00 | |||
What that shows
- One line of quantity 2 went in; the cart came back with two lines of quantity 1.
- One of them cost $30.00 with the $10.00 allocation, the other $40.00 with none.
- The cart total was $70.00.
How this was verified
Every cart on this page was built through the Storefront API on a Shopify Plus development store we keep for this, on API version 2026-10, and read back as Shopify priced it. The store sells one product in these carts: Single Bag, at $40.00, also sold on a selling plan named “Every 30 days” that has no pricing policy. It quotes two delivery rates to a US address.
It has one automatic app discount, titled “Offer Suite”, with a product class and a shipping class, set to combine with product, order and shipping discounts. Its function reads a cart attribute: with it, the function takes 25% off one unit of Single Bag bought once, or $8.00 off the unit on its selling plan, and makes the cheapest delivery rate free. Without it, the function returns no operations.
| Discount | Class | Gives | Combination setting |
|---|---|---|---|
| Code VERIFY-ORDER10 | Order | 10% off the order, one-time purchases only | combines with product and shipping discounts |
| Code VERIFY-ORDER10-SOLO | Order | 10% off the order, one-time purchases only | combines with nothing |
A suite builds these carts again and reads the discount settings from the store before it does. A statement that no longer matches the cart takes this page down until it is corrected, and no cart stands for more than 90 days without being built again. This is what one store returned on one API version: your store’s plan, markets and other apps can change the result, so build the cart.
Seen something different on your store? Write to privacy@offersuite.io with the cart and we’ll run it.