For product in collection.products doesn't output the right number of products

For product in collection.products doesn't output the right number of products

louichb22
Shopify Partner
1 0 0

Hey! I'm making a simple collection page and ran into an issue. I'm showing the number of products in my collection with {{ collection.products_count }} and runing this loop : 

 

{% paginate collection.products by 24 %}
  {% for product in collection.products %}
   {% include "product-card" %}
  {% endfor %}
{% endpaginate %}

 

The loop outputs 4 products when I'm in a specific collection that has only 4 products but the {{ collection.products_count }} outputs 8. Also, when I go to /collections/all, the loop outputs less than 24 products per page even if my shop has hundreds of products.

 

Can someone help? Thanks!

 

Capture d’écran, le 2023-02-23 à 14.17.05.png

Replies 0 (0)