custom/plugins/theme/src/Resources/views/storefront/page/product-detail/buy-widget-price.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig' %}
  2. {% block page_product_detail_price_content %}
  3.     {% set listPrice = price.listPrice %}
  4.     {% set isListPrice = listPrice.percentage > 0 %}
  5.     {% set isRegulationPrice = price.regulationPrice != null %}
  6.     {# Only show price details if we are NOT in a surprise product set (ie a surprise box) #}
  7.     {% if not (page.hasExtension('swkwebProductSetConfigurator') and page.product.customFields.doncarne_product_surprise_box) %}
  8.         <p class="product-detail-price{% if isListPrice %} with-list-price{% endif %}{% if isRegulationPrice %} with-regulation-price{% endif %}">
  9.             <span>{{ price.unitPrice|currency }}</span>
  10.             {% if isListPrice %}
  11.             {% block page_product_detail_was_price %}
  12.                 {% block page_product_detail_was_price_badge %}
  13.                 {% endblock %}
  14.                 {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  15.                 {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  16.                 <span{% if not (afterListPriceSnippetExists or beforeListPriceSnippetExists) %} class="list-price-price"{% endif %}>{{ listPrice.price|currency }}</span>
  17.             {% endblock %}
  18.             {% endif %}
  19.         </p>
  20.         {% if isRegulationPrice %}
  21.             <span class="product-detail-list-price-wrapper">
  22.                 <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}</span>
  23.             </span>
  24.         {% endif %}
  25.     {% endif %}
  26. {% endblock %}
  27. {# moved to buy-widget.html.twig #}
  28. {% block page_product_detail_price_unit %}
  29. {% endblock %}