calc discount

pull/4/head
alexanderroese 2024-06-03 22:47:08 +02:00
parent cfd87755fb
commit 39d205f372
2 changed files with 5 additions and 6 deletions

View File

@ -120,16 +120,14 @@
<span id="NoMediaStandardBadge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}"> <span id="NoMediaStandardBadge-{{ 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="NoMediaStandardBadge-{{ section_id }}-{{ card_product.id }}" class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}"> <span id="NoMediaStandardBadge-{{ 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 -}}
</span> </span>
{%- endif -%} {%- endif -%}
{% endcomment %} {% 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 -%}
{%- assign compare_at_price_float = card_product.compare_at_price | divided_by: 1.0 -%} {%- 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 price_float = card_product.price | divided_by: 1.0 -%}
@ -140,6 +138,7 @@
{{ discount_percent_rounded }}% Rabatt {{ discount_percent_rounded }}% Rabatt
</span> </span>
{%- endif -%} {%- endif -%}
{% endcomment %}
</div> </div>
</div> </div>
</div> </div>

View File

@ -122,7 +122,7 @@
</span> </span>
<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}"> <span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }} test {{ 'products.product.sold_out' | t }}
</span> </span>
{%- endif -%} {%- endif -%}
</div> </div>