I need to use filters on different type of product listings not just on category page.
Let me give and example i have the product listing of mostly-viewed products . I have created a CMS page and assigned it a template file say mostly-viewd.phtml. Now i want to show filters on it.
So far i did this :
I made a custom module where,
Block/List.php
<?php
class Company_Filter_Block_List extends Mage_Catalog_Block_Product_List
{
protected function _getProductCollection()
{
$collection = parent::_getProductCollection();
/* Need to work here */
return $collection;
}
}
Now i am able to use this block and getting the product list of category i am using root category here so i am getting all the products of store now i want to filter them and show only those products , which have atleast 30 views.
Any idea how should i do this.
Thanks in advance.
mostly-viewd.phtml
file, is it a copy oflist.phtml
but with a certain category id or something like that?