大家一致反应magento的搜索不准确,因为很多词语在产品名字里没有,但是还是被搜索出来的,这回造成初级使用者的困惑,再者magento比较复杂,设置起来也很费劲。
<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>
替换成上面的代码就可以了!! |