Can liquid filter a collection greater than 50 items and render them after applying a filter?

1 0 0

Let's say I have 130 products in a collection, 80 of which are out of stock. I don't want to display out of stock items on my website when a customer visits that collection. From what I understand, if the collection size is greater than 50, liquid processes the first 50 product and then applies whatever filter I want and then paginates the rest. In that case, if all the first 50 products in my collection are out of stock, then the customer would land on a blank page, and the products that are in stock would be paginated in the next 2 pages. Am I correct, and if so, what's a viable workaround for such cases?

Replies 0 (0)