Solved

If-Else for Discounts

  • 24 March 2022
  • 1 reply
  • 165 views

Badge +2

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!

icon

Best answer by Dov 25 March 2022, 14:41

View original

1 reply

Userlevel 7
Badge +61

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 %}

 

Reply