custom/plugins/Tuerschild_2/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_inner %}
  3.         {% set price = page.product.calculatedPrice %}
  4.         {% if page.product.calculatedPrices|length == 1 %}
  5.             {% set price = page.product.calculatedPrices.first %}
  6.         {% endif %}
  7.         <meta itemprop="price"
  8.               content="{{ price.unitPrice }}">
  9.         {% block page_product_detail_price_content %}
  10.             {% set listPrice = price.listPrice %}
  11.             <p class="product-detail-price{% if listPrice.percentage > 0 %} with-list-price{% endif %}">
  12.                 {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  13.             </p>
  14.             {% if listPrice.percentage > 0 %}
  15.                 {% block page_product_detail_was_price %}
  16.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  17.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  18.                     {% block page_product_detail_was_price_wrapper %}
  19.                         <span class="product-detail-list-price-wrapper">
  20.                             {% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
  21.                             <span{% if not (afterListPriceSnippetExists or beforeListPriceSnippetExists) %} class="list-price-price"{% endif %}>
  22.                                 {{ "detail.discountInfo"|trans|sw_sanitize }}
  23.                                 {{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  24.                             {% if afterListPriceSnippetExists %}
  25.                                 {{"listing.afterListPrice"|trans|trim}}
  26.                             {% endif %}
  27.                         </span>
  28.                     {% endblock %}
  29.                     {% block page_product_detail_was_price_badge %}
  30.                     {% endblock %}
  31.                 {% endblock %}
  32.             {% endif %}
  33.         {% endblock %}
  34.         {% if page.product.purchaseUnit %}
  35.             {% block page_product_detail_price_unit %}
  36.                 <div class="product-detail-price-unit">
  37.                     {% block page_product_detail_price_unit_label %}
  38.                         <span class="price-unit-label">
  39.                             {{ "detail.priceUnitName"|trans|sw_sanitize }}
  40.                         </span>
  41.                     {% endblock %}
  42.                     {% block page_product_detail_price_unit_content %}
  43.                         <span class="price-unit-content">
  44.                             {{ page.product.purchaseUnit }} {{ page.product.unit.name }}
  45.                         </span>
  46.                     {% endblock %}
  47.                     {% if price.referencePrice is not null %}
  48.                         {% block page_product_detail_price_unit_reference_content %}
  49.                             <span class="price-unit-reference-content">
  50.                                 ({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
  51.                             </span>
  52.                         {% endblock %}
  53.                     {% endif %}
  54.                 </div>
  55.             {% endblock %}
  56.     {% endif %}
  57. {% endblock %}