您的位置:首页 > 运维架构 > 网站架构

Magento网站搜索结果过多-搜索不准确的问题问题的解决

2017-09-27 11:07 399 查看
步骤如下:

找到app/design/frontend/default/default/template/catalogsearch/form.mini.phtml

代码如

<form id="search_mini_form" action="<?php echo Mage::getBaseUrl('web') ?>catalogsearch/advanced/result/" method="get">
<div class="form-search">
<label for="search"><?php echo $this->__('Search:') ?></label>
<input id="search" type="text" name="name" value="<?php echo $this->helper('catalogsearch')->getEscapedQueryText() ?>" class="input-text" />
<button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span></span></button>
<div id="search_autocomplete" class="search-autocomplete"></div>
<script type="text/javascript">
//<![CDATA[
var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
searchForm.initAutocomplete('<?php echo $this->helper('catalogsearch')->getSuggestUrl() ?>', 'search_autocomplete');
//]]>
</script>
</div>
</form>


替换成上面的代码就可以了!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  magento