{% sw_extends '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
{% block component_product_box_price %}
{% set purchaseUnit = product.purchaseUnit %}
{% set listingPrice = product.calculatedListingPrice %}
{% set listPrice = product.calculatedPrice.listPrice %}
{% set discount = listPrice.percentage %}
{% if discount > 0 and zeobvVisibleDiscountConfig.showDiscountsOnListingPages or shopware.config.ZeobvVisibleDiscounts.config.showDiscountsOnListingPages %}
<p class="product-price{% if listPrice.percentage > 0 %} with-list-price{% endif %}">
{% if product.priceRange %}
{{ listingPrice.from.unitPrice|currency }}
-
{{ listingPrice.to.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if listPrice.percentage > 0 %}
<span class="list-price" style="text-decoration: line-through;">
{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
</span>
{% if zeobvVisibleDiscountConfig.showExactDiscountPercentageOnListingPages %}
<span class="list-price-percentage">{{"detail.listPricePercentage"|trans({'%price%': listPrice.percentage})|sw_sanitize }}</span>
{% endif %}
{% endif %}
{% else %}
{{ product.calculatedPrice.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
{% if listPrice.percentage > 0 %}
<span class="list-price" style="text-decoration: line-through;">
{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
</span>
{% if zeobvVisibleDiscountConfig.showExactDiscountPercentageOnListingPages %}
<span class="list-price-percentage">{{"detail.listPricePercentage"|trans({'%price%': listPrice.percentage})|sw_sanitize }}</span>
{% endif %}
{% endif %}
{% endif %}
</p>
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}