如何在Magento中覆盖默认搜索? [英] How to override default search in Magento?

查看:57
本文介绍了如何在Magento中覆盖默认搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在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.

想法是,如果Magento搜索未返回任何值,那么我需要在自定义表中进行搜索以获取一些相关产品.

The idea is, if the Magento search does not return any value then i need to do a search in my custom table to fetch some relative products.

有人可以帮我编辑默认的Magento搜索吗?

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

非常感谢.

推荐答案

您将需要修改catalogsearch模块中的某些模型,

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.

这篇关于如何在Magento中覆盖默认搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆