Hi, i've been triyng to change the default result page of magento, i want the products grouped by categories, it don't include the subcategories but the products, the search criteria is the product name, so, i was triyng to use the defalt simple search of magento, untill now no result, maybe i have to override the search and make a new one, i know that with this i can get all the categories and its product collection,
$categories = Mage::getModel('catalog/category')
->getCollection()
->addAttributeToSelect('*');
foreach($categories as $category)
{
$array = $category->getParentIds();
$children = explode(',',$category->getChildren());
$products = $category->getProductCollection();
}
but i need to filter by the produc name, the result i'm secting to show is like this
Category I
- Product I
- Product II
Category II
- Product III
- Product IV