{"title":"DiscountLine - Liquid Object Reference","slug":"discount-line-liquid-object-reference","url":"https://support.storeconnect.com/articles/discount-line-liquid-object-reference","url_markdown":"https://support.storeconnect.com/articles/discount-line-liquid-object-reference.md","subtitle":null,"summary":"Attributes of the DiscountLine object, one promotion\u0026#39;s total discount on a cart or order. Use it to list each applied promotion by name in a cart or order summary.","type":"Developer_Documentation","video_url":"","keywords":"liquid, objects, DiscountLine, discount_breakdown_lines, promotions, discount, order summary, cart summary, template, storeconnect","last_modified":"2026-10-20T05:27:03+0000","body_markdown":"## Description\n\nThe DiscountLine object holds the total discount one promotion applied to a cart or order. Read a list of them from `discount_breakdown_lines` on the [Cart](cart-liquid-object-reference) or [Order](order-liquid-object-reference) object to show each promotion as a separate row in a summary, instead of one combined discount total.\n\nEach line totals the discount for one promotion across every item it applied to, including a shipping discount. Sale prices are not included, because they are not promotions.\n\nIn POS templates, such as a [POS receipt template](pos-receipt-template), `discount_breakdown_lines` is available on the Cart and Order objects with three differences:\n\n- A line has `name`, `amount`, and `points`, but no `id`.\n- A promotion that has since been deleted shows the name `Promotion` instead of an empty name.\n- A line whose total is zero or negative is left out, so the negative refund values described under [Signs and refunds](#signs-and-refunds) do not appear at POS.\n\n## Attributes\n\n| Attribute | Type | Description |\n|-----------|------|-------------|\n| `amount` | Number | Returns the currency discount this promotion applied. `0` when the promotion discounted points only |\n| `id` | String | Returns the Salesforce ID of the promotion (`s_c__Promotion2__c`). Use it as a stable key, for example in a `data-` attribute, because the name can change |\n| `name` | String | Returns the display name of the promotion. Empty when the promotion has since been deleted |\n| `points` | Number | Returns the points discount this promotion applied. `0` when the promotion discounted currency only |\n\n## Signs and refunds\n\nOn a sale, `amount` and `points` are positive numbers. On a refund order they are negative, because the line adds value back to what was returned. Multiply by `-1` for display, so a sale shows as money off and a refund as money back.\n\n## Cart and order differences\n\n- **Cart** — returns lines only when the store uses [Promotions v2](advanced-promotions). On a store that still uses the original promotions, `current_cart.discount_breakdown_lines` is always empty.\n- **Order** — always returns lines for the promotions applied when the order was placed, whichever promotions version the store uses now.\n\n## Example\n\nItemize promotions in a cart summary, showing a currency amount, a points amount, or both:\n\n\n```liquid\n\n{% for discount_line in current_cart.discount_breakdown_lines %}\n  \u003cdiv class=\"summary-row\" data-promotion-id=\"{{ discount_line.id }}\"\u003e\n    \u003cspan\u003e{{ discount_line.name | default: \"Discount\" }}\u003c/span\u003e\n    \u003cspan\u003e\n      {% if discount_line.amount != 0 %}{{ discount_line.amount | times: -1 | money }}{% endif %}\n      {% if discount_line.amount != 0 and discount_line.points != 0 %} and {% endif %}\n      {% if discount_line.points != 0 %}{{ discount_line.points | times: -1 | points }}{% endif %}\n    \u003c/span\u003e\n  \u003c/div\u003e\n{% endfor %}\n```\n\n\nFor a cart where a promotion named \"10% off shirts\" took 15.00 off, the summary shows a \"10% off shirts\" row with the amount as a negative value in the store's currency, such as `-$15.00`. The same loop works on an order confirmation page with `current_order.discount_breakdown_lines`.\n\n## Available on\n\n- [Cart - Liquid Object Reference](cart-liquid-object-reference) — `discount_breakdown_lines`\n- [Order - Liquid Object Reference](order-liquid-object-reference) — `discount_breakdown_lines`"}