在Dawn(版本5.0.0)主题Shopify的收集页面中,有和内置的功能可查看产品总数。 我想证明当更多产品进入分页时正在显示多少当前产品。
In collection page of dawn(version 5.0.0) theme Shopify, there is and inbuilt functionality to see the total number of products. I want show that how many current product are showing when more products are getting into pagination.
黎明主题的两个文件中有2个修改。
faceets.liquid
ProductCountDesktop
{% if next_link %} {{ offset | plus: 1 }} - {{ offset | plus: page_size }} of {% else %} {% capture itemsOnCurrentPage %} {{ results.all_products_count | minus: offset }} {% endcapture %} {% if results.all_products_count > 0 %} {{ offset | plus: 1 }} {% else %} {{ offset }} {% endif %} - {{ offset | plus: itemsOnCurrentPage }} of {% endif %}
渲染:facets
MAIN-CORCTORTY-PRODUCT-GRID.liquid
{%- paginate collection.products by section.settings.products_per_page -%} {% render 'facets', results: collection, enable_filtering: section.settings.enable_filtering, filter_type: section.settings.filter_type, enable_sorting: section.settings.enable_sorting, collapse_on_larger_devices: section.settings.collapse_on_larger_devices, offset : paginate.current_offset,next_link:paginate.next.is_link,page_size:paginate.page_size %} {%- endpaginate -%}
There is 2 modification in 2 files of dawn theme.
facets.liquid
render: facets
main-collection-product-grid.liquid
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
黎明主题的两个文件中有2个修改。
faceets.liquid
文件中,文件在跨度IDProductCountDesktop
下添加以下代码。渲染:facets
用以下代码中的MAIN-CORCTORTY-PRODUCT-GRID.liquid
文件中的代码。There is 2 modification in 2 files of dawn theme.
facets.liquid
file add below code under the span idProductCountDesktop
.render: facets
with below code inmain-collection-product-grid.liquid
file.