Magento上的搜索按钮损坏

Search Button Broken on Magento

本文关键字:按钮 损坏 搜索 Magento      更新时间:2023-09-26

首先,我不是开发人员。我们没有专门的开发人员为我们的Magento网站。几天前,我的老板让我修复网站上的一个错误。现在的情况是搜索按钮不起作用。我试着点击它,但什么也没发生。当我进入Inspect Element时,控制台中出现了一个错误。它在prototype.js:5557中显示"UncaughtTypeError:无法读取未定义的属性'get'"。

我已经试过了我能想到的一切来解决它。说实话,这并不多。我已经重新索引了文件,清除了缓存,更新了Magento,并确保按钮位于它应该位于的位置。我已经确保产品可以在Magento中搜索,并且我已经确保搜索类型设置为like/fulltext。我认为这可能是代码中的一个错误,但我不知道该编辑什么或在哪里编辑。想弄清楚这件事我都快疯了。

商店的链接是:http://store.excitementvideo.net/但请记住,这是NSFW。

谢谢

更新:我被告知这是一个表单错误?这是我的form.min.html文件

<form id="search_mini_form" action="<?php echo $this->helper('catalogsearch')->getResultUrl() ?>" method="get">
    <div class="form-search">
        <label for="search"><?php echo $this->__('Search:') ?></label>
       <form> <input id="search" type="text" name="<?php echo $this->helper('catalogsearch')->getQueryParamName() ?>" value="<?php echo $this->helper('catalogsearch')->getEscapedQueryText() ?>" class="input-text" /></form>
        <form><button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button></form>
        <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>

看起来javascript在字符串部分有轻微错误。

尝试更改

<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>

    <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>