Shopify Code Help
Out of context: Reply #5
- Started
- Last post
- 8 Responses
- pockets0
{% if customer and customer.tags contains 'KENTUCKY' %}
{% assign customer_kentucky = true %}
{% else %}
{% assign customer_kentucky = false %}
{% endif %}{% for product in collection.products %}
{% include 'bold-product' with product, hide_action: 'skip' %}
<div class="product-item-wrapper {% cycle 'first', '', '', 'last' %} col-sm-3 col-xs-6 ">
{% if customer %}{% if product.tags contains 'KENTUCKY' %}
{% if customer_kentucky %}
{% include 'index_product-items' with collection.handle %}
{% endif %}
{% endif %}{% if product.tags contains 'INHOUSE' %}
{% if customer_kentucky == false %}
{% include 'index_product-items' with collection.handle %}
{% endif %}
{% endif %}{% if product.tags contains 'dropship' %}
{% if customer_kentucky == true %}
{% include 'index_product-items' with collection.handle %}
{% endif %}
{% endif %}{% else %}
{% comment %}handle case where no customer exists {% endcomment %}
{% endif %}
</div>
{% endfor %}