test
parent
356d6fb31d
commit
0c7853d394
|
@ -308,23 +308,9 @@
|
||||||
<span id="Badge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}">
|
<span id="Badge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}">
|
||||||
{{- 'products.product.sold_out' | t -}}
|
{{- 'products.product.sold_out' | t -}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{% comment %}
|
|
||||||
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
|
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
|
||||||
<span id="Badge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">
|
<span id="Badge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">
|
||||||
{{- 'products.product.on_sale' | t -}}
|
{{- 'products.product.on_sale' | t -}} test
|
||||||
</span>
|
|
||||||
{%- 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 -%}
|
|
||||||
<span id="Badge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">
|
|
||||||
{{ discount_percent_rounded }}% Rabatt
|
|
||||||
</span>
|
</span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue