Saturday, September 10, 2011

How to create custom pagination in magento?

Edit your "template/catalog/product/list/toolbar.phtml" file. Place the below line to the top of the file.
$_productCollection = Mage::getModel('catalog/product')->getCollection();
$_productCollection->addAttributeToFilter('brand', array('in' => array(11)));
$_productCollection->addAttributeToSelect('*');
$_productCollection->load(); 
$this->setCollection($_productCollection);

No comments:

Post a Comment