0

我想修改 Magento 搜索表单发送的查询(修剪零、删除连字符等)。我必须覆盖哪些方法才能使其在 magento 搜索、建议和高级搜索中工作?(我使用magento CE 1.7)

4

2 回答 2

1

从搜索表格的地方开始POST

  1. Mage_CatalogSearch_ResultController::indexAction()
  2. Mage_CatalogSearch_AdvancedController::resultAction()

在这些方法中的每一个中,您都可以通过相应的搜索集合跟踪链,例如:

  • Mage_CatalogSearch_Block_Advanced_Result::_getProductCollection()
    • Mage_CatalogSearch_Model_Advanced::getProductCollection()
      • 等等...
于 2012-09-07T11:50:19.123 回答
0

我最终所做的是重写 Mage_CatalogSearch_Helper_Data 并按照此处的建议覆盖 getQueryText():https ://stackoverflow.com/a/11308076/594323

于 2012-10-10T22:32:22.953 回答