Created
January 6, 2017 10:31
-
-
Save joe-dempsey/c5204a6fbad4536b0e0871028bb3d17b to your computer and use it in GitHub Desktop.
upsells in cart liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>List collection handles (use for testing)</h3> | |
{% for item in cart.items %} | |
{% for collection in item.product.collections %} | |
<p>{{ collection.handle }}</p> | |
{% endfor %} | |
{% endfor %} | |
{% for item in cart.items %} | |
{% for collection in item.product.collections %} | |
{% if collection.handle == "double-prams" %} | |
{% assign double = true %} | |
{% break %} | |
{% endif %} | |
{% endfor %} | |
{% endfor %} | |
{% if double == true %} | |
<h1>Order contains item in collection double prams</h1> | |
{% else %} | |
<h1>Order doesn't contain item in collection double prams</h1> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment