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 table-sm table-bordered product-block-prices-table">
  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">
  36.                                                         <meta itemprop="priceCurrency" content="{{ page.header.activeCurrency.id }}" />
  37.                                                         <meta itemprop="price" content="{{ price.unitPrice }}" />
  38.                                                         <link itemprop="availability" href="https://schema.org/InStock" />
  39.                                                         {% if loop.last %}
  40.                                                             {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
  41.                                                             <span class="product-block-prices-quantity">{{ price.quantity }}</span>
  42.                                                         {% else %}
  43.                                                             {{ "detail.priceDataInfoUntil"|trans|sw_sanitize }}
  44.                                                             <span class="product-block-prices-quantity">{{ price.quantity }}</span>
  45.                                                         {% endif %}
  46.                                                     </th>
  47.                                                 {% endblock %}
  48.                                                 {% block page_product_detail_price_block_table_body_cell_price %}
  49.                                                     <td class="product-block-prices-cell">
  50.                                                         {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  51.                                                     </td>
  52.                                                 {% endblock %}
  53.                                                 {% block page_product_detail_price_block_table_body_cell_reference_price %}
  54.                                                     {% if price.referencePrice is not null %}
  55.                                                         <td class="product-block-prices-cell">
  56.                                                             {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  57.                                                         </td>
  58.                                                     {% endif %}
  59.                                                 {% endblock %}
  60.                                             </tr>
  61.                                         {% endblock %}
  62.                                     {% endfor %}
  63.                                 {% endblock %}
  64.                             </tbody>
  65.                         {% endblock %}
  66.                     </table>
  67.                 {% endblock %}
  68.             </div>
  69.         {% endblock %}
  70.     {% else %}
  71.         {% set price = page.product.calculatedPrice %}
  72.         {% if page.product.calculatedPrices|length == 1 %}
  73.             {% set price = page.product.calculatedPrices.first %}
  74.         {% endif %}
  75.         <meta itemprop="price"
  76.               content="{{ price.unitPrice }}">
  77.         {% block page_product_detail_price_content %}
  78.             {% set listPrice = page.product.priceRange ? null : price.listPrice %}
  79.             <p class="product-detail-price{% if listPrice.percentage > 0 %} with-list-price{% endif %}">
  80.                 {{ price.unitPrice|currency }}{{ "general.star"|trans|sw_sanitize }}
  81.             </p>
  82.             {% if listPrice.percentage > 0 %}
  83.                 {% block page_product_detail_was_price %}
  84.                     {% block page_product_detail_was_price_badge %}
  85.                         <span class="list-price-badge">&#37;</span>
  86.                     {% endblock %}
  87.                     {% block page_product_detail_was_price_wrapper %}
  88.                         <span class="product-detail-list-price-wrapper">
  89.                             <span class="list-price-price">{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  90.                             <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}</span>
  91.                         </span>
  92.                     {% endblock %}
  93.                 {% endblock %}
  94.             {% endif %}
  95.         {% endblock %}
  96.         {% if page.product.purchaseUnit %}
  97.             {% block page_product_detail_price_unit %}
  98.                 <div class="product-detail-price-unit">
  99.                     {% block page_product_detail_price_unit_label %}
  100.                         <span class="price-unit-label">
  101.                             {{ "detail.priceUnitName"|trans|sw_sanitize }}
  102.                         </span>
  103.                     {% endblock %}
  104.                     {% block page_product_detail_price_unit_content %}
  105.                         <span class="price-unit-content">
  106.                             {{ page.product.purchaseUnit }} {{ page.product.unit.name }}
  107.                         </span>
  108.                     {% endblock %}
  109.                     {% if price.referencePrice is not null %}
  110.                         {% block page_product_detail_price_unit_refrence_content %}
  111.                             <span class="price-unit-reference-content">
  112.                                 ({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
  113.                             </span>
  114.                         {% endblock %}
  115.                     {% endif %}
  116.                 </div>
  117.             {% endblock %}
  118.         {% endif %}
  119.     {% endif %}
  120. {% endblock %}