cancel
Showing results for 
Search instead for 
Did you mean: 

Name and Location of file that has search bar mySQL for Magento 1?

Name and Location of file that has search bar mySQL for Magento 1?

Hello! I'm still working on my degree in programming so I can't find the file that has the MySQL code for the search bar in Magento1. If I could find the MySQL code I believe I can change it to suit my purposes.

The reason why I need to change it are the configuration controls for it don't seem to work as they should.

My goal is to make the search bar have an AND effect for having multiple words instead of an OR. I realize there is a built-in way to do this, but that way did not work, possibly due to our SM Market extension.

 

Any help is greatly appreciated!

1 REPLY 1

Re: Name and Location of file that has search bar mySQL for Magento 1?

Hi Steve,

 

Magento is not use direct query for get any result in from Database.

It uses collection, load methods to get records.

 

If you want to change the result of searching then you have to work in controller and Model of catalogsearch modules.

I can show you controller file path:

app\code\core\Mage\CatalogSearch\controllers\ResultController.php follow by indexAction.

and

For the Model it is using 

app\code\core\Mage\CatalogSearch\Model\Query.php

 

Now, you can play with both files.
If Issue Solved, Click Kudos/Accept As solutions.

 
Thanks
Vishal