50 item limit no longer?

Shopify Partner
22 0 3

Has Shopify recently dropped the 50 item limit?

 

 

 

 

I'm working on a theme (that I did not develop) and I noticed

{% paginate collection.products by 1000 %} 

and it seems to work.  

Then I found this old post:

https://ecommerce.shopify.com/c/shopify-discussion/t/loop-through-all-products-in-a-collection-21987...

which seems to suggest the new limit is 1000?

I seem to remember that Shopify use to max out at 50, even if you set that 'pagination by' to a higher number.

Relatedly, what kind of performance hit would looping through collections, then looping through products within that collection have?  For example, loop through five collections, and then within each collection loop through  ~75 products, returning a total of ~375 products.

 

 

1 Like
Shopify Expert
525 0 34

From my experience the 500 limit has always been a bit lax to be honest... The overall performance hit is really negligable for loading just basic information about all of that stuff... the question is how long does it take to load other information like images etc.

At least that is from my experience...

Trevor www.carlowseo.com
0 Likes
Shopify Partner
53 0 8

Like CarlowSEO mentioned, the 50 limit has never really been a HARD limit, but rather a recommendation to try and keep server load to a minimum. You can set it higher if you wish but that may have an impact on performance.

0 Likes
Highlighted
Shopify Partner
22 0 3

Thanks.  50 just seems kind of low.

In any case, I've now hit a new problem...

In my example above, where I first loop through collections, then the products within that collection, the 50 product override only works on the first collection.

For example, if I have two collections over 50, only the first collection it loops through goes over the 50 limit, the second one caps out at 50  [the reason for looping through collections first is so that each collection, on a collection all page, can get its own header].

0 Likes
Shopify Expert
704 0 68

"Never really been a hard limit"? What does that even mean? "A bit lax"! Either it's a limit or it's not! It was... When did it become not and what is the limit now? And where are these recommendations you speak of : )

I'm a million different people
0 Likes
Shopify Expert
9981 84 1492

All the docs still note 50 as the limit so this is all news to me.

For loops can only output a maximum of 50 results per page. In cases where there are more than 50 results, use the paginate tag to split them across multiple pages.

When using a layout of none you can pull in up to 1000. If you are using a layout and can pull 1000 items at once I wouldn't be expecting it to stay that way. 

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
22 0 3

when you say 'layout of none', do you mean just looping through products, and not looping through collections first?

it doesn't seem like it would be that uncommon of a scenario where someone would want their 'all' page to have products grouped together into collections.  i.e. all 'men' together, all 'women' together.

0 Likes
Shopify Expert
9981 84 1492

Layout none

If you don't want any layout to be used on a specific template, you can use none.

If you have valid reasons to load 1000s of products onto the one page you've always got the option to load them in the background with JavaScript. 

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
22 0 3

I'm still not sure I understand how the 'layout none' tag relates to the collection page... what I'm talking about is a looping issue, not a layout issue, right?

And I'm not trying to loop through '1000s of products' - I've run into a few situations of product counts of 60 or 70, so the 50 cut off is particularly annoying in those situations.  Especially when 100 is a more common paginate cutoff you find in e-commerce shops.  Or, increasingly, 'view all'.

In any case, if Shopify 'allows' up to 1000, this all moot, right?  I don't know the statistics, but I imagine up to a 1000 covers the vast majority of Shopify stores that want a 'View All' no pagination page.

But I'm still running into the problem where looping through collections, then products within those collections, bypasses the 50 cut off only in the first collection it loops through.

And by loading via javascript, you mean using ajax?

0 Likes
Shopify Partner
53 0 8

I think you are experiencing issues because you are using "paginate", which is most likely only allowed on the page once.

Another option would be to, using liquid:

  1. Determine the number of products in the collection (collection.products_count)
  2. Divide by 50 to determine the number of times to loop
  3. Loop through the products setting the offset and limit parameters in the {% for %} loop
0 Likes