{% sw_extends '@Storefront/storefront/component/product/card/price-unit.html.twig' %}
{% block component_product_box_price_unit %}
{% endblock %}
{% block component_product_box_price %}
{% set listPrice = product.priceRange or product.calculatedPrices.count > 0 ? null : product.calculatedPrice.listPrice %}
<p class="product-price{% if listPrice.percentage > 0 %} with-list-price{% endif %}">
{% if
product.customFields.cnf_apto_connector_enable_apto
%}
<span class="product-price__prefix">{{ "listing.pricePrefix"|trans|sw_sanitize }}</span>
{% endif %}
{% if product.priceRange %}
{{ fromPrice.unitPrice|currency }}
-
{{ listingPrice.to.unitPrice|currency }}
{% elseif product.calculatedPrices|length == 1 %}
{{ product.calculatedPrices.first.unitPrice|currency }}
{% else %}
{{ product.calculatedPrice.unitPrice|currency }}
{% if listPrice.percentage > 0 %}
<span class="list-price">
{{ listPrice.price|currency }}
</span>
{% endif %}
{% endif %}
</p>
{% endblock %}