Answer the question
In order to leave comments, you need to log in
How to make a "Show more" button?
The task is to make a button that will display new products in the list without reloading the page. Any ideas for implementation?
Answer the question
In order to leave comments, you need to log in
1. create an empty template that will be applied to the site if there is ajax_call=Y in the parameters
2. Add a "load more" button to click on it, hang up a handler that takes from the pagination links, the next one and takes the contents of the href parameter.
3. adds &ajax_call=Y to the received link and makes an Ajax request to this address, the result is added to the container with goods.
something like this
1. check if there are more pages
2. create buttons\links with the address to the next page
3. send an ajax request to the server
4. process the request on the server, return the response
5. output the response to the site
6. if necessary, repeat from the beginning
for the client side, you can use this: https://infinite-scroll.com/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question