diff --git a/snippets/card-product.liquid b/snippets/card-product.liquid index bef06f5..7befebd 100644 --- a/snippets/card-product.liquid +++ b/snippets/card-product.liquid @@ -308,23 +308,9 @@ {{- 'products.product.sold_out' | t -}} - - {% comment %} {%- elsif card_product.compare_at_price > card_product.price and card_product.available -%} - {{- 'products.product.on_sale' | t -}} - - {%- endif -%} - {% endcomment %} - - {%- elsif card_product.compare_at_price > card_product.price and card_product.available -%} - {%- assign compare_at_price_float = card_product.compare_at_price | divided_by: 1.0 -%} - {%- assign price_float = card_product.price | divided_by: 1.0 -%} - {%- assign discount = compare_at_price_float | minus: price_float -%} - {%- assign discount_percent = discount | divided_by: compare_at_price_float | times: 100.0 -%} - {%- assign discount_percent_rounded = discount_percent | round: 0 -%} - - {{ discount_percent_rounded }}% Rabatt + {{- 'products.product.on_sale' | t -}} test {%- endif -%}