arrow-right cart chevron-down chevron-left chevron-right chevron-up close menu minus play plus search share user email pinterest facebook instagram snapchat tumblr twitter vimeo linkedin youtube subscribe dogecoin dwolla forbrugsforeningen litecoin amazon_payments american_express bitcoin cirrus discover fancy interac jcb master paypal stripe visa diners_club dankort maestro trash

Shopping Cart


qwiq Shopify Section Tips & Tricks

How to Get Around the 50 Product Limitation in Shopify Liquid


If you’ve tried to loop through all products in a collection using Shopify Liquid, you’ve likely run into this frustrating limitation: Shopify only returns the first 50 products by default in a for loop.

This can be a problem if you have large collections and want to display all your products on a page — like in a custom collection template, product grid, or infinite scroll.

But there is a workaround. Let’s break it down.

The Limitation

When using Liquid like this:
{% for product in collection.products %}
  {{ product.title }}
{% endfor %}

Shopify limits the number of products returned to 50. If you want more, you need to paginate.

The Solution: Use paginate

Shopify allows you to use the paginate tag to get up to 1,000 products (in batches of 50 per page).

Here's how:
{% paginate collection.products by 1000 %}
  {% assign products = collection.products %}
{% endpaginate %}
--> {{products.size}} //outputs 1000 (or the maximum available products in that collection)

Boom. Now you’ve got up to 1,000 products. But — important — if the collection has more than 1,000 products, you still won’t see them all.

To handle more than 1,000, you'll need to implement pagination controls (see below) and/or use JavaScript to load the next pages dynamically (e.g., infinite scroll or a "Load More" button).

You can use this code directly on a collection page. 

But if you want to use it on other pages, you'll need to directly target a specific collection. So then you would you the 'collections' object like this:
{% paginate collections['COLLECTION_HANDLE'].products by 1000 %}
  {% assign products = collections['COLLECTION_HANDLE'].products %}
{% endpaginate %}

*** Just replace 'COLLECTION_HANDLE' with the correct handle and you're good to go!

If You Need Pagination Controls

Shopify’s paginate object includes useful variables like previous, next, and parts:

{% if paginate.pages > 1 %}
  <nav class="pagination">
    {% if paginate.previous %}
      <a href="{{ paginate.previous.url }}">Previous</a>
    {% endif %}
    {% for part in paginate.parts %}
      {% if part.is_link %}
        <a href="{{ part.url }}">{{ part.title }}</a>
      {% else %}
        <span class="current">{{ part.title }}</span>
      {% endif %}
    {% endfor %}
    {% if paginate.next %}
      <a href="{{ paginate.next.url }}">Next</a>
    {% endif %}
  </nav>
{% endif %}

Wrapping Up

Shopify’s 50-product limit in Liquid can seem like a roadblock at first — but it’s easy to work around once you understand how pagination works. By using the paginate tag smartly, you can access up to 1,000 products (or up to 250 per page), and even more if you layer in creative frontend techniques like infinite scroll or "Load More" buttons.

If your goal is to display more products per page — or simply take more control over how your collections appear — using paginate along with proper assign logic gives you a clean, efficient solution within Shopify’s Liquid framework.

Featured Sections

Please add a collection

Try for Free