I'm getting most viewed products with this code: But I want to filter simple products
$productCount = 3; $storeId = Mage::app()->getStore()->getId(); $_mostViewed = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('*') ->setStoreId($storeId) ->addStoreFilter($storeId) ->addViewsCount() ->setPageSize($productCount);
I researched and found this code
->addAttributeToFilter('type_id', array('eq' => 'simple')) They said it can filter by simple products. But it doesnt work. Is anyone know why?