Hello!
We are using Debut theme and as you can see here our collections with many products are not showing any pagination functionality at all!
Here are a couple examples you can see lots of products in the collection, but no pagination:
https://naturasoy.ca/collections/all-store-products
https://naturasoy.ca/collections/accessories
Notice, when scrolling down to the bottom of the collection grid, there is an animation which appears like there should be more products loading, but this doesn’t happen.
I would assume basic pagination is a standard function of the theme … and I assume this was probably working for us before but something may have broken it … so … any ideas on what might be interfering with this?
Would greatly appreciate any guidance here!
Here is the pagination section of code from collection-template-.liquid:
{% paginate collection.products by limit %}
{% if section.settings.layout == 'grid' %}
{% case section.settings.grid %}
{% when 2 %}
{%- assign grid_item_width = 'medium-up--one-half' -%}
{% when 3 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-third' -%}
{% when 4 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-quarter' -%}
{% when 5 %}
{%- assign grid_item_width = 'small--one-half medium-up--one-fifth' -%}
{% endcase %}
{% for product in collection.products %}{% include 'wlm-product' with product %}
- {% include 'product-card-grid', max_height: max_height, product: product, show_vendor: section.settings.show_vendor %}
{% else %}
{% comment %}
Add default products to help with onboarding for collections/all only.
The onboarding styles and products are only loaded if the
store has no products.
{% endcomment %}
{% if collection.handle == 'all' and collection.all_vendors.size == 0 and collection.all_types.size == 0 %}
- {% for i in (1..limit) %}
{% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %}
{{ 'product-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
{{ 'homepage.onboarding.product_title' | t }}
$19.99
{% endfor %}
{% else %}
{%- assign is_empty_collection = true -%}
{% endif %}
{% endfor %}
{% else %}
{% for product in collection.products %}{% include 'wlm-product' with product %}
- {% include 'product-card-list', product: product, show_vendor: section.settings.show_vendor %}
{% else %}
{% comment %}
Add default products to help with onboarding for collections/all only.
The onboarding styles and products are only loaded if the
store has no products.
{% endcomment %}
{% if collection.handle == 'all' and collection.all_vendors.size == 0 and collection.all_types.size == 0%}
{% for i in (1..4) %}
- {% capture current %}{% cycle 1, 2, 3, 4 %}{% endcapture %}
{{ 'product-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
{{ 'homepage.onboarding.product_title' | t }}
$19.99
{% endfor %}
{% else %}
{%- assign is_empty_collection = true -%}
{% endif %}
{% endfor %}
{% endif %}
{% if is_empty_collection %}
{{ 'collections.general.no_matches' | t }}
{% endif %}
{%- if paginate.pages > 1 -%}
{% include 'pagination', paginate: paginate %}
{%- endif -%}
{% endpaginate %}
Here is the code from pagination.liquid snippet:
{% comment %}
Renders a pagination bar
Accepts:
- paginate: {Object} Paginate Liquid object (required)
Usage:
{% include 'pagination', paginate: paginate %}
{% endcomment %}
{% unless paginate.previous.is_link %}
-
{% else %}
- {% include 'icon-arrow-left' %}
{{ 'general.pagination.previous' | t }}
{% endunless %}
- {{ 'general.pagination.current_page' | t: current: paginate.current_page, total: paginate.pages }}
{% unless paginate.next.is_link %}
-
{% else %}
- {% include 'icon-arrow-right' %}
{{ 'general.pagination.next' | t }}
{% endunless %}
Thanks so much if anyone can point me in the right direction here!