Let’s initiate a discussion!!
In one of the Magento 2 project, we have added a load more button on the listing page.
So whenever the user clicks on the load more button, the next page of products will be shown.
You can use below on the custom listing page.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<script src ="https://infiniteajaxscroll.com/vendor/jquery-ias/dist/jquery-ias.min.js"></script> <link src = "https://raw.githubusercontent.com/ravbetsky/infinite-ajax-scroll/master/dist/css/jquery.ias.css"/> <script type="text/javascript"> var ias = jQuery.ias({ container: ".main", item: ".products-grid", pagination: ".toolbar .pages", next: ".next" }); ias.extension(new IASSpinnerExtension()); // shows a spinner (a.k.a. loader) ias.extension(new IASTriggerExtension({offset: 1})); // shows a trigger after page 3 ias.extension(new IASNoneLeftExtension({ text: 'There are no more pages left to load.' // override text when no pages left })); </script> |
You will also need to change class for this as shown below.
1 2 3 4 |
container: ".main", item: ".products-grid", pagination: ".toolbar .pages", next: ".next" |
That’s it.
[crayon-641efa28e5793997699226/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.