Adding limit and random SQL in Magento collection query

Set bellow code in Block:
$this->_productCollection->getSelect()->order(new Zend_Db_Expr(‘RAND()’));
$this->_productCollection->getSelect()->limit($n);

Filter in Magento collection query

Comments are closed.