Navigate to following path and make some changes:

app/code/core/Mage/CatalogSearch/Block/Autocomplete.php

At the bottom of page find the function named  function getSuggestData()

comment out or remove  the function with the following code:

public function getSuggestData()
{
    if (!$this->_suggestData) {
    $query = $this->helper('catalogsearch')->getQueryText();
    $products = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToFilter('name',array('like'=>'%'.$query.'%'))
    ->load();
    foreach($products as $product) {
    $_data = array(
    'title' => $product->getName(),
    'row_class' => (++$counter)%2?'odd':'even',
    'num_of_results' => 1
    );
    $data[] = $_data;
    }
    $this->_suggestData = $data;
    }
    return $this->_suggestData;
}

Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *