Skip to content

Instantly share code, notes, and snippets.

@carolineschnapp
Created November 14, 2011 18:50
Show Gist options
  • Save carolineschnapp/1364745 to your computer and use it in GitHub Desktop.
Save carolineschnapp/1364745 to your computer and use it in GitHub Desktop.
In email templates to know if order only consisted in downloads
{% assign nothing_but_downloads = true %}
{% for line in line_items %}
{% if nothing_but_downloads == true and line.variant.requires_shipping == true %}
{% assign nothing_but_downloads = false %}
{% endif %}
{% endfor %}
{% if nothing_but_downloads %}
SPECIAL CONTENT
{% else %}
USUAL CONTENT
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment