Shopify themes, liquid, logos, and UX
As shown in the photo, it only allows you to see 30 collections before having to click onto the next page. What code is there to make it show all the collections on the same page, but only on the 'All Collections' page
If the customizer does not provide any option then probably you will need to update the code in your theme editor.
yes, my question is how
I believe i kind of know the answer not sure but i feel i do, can you please share the name of the theme you are using?
im using the dawn theme
Great. I have the code.
So open your code editor and open main-collection-product-grid.liquid file under sections folder and paste this code
{% assign products_per_page = section.settings.products_per_page %}
{% if collection.handle == 'all' %}
{% assign products_per_page = collection.products.size %}
{% endif %}
{%- paginate collection.products by products_per_page -%}
Where do you have to paste this?
Just between line 39 and 40 or search for paginate object like in the image and paste the code. Please watch carefully that there is change in paginate object as well and that is included in the code.
I have checked this. So only for all collections all products will show up but when you are on a specific collection it will show only the products that you have provided from the customizer and include paginations if required.
Hello, sorry this wasn't my issue.
My issue was making all collections show up on my page that shows 'All Collections' - not the products that show up on a collection.
Would you still know how I can do this?
Hi @lukafernada sorry if I wasn't able able to understand your requirement.
Just wanna confirm that, have you tried this?
And also do you have like a certain example site or something that might help me understand this better.
Yes, I actually already have that code in place.
No I don’t have an example site, how can I create one ?
All right let me give it one more try. May be I have got it. Will update you
thank you so much !
Got it this will definitely do it for you.
So open your main-list-collections.liquid file under sections in your code editor.
Just after line 24 or the endif statement i have circled paste this 3 lines of code. Make sure its within -%} just as in the image.
The code:
if request.path == '/collections'
assign paginate_by = collections.size
endif
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024