Skip to main content

Hello, 

 

I trying to do a conditional sentence inside a text block for show or not compare_at_price depending if item has or not discount on feed. But after add following code to text block i can’t save content and doesnt work.

Is for Shopify store.

Code:

{{ item.title }}
{% if item.price < item.compare_at_price %}
{% currency_format item.price %} {% currency_format item.compare_at_price %}
{% else %}
{% currency_format item.price %}
{% endif %}

 

Can anyone help me?

 

Thanks a lot, Kae

Hey @Kae 

Thank you so much for coming to the Klaviyo Community to get with with your syntax for your email template.

@Mailbox Manny Would you happen to know why this isnt working for Kae?


@Kae Sorry, I’m late here.  Did you find a solution for this? 


Hey @Kae

Could you provide some more information about where you are trying to implement the code? If it is in a flow or a campaign. 

I am assuming that you are trying to add the above piece of code in one of your flow emails. If that is the case, could you at least tell me what metric is being used to trigger the flow or what flow it is and I will be able to guide you through it properly. 
 


Reply