I've taken the difference between the actual price and sale price of items and created a variable to hold the total value to give me a total discount at my checkout. I am curious if there is a way to do this with less code though? If I try to show {{ cart.totalDiscount | currency(cart.currency) }} it just comes up as $0.00, and this is with promotions -> sales at 10% off for all products. If there is a simple snippet like the one I referenced I'd love to know about it. Thanks!

1 Answer 1


Hmm, something else is at play here.

I use:

{% if cart.totalDiscount != 0 or cart.couponCode %}
  - {{ cart.totalDiscount | currency(cart.currency) }}

...and it works.

Are you sure the promotion is actually being applied? I guess it is if you can calculate the discount.

  • Hmm, the promotion is applied for sure, I'll have to take another look I guess. Thanks for the feedback, I'll update if anything changes. Nov 14, 2017 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.