james-a
12/1/2017 - 11:08 AM

Cart Related Items

{% assign inbasket = '' %}
  {% for item in cart.items %}
    {% assign inbasket = inbasket | append: item.product.handle | append: ',' %}
  {% endfor %}

  
  {% assign count = '' %}
  
  {% for product in collections.cart-sellers.products %}
  {% unless inbasket contains product.handle %}
      {% if count.size < 4 %}
        {% include 'product-list-item' %}
        {% assign count = count | append: 'I' %}
      {% endif %}
  {% endunless %}
  {% endfor %}