Programmatically we can create search module by below code

$query = Mage::helper('catalogSearch')->getQuery();
 $query->setStoreId(Mage::app()->getStore()->getId());
 $query->setQueryText(Mage::helper('catalogsearch')->getQuery()->getQueryText());

 $collection = $query->getSearchCollection();
 $collection->addSearchFilter(Mage::helper('catalogsearch')->getQuery()->getQueryText());
 $collection->addAttributeToSelect('*');
 $collection->addAttributeToFilter('status', 1);

Ensure the search key name is ‘q’ .

 Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2014 Developers Corner Suffusion theme by Sayontan Sinha