开发者

How to override default search in Magento?

I am working on a Magento site, and i would like to edit the default search result.

Editing search result is not editing the appearance of search result but the actual search results generated.

The idea is, if the Magento search do开发者_开发技巧es not return any value then i need to do a search in my custom table to fetch some relative products.

Could anyone help me to edit the default Magento search??

Thanks a lot in advance.


You will need to modify some of the models in catalogsearch module, this link has a good explanation of how to override Core classes. In your case you will need to add your logic somewhere in the Query model or its resource or collection models.


This CMS Search extension will provide an excellent example of how to extend the default search. It adds extra content into the search index and allows you to control how those results are presented to the searcher.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜