Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Forloop on smartcollection, with 50 limit? by CharlesTop

$
0
0

Hope someone can help here. I am attempting to iterate through a "smart collection" list of product and search custom metafields data. However my Forloop only gets through the first 50 due to the default 50 limit (http://docs.shopify.com/themes/liquid-variables/collection). Is there a way to get around this?

Example of what I am attempting to do. not actual code. Just trying to illustrate how I am unable to search through the entire products found in collection searchcollection because it only looks at first 50.

    {% for product in collections.searchcollection.all_products %}
      {% capture controlledItem %}{{product.metafields.custom_fields['TEST'] | downcase }}{% endcapture %}

      {% if controlledItem contains searchTerm[0] %}
          <!-- FOUND -->
      {% endif %}
    {% endfor %}

 


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>