---- dataentry snippet ---- type : snippet # do not change this line category : receipt # mention the category like 'shipping', 'checkout' etc name : Display Conditional Content # the name of the snippet description : Display conditional content based on any type of criteria. # description about snippet versions_tags : 2.0 # compatible versions ( always use the dots between the numerals e.g 0.6.0 or 0.7.1 ) reference_url : # External link tags_tags : # tags, separated by commas. date_dt : # the date in YYYY-MM-DD format ---- ====== Display Conditional Content ====== Using the sample code below, you can display custom html, javascript, etc. based on any criteria. For example, set parameter as false if specific product category is found: {% if context == 'receipt' %} {% set candy = true %} {% for item in items %} {% if item.category == 'WHOLESALE' %} {% set categoryFound = false %} {% endif %} {% endfor %} {% if categoryFound %}

Success!

{% endif %} {% endif %}{# context == receipt #}