For my custom module I have get product by manufacturer. For template I have copied list.phtml
.
On the template file pagination appears but it shows all product instead of selected limit per page. Sorting is not working too.
How can I make it work??
It is my block file:
protected function _getProductCollection()
{
if (is_null($this->_productCollection)) {
$layer = $this->getLayer();
$brand_id = $this->getRequest()->getParam('id');
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('*');
$collection->addFieldToFilter(array(
array('attribute' => 'manufacturer', 'eq' => $brand_id)
));
}
return $collection;
}