Short description of issue
pagination includes draft products
Reproduction steps
{%liquid
if collection.products.size > 0
paginate collection.products by section.settings.products_number
if paginate.current_page == 1
render ‘collection-layout’
%}
Additional info
Pagination is showing pages incorrectly. For example, 16 products per page, 49 total products, 7 of which are draft. The collection page shows that there are 4 pages, but there should only be 3.
According to sidekick this is because the collection count includes draft products. But sidekick was unable to provide a source for this.
I attempted to use the following:
{% assign available_products = collection.products | where: “available”, true %}
but that process removes the manual collection sorting.
Any ideas on how to deal with this other than to remove the draft products?
What type of topic is this
General discussion