Exceeding the limit of 50 cycles per cycle in shopify

I have broken down the list of products for a limit of 50 to be placed on the entire page ( index.liquid ). But the if condition inside the for loop does not apply to whole elements paginated, since the loop is limited to 50 elements. Any help would be appreciated.

  <td class="collection-reviews"> {% paginate collections.all.products by 1000 %} {% for product in collections.all.products %} {%if product.metafields.spr.reviews %} <div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div> {%endif%} {% endfor %} {%endpaginate%} </td> 
+5
source share
1 answer

No, you cannot overcome it, you can request up to 50 products per page, Shopify will not allow more than 50 products to maintain a load balance on the server.

quote from procurement documentation: http://docs.shopify.com/manual/configuration/store-customization/page-specific/collections/add-view-all-to-collection-pages

Never paginate pages by more than 50 so that how many products you request per page. Respect Shopify Application Servers. If you don't use any paginate tags, pagination hits behind the scene and you get only the first 50 products in the specified collection.

+2
source

Source: https://habr.com/ru/post/1206447/


All Articles