Skip to content

Instantly share code, notes, and snippets.

@gterrill
Last active December 17, 2020 20:55
Show Gist options
  • Save gterrill/783e559470eef8c6fe74100c9ca7a304 to your computer and use it in GitHub Desktop.
Save gterrill/783e559470eef8c6fe74100c9ca7a304 to your computer and use it in GitHub Desktop.
Order Notification email with conditional content based on product
{% if line.variant.title != 'Default Title' %}
<span class="order-list__item-variant">{{ line.variant.title }}</span>
{% endif %}
{% for p in line.properties %}
<br/><span class="order-list__item-variant">{{ p.first }}: {{ p.last }}</span>
{% endfor %}
{% if line.product.tags contains 'foo' %}
{% comment %} Special content for any product tagged 'Foo' goes here (e.g. location) {% comment %}
{% endif %}
@lenyah
Copy link

lenyah commented Dec 10, 2020

Hello again, I was wondering if it is somehow possible to have two different booking confirmation emails in bookthatapp, or if I can only send the confirmation for one product and not all products. I've been trying so hard to make it work...sorry to be contacting you again. I really like your app and hope I can make this work.

@gterrill
Copy link
Author

Hello again, I was wondering if it is somehow possible to have two different booking confirmation emails in bookthatapp

Yes, this is possible. Typically you just need to use liquid - e.g. use an {% if ... %} statement to figure out what the product is.

sorry to be contacting you again. I really like your app and hope I can make this work.

Please feel free to contact us at [email protected] or https://support.zetya.com/hc/en-us/requests/new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment