vendor/shopware/storefront/Resources/views/storefront/page/product-detail/buy-widget-price.html.twig line 1

Open in your IDE?
  1. {% block page_product_detail_price_inner %}
  2.     {% if page.product.calculatedPrices|length > 1 %}
  3.         {% block page_product_detail_price_block %}
  4.             <div class="product-block-prices">
  5.                 {% block page_product_detail_price_block_table %}
  6.                     <table class="table product-block-prices-grid">
  7.                         {% block page_product_detail_price_block_table_head %}
  8.                             <thead class="product-block-prices-head">
  9.                                 {% block page_product_detail_price_block_table_head_inner %}
  10.                                     <tr class="product-block-prices-row">
  11.                                         <th scope="col" class="product-block-prices-cell">
  12.                                             {{ "detail.dataColumnQuantity"|trans|sw_sanitize }}
  13.                                         </th>
  14.                                         <th scope="col" class="product-block-prices-cell">
  15.                                             {{ "detail.dataColumnPrice"|trans|sw_sanitize }}
  16.                                         </th>
  17.                                         {% if page.product.calculatedPrice.referencePrice %}
  18.                                             <th scope="col" class="product-block-prices-cell">
  19.                                                 {{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
  20.                                             </th>
  21.                                         {% endif %}
  22.                                     </tr>
  23.                                 {% endblock %}
  24.                             </thead>
  25.                         {% endblock %}
  26.                         {% block page_product_detail_price_block_table_body %}
  27.                             <tbody class="product-block-prices-body">
  28.                                 {% block page_product_detail_price_block_table_body_inner %}
  29.                                     {% for price in page.product.calculatedPrices %}
  30.                                         {% block page_product_detail_price_block_table_body_row %}
  31.                                             <tr class="product-block-prices-row"
  32.                                                 itemprop="offers" itemscope
  33.                                                 itemtype="https://schema.org/Offer">
  34.                                                 {% block page_product_detail_price_block_table_body_cell_quantity %}
  35.                                                     <th scope="row" class="product-block-prices-cell product-block-prices-cell-thin">
  36.                                                         <meta itemprop="priceCurrency" content="{{ page.header.activeCurrency.translated.shortName }}" />
  37.                                                         <meta itemprop="price" content="{{ price.unitPrice }}" />
  38.                                                         {% if loop.last %}
  39.                                                             {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
  40.                                                             <span class="product-block-prices-quantity">{{ price.quantity }}</span>
  41.                                                         {% else %}
  42.                                                             {{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
  43.                                                             <span class="product-block-prices-quantity">{{ price.quantity }}</span>
  44.                                                         {% endif %}
  45.                                                     </th>
  46.                                                 {% endblock %}
  47.                                                 {% block page_product_detail_price_block_table_body_cell_price %}
  48.                                                     <td class="product-block-prices-cell">
  49.                                                         {% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
  50.                                                             price: price
  51.                                                         } only %}
  52.                                                     </td>
  53.                                                 {% endblock %}
  54.                                                 {% block page_product_detail_price_block_table_body_cell_reference_price %}
  55.                                                     {% if price.referencePrice is not null %}
  56.                                                         <td class="product-block-prices-cell product-block-prices-cell-thin">
  57.                                                             {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  58.                                                         </td>
  59.                                                     {% endif %}
  60.                                                 {% endblock %}
  61.                                             </tr>
  62.                                         {% endblock %}
  63.                                     {% endfor %}
  64.                                 {% endblock %}
  65.                             </tbody>
  66.                         {% endblock %}
  67.                     </table>
  68.                 {% endblock %}
  69.             </div>
  70.         {% endblock %}
  71.     {% else %}
  72.         {% set price = page.product.calculatedPrice %}
  73.         {% if page.product.calculatedPrices|length == 1 %}
  74.             {% set price = page.product.calculatedPrices.first %}
  75.         {% endif %}
  76.         <meta itemprop="price"
  77.               content="{{ price.unitPrice }}">
  78.         {% block page_product_detail_price_content %}
  79.             {% set listPrice = price.listPrice %}
  80.             {% set isListPrice = listPrice.percentage > 0 %}
  81.             {% set isRegulationPrice = price.regulationPrice != null %}
  82.             <p class="product-detail-price{% if isListPrice %} with-list-price{% endif %}{% if isRegulationPrice %} with-regulation-price{% endif %}">
  83.                 {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  84.             </p>
  85.             {% if isListPrice %}
  86.                 {% block page_product_detail_was_price %}
  87.                     {% block page_product_detail_was_price_badge %}
  88.                         <span class="list-price-badge">&#37;</span>
  89.                     {% endblock %}
  90.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  91.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  92.                     {% block page_product_detail_was_price_wrapper %}
  93.                         <span class="product-detail-list-price-wrapper">
  94.                             {% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
  95.                             <span{% if not (afterListPriceSnippetExists or beforeListPriceSnippetExists) %} class="list-price-price"{% endif %}>{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  96.                             {% if afterListPriceSnippetExists %}
  97.                                 {{"listing.afterListPrice"|trans|trim}}
  98.                             {% endif %}
  99.                             <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}</span>
  100.                         </span>
  101.                     {% endblock %}
  102.                 {% endblock %}
  103.             {% endif %}
  104.             {% if isRegulationPrice %}
  105.                 <span class="product-detail-list-price-wrapper">
  106.                     <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  107.                 </span>
  108.             {% endif %}
  109.         {% endblock %}
  110.         {% if page.product.purchaseUnit %}
  111.             {% block page_product_detail_price_unit %}
  112.                 <div class="product-detail-price-unit">
  113.                     {% block page_product_detail_price_unit_label %}
  114.                         <span class="price-unit-label">
  115.                             {{ "detail.priceUnitName"|trans|sw_sanitize }}
  116.                         </span>
  117.                     {% endblock %}
  118.                     {% block page_product_detail_price_unit_content %}
  119.                         <span class="price-unit-content">
  120.                             {{ page.product.purchaseUnit }} {{ page.product.unit.translated.name }}
  121.                         </span>
  122.                     {% endblock %}
  123.                     {% if price.referencePrice is not null %}
  124.                         {% block page_product_detail_price_unit_reference_content %}
  125.                             <span class="price-unit-reference-content">
  126.                                 ({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
  127.                             </span>
  128.                         {% endblock %}
  129.                     {% endif %}
  130.                 </div>
  131.             {% endblock %}
  132.         {% endif %}
  133.     {% endif %}
  134. {% endblock %}