该商店运行于:Magento ver。 1.4.1.1如何隐藏/删除Magento中的搜索字段
由于搜索不起作用,我们希望隐藏搜索栏直到有时间查看问题。我到处搜索。我不断看到人们编辑catalogsearch.xml,但我甚至不知道在哪里可以找到它。
对我来说,它看起来像搜索字段包含在一个内容块(在左导航的下面或上面),它也有联系信息。但我甚至不知道内容块在哪里。
==== ====编辑 (因为我不能回答我自己的职位为5小时,这里的下面:)
答案发现它:
位置:应用程序>设计>前端>默认> calshrm>模板>目录搜索> form.mini.phtml 只需删除代码并将删除的部分作为.txt文件存储在同一目录中。
代码中删除:
<form id="search_mini_form" action="<?php echo $this->helper('catalogsearch')->getResultUrl() ?>" method="get">
<div class="dfsboxleft">
<label for="search"><!--?php echo $this->__('Search:') ?--></label>
<button type="submit" title="<?php echo $this->__('Search') ?>" class="dfsbutton">
<span>
<span><!--?php echo $this->__('Search') ?--></span>
</span>
</button>
</div>
<div class="dfsbox">
<input id="search" type="text" name="<?php echo $this->helper('catalogsearch')->getQueryParamName() ?>"
value="<?php echo $this->helper('catalogsearch')->getEscapedQueryText() ?>" class="dfsinput" />
<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->__('Product Search') ?>');
searchForm.initAutocomplete('<?php echo $this->helper('catalogsearch')->getSuggestUrl() ?>', 'search_autocomplete');
//]]>
</script>
</div>
</form>
我假设form.mini的东西比什么是正常的不同,在这种情况下,你可能必须寻找上述文件,我不知道在哪里那是一个。
谢谢,我想过使用display:none来做类似于css的事情。但终于搞清楚了。 – gstricklind 2012-01-06 22:31:35