{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
{% block page_product_detail_price_content %}
{% set listPrice = price.listPrice %}
{% set isListPrice = listPrice.percentage > 0 %}
{% set isRegulationPrice = price.regulationPrice != null %}
{# Only show price details if we are NOT in a surprise product set (ie a surprise box) #}
{% if not (page.hasExtension('swkwebProductSetConfigurator') and page.product.customFields.doncarne_product_surprise_box) %}
<p class="product-detail-price{% if isListPrice %} with-list-price{% endif %}{% if isRegulationPrice %} with-regulation-price{% endif %}">
<span>{{ price.unitPrice|currency }}</span>
{% if isListPrice %}
{% block page_product_detail_was_price %}
{% block page_product_detail_was_price_badge %}
{% endblock %}
{% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
{% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
<span{% if not (afterListPriceSnippetExists or beforeListPriceSnippetExists) %} class="list-price-price"{% endif %}>{{ listPrice.price|currency }}</span>
{% endblock %}
{% endif %}
</p>
{% if isRegulationPrice %}
<span class="product-detail-list-price-wrapper">
<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}</span>
</span>
{% endif %}
{% endif %}
{% endblock %}
{# moved to buy-widget.html.twig #}
{% block page_product_detail_price_unit %}
{% endblock %}