Magento網站搜尋結果過多-搜尋不準確的問題問題的解決
阿新 • • 發佈:2019-01-26
步驟如下:
找到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>
替換成上面的程式碼就可以了!!