服务支持
代码解决magento搜索不准确的问题
新闻添加时间:2016-03-08 18:30:24
步骤如下: 找到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> 替换成上面的代码就可以了!! |