Hi everyone! One of the brands that I partner with includes assorted gifts and add-ons with every purchase. For the Abandon Checkout email, I want to include a preview image of the main item they added to cart, not one of these extra gifts or add-ons.
I was able to come up with code that works perfectly when I view the test email on desktop, but for some reason it still shows the add-on when I view the email from my mobile Gmail app. Does anyone know if there’s any way to make conditional logic mobile compatible?
This is what I have so far:
<div><center>
{% if not 'Digital Gift Card' in event.extra.line_items.0.product.title and event.extra.line_items.0.product.title != 'Shipping Insurance' and event.extra.line_items.0.product.title != 'Secrets For The Closest Shave (eBook)' and event.extra.line_items.0.product.images.0.src %}
<img class="center" style="width: 400px; text-align: center;" src="{{ event.extra.line_items.0.product.images.0.src|default:'' }}" width="400">
{% elif not 'Digital Gift Card' in event.extra.line_items.1.product.title and event.extra.line_items.1.product.title != 'Shipping Insurance' and event.extra.line_items.1.product.title != 'Secrets For The Closest Shave (eBook)' and event.extra.line_items.1.product.images.0.src %}
<img class="center" style="width: 400px; text-align: center;" src="{{ event.extra.line_items.1.product.images.0.src|default:'' }}" width="400">
{% elif not 'Digital Gift Card' in event.extra.line_items.2.product.title and event.extra.line_items.2.product.title != 'Shipping Insurance' and event.extra.line_items.2.product.title != 'Secrets For The Closest Shave (eBook)' and event.extra.line_items.2.product.images.0.src %}
<img class="center" style="width: 400px; text-align: center;" src="{{ event.extra.line_items.2.product.images.0.src|default:'' }}" width="400">
{% elif not 'Digital Gift Card' in event.extra.line_items.3.product.title and event.extra.line_items.3.product.title != 'Shipping Insurance' and event.extra.line_items.3.product.title != 'Secrets For The Closest Shave (eBook)' and event.extra.line_items.3.product.images.0.src %}
<img class="center" style="width: 400px; text-align: center;" src="{{ event.extra.line_items.3.product.images.0.src|default:'' }}" width="400">
{% else %}
<img class="center" style="width: 400px; text-align: center;" src="{{ event.extra.line_items.0.product.images.0.src|default:'' }}" width="400">
{% endif %}
</center></div>