Liquid Template Variables - discount

From Spiffy Stores Knowledge Base

Revision as of 14:10, 12 February 2016 by Admin (talk | contribs) (Created page with "A '''discount''' represents single discount that has been applied to an order. == <code>discount.code</code> == Returns the code used for the discount. <pre> {{ discount.co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A discount represents single discount that has been applied to an order.

discount.code

Returns the code used for the discount.

{{ discount.code }} => 'SELLOUT10'

discount.savings

Returns the amount of the discount that has been applied to the order. A money filter can be used to return the value as a monetary amount.

{{ discount.savings | money }} => $45.21