简体   繁体   English

优化搜索值未显示在opencart主题中

[英]refine search values are not displayed in the opencart theme

I'm using opencart cms to manage my online shop. 我正在使用opencart cms来管理我的网上商店。 Recently I decided to add some filters to refine the search of my products. 最近,我决定添加一些过滤器以完善对我的产品的搜索。 I did everything according to this tutorial: link to tutorial 我根据本教程做了所有操作: 链接到教程

So I have added two filters: size and color. 因此,我添加了两个过滤器:大小和颜色。 To each of the filters I added three options: red, white, black and S, M, L. 我为每个过滤器添加了三个选项:红色,白色,黑色和S,M,L。

Everything seems to be working except one. 除了一个以外,一切似乎都在工作。 In the front end of the site I can only see the name of the filters: "size", "color" and the button "refine search". 在该站点的前端,我只能看到过滤器的名称:“大小”,“颜色”和按钮“精确搜索”。 However I cannot see the selections. 但是我看不到选择。 This is the image what I see in the frontend: link to the screenshot 这是我在前端看到的图像: 链接到屏幕截图

However if I look at the source code of the site, I see that server returns the options. 但是,如果查看站点的源代码,则会看到服务器返回选项。 This is how the code looks like: 代码如下所示:

  <div class="panel panel-default">
    <div class="panel-heading">Refine Search</div>
      <div class="list-group">
        <a class="list-group-item">Size</a>
        <div class="list-group-item">
          <div id="filter-group7">
                        <label class="checkbox">
          <input name="filter[]" type="checkbox" value="24" />
          L (1)</label>
                                <label class="checkbox">
          <input name="filter[]" type="checkbox" value="23" />
          M (0)</label>
                                <label class="checkbox">
          <input name="filter[]" type="checkbox" value="22" />
          S (0)</label>
                      </div>
    </div>
        <a class="list-group-item">Color</a>
    <div class="list-group-item">
      <div id="filter-group6">
                        <label class="checkbox">
          <input name="filter[]" type="checkbox" value="21" />
          White (3)</label>
                                <label class="checkbox">
          <input name="filter[]" type="checkbox" value="20" />
          Black (3)</label>
                                <label class="checkbox">
          <input name="filter[]" type="checkbox" value="19" />
          Red (2)</label>
                      </div>
    </div>
      </div>

Maybe someone will know where is the problem? 也许有人会知道问题出在哪里? I use a standart Induca theme, but I dont think that its the reason of the problem. 我使用标准的Induca主题,但是我不认为这是问题的原因。

I had same problem and I found answer! 我遇到了同样的问题,我找到了答案! You should go to layouts options, find there "category" template and add (+) there "filter" to left column panel. 您应该转到布局选项,找到那里的“类别”模板,然后在左边的列面板中添加(+)那里的“过滤器”。

Description there: http://www.pavothemes.com/blog/tutorials/137-how-to-use-opencart-filter.html 此处的说明: http : //www.pavothemes.com/blog/tutorials/137-how-to-use-opencart-filter.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM