为什么这会返回0?
{% if discounts %}
Discount
{{ discounts_amount | divided_by: subtotal_price | times: 100 }}%
{% endif %}
我也试过容纳整数数学,但没有运气。
答案 0 :(得分:0)
语法错误。试试这个
{% if discounts %}
Discount {{ discounts.amount | divided_by: subtotal_price | times: 100 }}%
{% endif %}