I am working on an extension that duplicates the Mage Catalogsearch module. The end goal is to run two different searches on the same Magento store - catalog search for all regular searches and the new "localsearch" extension to find products that are located near the user.

I've copied over the catalogsearch files into their new folders and everything seems to be working fine. My question is: Where in Catalog Search is the collection of items searched created? I have a SQL statement prepared that will give a list of all sellers in the store (it is a marketplace) within a radius of a specific latitude and longitude. Once I have all of the seller IDs I can build a list of all the products that the keyword search should be limited to. I am just not sure in the rather complex layout of catalogsearch where that collection is being built.


1 Answer 1


For the sql query and actual product collection check the catalogsearch/layer model, method getProductCollection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.