custom/static-plugins/NdTheme/src/Resources/views/storefront/component/buy-widget/buy-widget-price.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig' %}
  2. {% block buy_widget_price_inner %}
  3.     {% if product.calculatedPrices|length > 1 %}
  4.         {% block buy_widget_price_block %}
  5.             {{ parent() }}
  6.         {% endblock %}
  7.     {% else %}
  8.         {% set price = product.calculatedPrice %}
  9.         {% if product.calculatedPrices|length == 1 %}
  10.             {% set price = product.calculatedPrices.first %}
  11.         {% endif %}
  12.         <meta itemprop="price"
  13.               content="{{ price.unitPrice }}">
  14.         {% block buy_widget_price_content %}
  15.             {% set listPrice = price.listPrice %}
  16.             {% if listPrice.percentage > 0 %}
  17.                 {% block buy_widget_was_price %}
  18.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  19.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  20.                     {% block buy_widget_was_price_wrapper %}
  21.                         <span class="product-detail-list-price-wrapper mr-2">
  22.                             <span class="list-price-price line-through">{{ listPrice.price }}</span>
  23.                         </span>
  24.                     {% endblock %}
  25.                 {% endblock %}
  26.             {% endif %}
  27.             {% block buy_widget_product_price %}
  28.                 <p class="product-detail-price{% if listPrice.percentage > 0 %} with-list-price text-red-500 font-medium text-base{% endif %} inline-block">
  29.                     {{ price.unitPrice }}
  30.                 </p>
  31.             {% endblock %}
  32.         {% endblock %}
  33.     {% endif %}
  34. {% endblock %}