TLTR: How to load category products in batches?

I want to show ALL products for a category and remove the pagination. However, that poses a huge performance concern that I need to address.

Let's assume that a category has 96 products. I would like to load first 24 products (at this point the site would become usable and customer can start interacting with the store), then load another batch of 24 products in the background (customer won't even realise that the page is still loading products in the background), then load another batch and so on until all the products in the category are loaded. The next batch of products should start loading as soon as the previous one has completed loading.

This is something similar to a LazyLoad approach, however, the pagination is completely removed, customer doesn't have to scroll down to the bottom to load more products (or trigger anything on scroll) and there would be no pages added to the URLs (as "Allow All Products per Page" would be enabled in the admin and enforced on all category pages).

To conclude:

  • Load 24 products -- Customer is able to interact with the store at this stage
  • Load next batch of 24 products -- Happens automatically as soon as the first batch is loaded
  • Load the next batch of 24 products -- Again, start loading as soon as the previous batch is loaded
  • Load the last batch

If there is an extension available to facilitate this functionality, please do not hesitate to share.

  • I'm also having this issue when trying to load over 600 products on the category page my server is timing out, i don't want pagination. – Gaz Smith Oct 29 '20 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.