On the catalog product list view I can use shuffle() on the product collection however it only shuffles a small proportion (e.g. 10) of the full collection (hundreds). There is also infinite ajax scroll on this page. The shuffled products are those on the first 'page' before the scroll loads more.
$_productCollection=$this->getLoadedProductCollection(); .... $items = $_productCollection->getItems(); shuffle($items); foreach ($items as $_product): ....
Is there any way I can keep the scrolling feature but shuffle the full collection?
One way to shuffle all products is the following, but this takes an age to load and has no scrolling.
$_productCollection = $this->getLoadedProductCollection(); $_productCollection->clear(); $_productCollection->setPage(1,99999);