1

I want to show the full product list from a category without pagination, however with ~500 simple products page loading is slow. Is there any way I can fetch the full collection and show sections at a time, reducing page load times?

Alternatively is there a way I can setPageSize(20) (or something), but save the full collection for use later in the list.phtml file?

2

3 Answers 3

1

Loading 500 product will always slow down the server.

However you can trick the function to get the result.

You can load products on scroll, so that customer don't need to go to next page.

See this link.

If you using this function I would recommend to disable your pagination and count function from admin.

Hope this helps.

5
  • Actually I did have infinite ajax scroll on the site but because I needed to randomise products it showed duplicates. I will try your suggestion with the disabling, where in admin do I disable those?
    – MW Millar
    Apr 18, 2015 at 9:35
  • You don't need to disable those, however since the counting will say 5 of 10 items all the time(correct counting for first page) and pagination will still be visible. Which both doesn't make any sense. You can have a look my implementation Apr 18, 2015 at 9:39
  • Ok, that's good to know, but I think my original problem remains. When page size is set, then each new 'page' of the scroll returns a random selection of products, which can include products already seen on the scroll. I'm trying to avoid duplicates, just show each product once, but in a random order each time.
    – MW Millar
    Apr 18, 2015 at 9:45
  • Regarding your duplicate issue, you can open new thread, will require more info on that. Apr 18, 2015 at 10:00
  • I have already :) but I couldn't make any progress. magento.stackexchange.com/questions/63870/…
    – MW Millar
    Apr 18, 2015 at 10:04
0

Implement full page caching, i.e.

http://www.magentocommerce.com/magento-connect/lesti-fpc-simple-fullpagecache.html

1
  • 1
    FPC isn't the best solution for that one, Lazy Loading would be better.
    – dsitovs
    Apr 18, 2015 at 13:24
0

Try this

    $collection
        ->setPageSize(20)
        ->setCurPage($i)
        ->load();

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.