{% 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 %}
{% set weight = page.product.weight %}
<p class="product-detail-price{% if isListPrice %} with-list-price{% endif %}{% if isRegulationPrice %} with-regulation-price{% endif %}">
{{ price.unitPrice|currency }}
{% if weight %}
<span class="product-weight font-weight-normal">({{ weight * 1000 }} g)</span>
{% endif %}
</p>
{% if isListPrice %}
{% block page_product_detail_was_price %}
{{ parent() }}
{% endblock %}
{% endif %}
{% if isRegulationPrice %}
<span class="product-detail-list-price-wrapper">
<span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
</span>
{% endif %}
{% endblock %}