折扣角标显示具体数字

1、打开主题代码编辑->打开product-item.liquid文件->搜索if product.available->有两处地方需要修改,如图所示
{% comment %}此段为需要添加的代码{% endcomment %}
{% assign discount_rate = product.price | append: ".0" | times: 1 | divided_by:product.compare_at_price | times:100 | round %}

{% comment %}此段为需要替换的代码{% endcomment %}{{ 100 | minus:discount_rate }}% OFF
修改之后为的代码如下图所示

avatar

2、验证列表页是否修改成功

avatar

不建议修改此主题默认折扣角标样式

文档维护:黎俊阳、王小榆、王星星、林颖

results matching ""

    No results matching ""