Created
October 19, 2014 22:44
-
-
Save thenexus00/05cf8b084bba2d45328e to your computer and use it in GitHub Desktop.
Sign up to different campaigns by detecting what is in the cart
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
{module_shoppingcartsummary direction="vertical" collection="cartProducts" template=""} | |
{%if cartProducts.itemCount != 0%} | |
{% assign isCleanLean = false %} | |
{% assign isGoodGreenStuff = false %} | |
{% for collection in cartProducts.items %} | |
{% if isCleanLean == false and collection.name contains 'Clean Lean' %} | |
{% assign isCleanLean = true %} | |
{% endif %} | |
{% if isGoodGreenStuff == false and collection.name contains 'Good Green Stuff' %} | |
{% assign isGoodGreenStuff = true %} | |
{% endif %} | |
{% endfor %} | |
{% if isCleanLean == true and isGoodGreenStuff == false %} | |
<div class="hidden"><input type="checkbox" checked="checked" name="CampaignList_52913"> {%comment%}- Good Green Stuff Teasing-{%endcomment%}</div> | |
{% elsif isGoodGreenStuff == true and isCleanLean == false %} | |
div class="hidden"><input type="checkbox" checked="checked" name="CampaignList_52914"> {%comment%}- Clean Lean Protein Teasing -{%endcomment%}</div> | |
{% elsif isGoodGreenStuff == true and isCleanLean == true %} | |
div class="hidden"><input type="checkbox" checked="checked" name="CampaignList_52919">{%comment%}- Everything Purchased List -{%endcomment%}</div> | |
{% endif %} | |
{%endif%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment