列表产品角标Sale 改成折扣的

在product-grid-item.liquid搜索grid-product__tag--sale,

先删除 {{ 'products.general.sale' | t }} 然后添加下面的代码添加到如图所示的位置

{% if product.price < product.compare_at_price %}
    {% assign discount_rate = product.price | append: ".0" | times: 1 | divided_by:product.compare_at_price | times:100 | round %}
    <div class="chicv-sale-badge">{{ 100 | minus:discount_rate | append: "% OFF" }}</div>
{% endif %}

avatar ```


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

results matching ""

    No results matching ""