Duplicates Collection in Shopify
estebangallego opened this issue · comments
Esteban Gallego commented
Describe the bug
Once you start scrolling and at the last product, it will duplicate all the products again and again.
To Reproduce
Steps to reproduce the behavior:
- Scroll down
- At the last product in the collection, the batch of products will repeat with no stop
Expected behavior
Stop scrolling at the last product
Link
https://honorthegift.co/collections/accessories
Additional context
Please help solving this bug
Alexei Tenitski commented
This is likely because you had paginate.previous
and/or paginate.parts
in Pagination block.
It works for me after I removed those two, leaving only paginate.next
like shown in the docs:
{% paginate collection.products by 3 %}
<div id="AjaxinateContainer" >
{% for product in collection.products %}
{% include 'product-grid-item' %}
{% endfor %}
</div>
<div id="AjaxinatePagination">
{% if paginate.next %}
<a href="{{ paginate.next.url }}">Loading More</a>
{% endif %}
</div>
{% endpaginate %}