Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Search CMS and category text
 
pglock
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2010-05-06
Princes Risborough, UK
 

I want search results to show categories and CMS pages in the results, not just products. Is this possible?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andre N
Sr. Member
 
Avatar
Total Posts:  186
Joined:  2009-12-09
CA
 

There is a free extension for this. I got it from Magento Connect:
http://www.magentocommerce.com/magento-connect/tangkoko/extension/1218/tangkoko--fidesio-cms-search

It had some problems installing for me and I had to create the databases manually, but it is great. I love it.
You can try it on this site http://www.xtremelean.us/consulting if you want to see how it works

 
Magento Community Magento Community
Magento Community
Magento Community
 
ec0mmerce
Sr. Member
 
Avatar
Total Posts:  242
Joined:  2013-01-17
 

Hi

For resolving this issue, please refer the following links:
- Search CMS pages (including advices on functionality improvement): http://www.mageaustralia.com.au/blog/search-cms-pages-magento/
- Search by category:
http://www.magentocommerce.com/boards/viewthread/74632/
http://www.magentocommerce.com/boards/viewthread/78534/
http://www.magentocommerce.com/wiki/5_-_modules_and_development/search_and_advanced_search/how_to_add_search_by_category_to_advanced_search

also you can try the following code for category search if the problem has not been solved (but i really believe that you will cope with this problem following the instructions above):

$collection Mage::getModel('catalog/category')->getCollection()
    ->
setStoreId('0')
    ->
addAttributeToSelect('name')
    ->
addAttributeToSelect('is_active');
    foreach (
$collection as $cat{
        
if ($cat->getName() == 'category_name'{
            $categoryid 
$cat->getId();
            break;
        
}
    }
 
Magento Community Magento Community
Magento Community
Magento Community
 
davison
Member
 
Avatar
Total Posts:  56
Joined:  2011-09-11
 

It’s possible in the following way, make a choice of the category, Use the descriptive for the Identifier.

I’d recommend using the HTML view for this. Add the list of categories, sub-categories, etc as follows,

<ul>
<li><a href="{{store direct_url="category/sub-category1"}}">Sub-Category1</a></li>
<ul>
<li><a href="{{store direct_url="category/sub-category1/sub-sub-category1"}}">Sub-Sub-Category1-1</a></li>
<li><a href="{{store direct_url="category/sub-category1/sub-sub-category2"}}">Sub-Sub-Category2-2</a></li>
</ul>
<li><a href="{{store direct_url="category/sub-category2"}}">Sub-Category2</a></li>
<ul>
<li><a href="{{store direct_url="category/sub-category2/sub-sub-category1"}}">Sub-Sub-Category2-1</a></li>
<li><a href="{{store direct_url="category/sub-category2/sub-sub-category2"}}">Sub-Sub-Category2-2</a></li>
</ul>
</ul>

Finally if you wish to set the the following categories in your menu list, Just you can use this line for adding the category list,

<?php echo $this->getLayout()->createBlock(’cms/block’)->setBlockId(’category’)

Please try it and let me know.....

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top