Google Tag Manager

Forum Discussion

Bonfire-Champ's avatar
Bonfire-Champ
Supporter
2 years ago

stopping abandoned cart

Hey everyone! 

I'm trying to stop an abandoned cart email being sent if the customer's cart is empty, but it doesn't seem to be working. Is this code snippet in the correct place of the email?

{% if canvas_entry_properties.${cart}.total == 0 %}
{% abort_message("Cart value null") %}
{% endif %}

  • You can use {{canvas_entry_properties.${cart}.total}}} - this should work - and to check if it's 0 you have to use == 0 in this case.