Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search Shopify搜索。液体分页已损坏_Search_Pagination_Shopify_Liquid - Fatal编程技术网

Search Shopify搜索。液体分页已损坏

Search Shopify搜索。液体分页已损坏,search,pagination,shopify,liquid,Search,Pagination,Shopify,Liquid,我试图显示Shopify允许每页调用的全部50个产品,但在我的搜索结果中,仅显示10个项目,并且分页链接指向每页相同的10个产品 我已经通读了文档,甚至在这里使用了Caroline Schnapp骨架主题的模板:,无论我做什么尝试,都会得到相同的结果 总之,我想在我的搜索结果页面上显示50个产品和分页链接 有人能解释一下吗 以下是我的search.liquid模板的内容: {% paginate search.results by 50 %} {% if search.results_coun

我试图显示Shopify允许每页调用的全部50个产品,但在我的搜索结果中,仅显示10个项目,并且分页链接指向每页相同的10个产品

我已经通读了文档,甚至在这里使用了Caroline Schnapp骨架主题的模板:,无论我做什么尝试,都会得到相同的结果

总之,我想在我的搜索结果页面上显示50个产品和分页链接

有人能解释一下吗

以下是我的
search.liquid
模板的内容:

{% paginate search.results by 50 %}

{% if search.results_count == 0 %}

  <div class="search-noresults">
      <h2 class="no-results">Nothing found for <span class="search-terms">{{ search.terms }}</span></h2>
      <p class="search-again">try searching again</p>
  </div>

{% else %}
  <section class="search-grid clearfix">
    <h2 class="results-for">Results for <span class="search-terms">{{ search.terms }}</span></h2>

    {% for product in search.results %}
      <section class="collection-grid ">
                <div class="product-box" href="{{product.url}}">
                    <a href="{{product.url}}" class="ajaxify-link"><img src="{{ product.featured_image | product_img_url: 'large'}}" alt="{{ product.description | strip_html | truncate: 75 }} click for more information" /></a>
                <hr class="collection-hr"><span class="grid-title">{{product.title}}</span><br/><span class="grid-price">{{ product.price | divided_by: 100 | replace: '.',' ' | truncatewords: 1 | remove: '...' }} £</span>
                </div>
      </section>
    {% endfor %}
  </section>

  {% if search.results_count > 50 %}
    <div id="pagination">
        {{ paginate | default_pagination }}
    </div>

{% endif %}

{% endif %}


{% endpaginate %}
{%paginate search.results 50%}
{%if search.results_count==0%}
未找到{{search.terms}的任何内容

尝试再次搜索

{%else%} {{search.terms}的结果 {search.results%中的产品的%s}
{{product.title}
{{product.price |除以u:100 |替换:'.',''''.'截断:1 |删除:'.} {%endfor%} {search.results_count>50%时为%0} {{分页|默认分页} {%endif%} {%endif%} {%endpaginate%}
因此,事实证明,我所需要做的就是激活商店,当商店处于开发模式时,分页工作正常,但分页没有按预期工作。希望这对其他人有所帮助,因为我在文档中没有找到任何这样的内容