Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用户提交Magento搜索时是否忽略特殊字符?_Magento_Search_Character - Fatal编程技术网

用户提交Magento搜索时是否忽略特殊字符?

用户提交Magento搜索时是否忽略特殊字符?,magento,search,character,Magento,Search,Character,在提交Magento(1.5.1.0)搜索时,是否有人知道忽略特殊字符的方法 例如:如果某人提交#955作为产品搜索,则返回零结果,但如果搜索955,则返回相应的产品结果 通过查看Magento admin中的搜索词,很多用户在搜索时都会在型号前加上“#”,如果可能的话,我想对其进行过滤,以便在提交搜索时忽略它 提前感谢您的帮助 您可以在自定义模块中编写结果控制器,该模块将检查任何特殊字符并将其过滤掉 请参阅Magento Mage_Core_Controller_Front_Act中的本课程。

在提交Magento(1.5.1.0)搜索时,是否有人知道忽略特殊字符的方法

例如:如果某人提交#955作为产品搜索,则返回零结果,但如果搜索955,则返回相应的产品结果

通过查看Magento admin中的搜索词,很多用户在搜索时都会在型号前加上“#”,如果可能的话,我想对其进行过滤,以便在提交搜索时忽略它


提前感谢您的帮助

您可以在自定义模块中编写结果控制器,该模块将检查任何特殊字符并将其过滤掉

请参阅Magento Mage_Core_Controller_Front_Act中的本课程。您的自定义模块应该扩展这个类,您需要为此编写一个方法

希望这能给你一些想法