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!
Add a comment
|
1 Answer
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. Commented Nov 14, 2017 at 16:10