Thanks! It worked perfectly!
Topic summary
A user implemented a “Load More” button for their Shopify collection page but encountered issues with it not displaying all products correctly.
Initial Problem:
- Custom JavaScript code (
collection-load-more.js) was created but failed to load all products properly - The user wanted 16 products displayed per page
Solution Provided:
A support representative (BSS-TekLabs) offered a multi-part fix:
- Modified JavaScript code that corrects the product appending logic (changing
new_products[i]tonew_products[0]and moving the page increment) - Additional code snippets for
main-collection-product-grid.liquidto handle pagination URL - Template code for
theme.liquidto conditionally load the script - CSS styling for
base.cssto properly display the load more button
Current Status:
- The original issue was resolved successfully
- A new problem emerged: the Load More button doesn’t work correctly when combined with sorting and filtering features
- This secondary issue remains unresolved