Pagination plus View All -button

Pagination plus View All -button

PK2023
New Member
7 0 0

Hello,

 

I would like to add “View all” -button to our collection page. Currently we paginate by 24 and I want to keep it that way, however I would like to also add the “view all” -button under the pagination that would change the pagination to 700. So that customer could either use the pagination or simply see all products inside the collection in same page. 

 

I am experienced in coding but for some reason I cannot make this work. 

 

So basically create a button for customer that changes {%- paginate collection.products by section.settings.products_per_page -%} To {%- paginate collection.products by 700 -%}.

 

Thanks for the help!

Reply 1 (1)

PK2023
New Member
7 0 0

Shopify itself gives the following solution but for me it just reloads the page but doesn’t do anything to the pagination:

<a href="{{ collection.url }}?view=all">View All</a>