1
votes

I have more than 100 collections in Shopify. How can I make a pagination or infinite scroll to show this list? Not a list of products in collection, but a list of all collections.

3
Pure code-writing requests are off-topic on Stack Overflow — we expect questions here to relate to specific programming problems — but we will happily help you write it yourself! Tell us what you've tried, and where you are stuck. This will also help us answer your question better.xoxel

3 Answers

3
votes

I had this same issue and here's how you paginate the list-collections.liquid template. In this example, 25, can be swapped with another integer or the string limit.

{%- paginate collections by 25 -%}
     ...
     {%- for collection in collections -%}
          ...
     {%- endfor -%}
     ...
{%- endpaginate -%}
2
votes

You should use AJAX to load them, Shopify has limitations of 50 products/collections per page, so you have to load the rest via ajax using some infinite scroll.

Use code for infinite scroll for products and modify it to make it work with collections, I don't think it will be difficult.

0
votes

Shopify for loop can output a maximum of 50 results per page. Shopify Pagination

Just like stated above, use {% paginate %} tag to increase the pagination number. I believe the maximum pagination you can set is 2000