Skip to main content
Solved

If-Else for Discounts

  • March 24, 2022
  • 1 reply
  • 236 views

Forum|alt.badge.img+3

Hi there! I’m working on moving our order confirmation emails from Shopify to Klaviyo. I’d like to include discount $ amounts if the customer had a discounted order. But if they didn’t, I want to leave the line blank so they don’t feel bad about seeing Discount: $0.00 

😊

Is there a way to do an if-else statement that can tell if the discount field is greater than 0? Or another way to make this work?

Thanks!

Best answer by Dov

Hi @HaleyStuga,

Thanks for sharing your question with us.

Give this a try: 

{% if event|lookup:'Total Discounts' != "0.00"} ${{ event|lookup:'Total Discounts' }} {% endif %}

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • March 25, 2022

Hi @HaleyStuga,

Thanks for sharing your question with us.

Give this a try: 

{% if event|lookup:'Total Discounts' != "0.00"} ${{ event|lookup:'Total Discounts' }} {% endif %}