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

Open in your IDE?
  1. {% block buy_widget_price_inner %}
  2.     {% if product.calculatedPrices|length > 1 %}
  3.         {% block buy_widget_price_block %}
  4.             <div class="product-block-prices">
  5.                 {% block buy_widget_price_block_table %}
  6.                     <table class="table product-block-prices-grid">
  7.                         {% block buy_widget_price_block_table_head %}
  8.                             <thead class="product-block-prices-head">
  9.                             {% block buy_widget_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 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 buy_widget_price_block_table_body %}
  27.                             <tbody class="product-block-prices-body">
  28.                             {% block buy_widget_price_block_table_body_inner %}
  29.                                 {% for price in product.calculatedPrices %}
  30.                                     {% block buy_widget_price_block_table_body_row %}
  31.                                         <tr class="product-block-prices-row"
  32.                                             itemprop="offers" itemscope
  33.                                             itemtype="https://schema.org/Offer">
  34.                                             {% block buy_widget_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 buy_widget_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 buy_widget_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 = product.calculatedPrice %}
  73.         {% if product.calculatedPrices|length == 1 %}
  74.             {% set price = product.calculatedPrices.first %}
  75.         {% endif %}
  76.         {% set reducedPrice = price.unitPrice - 50 %}
  77.         <meta itemprop="price"
  78.               content="{{ price.unitPrice }}">
  79.         <meta itemprop="price-discount"
  80.               content="{{ price.unitPrice }}">
  81.         {% block buy_widget_price_content %}
  82.             {% set listPrice = price.listPrice %}
  83.             {% set isListPrice = price.listPrice.percentage > 0 %}
  84.             {% set isRegulationPrice = price.regulationPrice != null %}
  85.         <div class="product-price-wrapper" style="width:100%">
  86.         {% set calcedTax = (price.calculatedTaxes.elements|first) %}
  87.         {% set tax = calcedTax.tax %}
  88.         {% set isListPrice = price.listPrice.percentage > 0 %}
  89.         {% set isRegulationPrice = price.regulationPrice != null %}
  90.             <div style="display:flex; justify-content: space-between; padding-top:10px; font-size:16px; color:grey">
  91.                 <span>
  92.                     (netto)
  93.                 </span>
  94.                 <span>
  95.                     {{ (price.totalPrice-tax)|currency(decimals=2) }}
  96.                 </span>
  97.             </div>
  98.             <div style="display:flex; justify-content: space-between; font-size:30px; margin-bottom:10px; padding-top:20px;">
  99.                 <span>
  100.                     Preis
  101.                 </span>
  102.                 <span>
  103.                     {{ (price.totalPrice)|currency(decimals=2) }}
  104.                 </span>
  105.             </div>
  106.             <div style="display:flex; justify-content: space-between; padding-top:10px; margin-bottom:30px; font-size:16px; font-weight: 700">
  107.                 <a href="https://eu1.hubs.ly/H076J6B0" style="color: #F74551; text-decoration: none">
  108.                     mit EMOVA Gutschein
  109.                 </a>
  110.                 <a href="https://eu1.hubs.ly/H076J6B0" style="color: #F74551; text-decoration: none">
  111.                     {{ (price.totalPrice-50)|currency(decimals=2) }}
  112.                 </a>
  113.             </div>
  114.             {# {% if product.deliveryTime.name %}
  115.                 <div style="display:flex; justify-content: space-between; font-size:18px; margin-bottom:40px">
  116.                     <span>
  117.                         Lieferzeit
  118.                     </span>
  119.                     <span>
  120.                         {{  product.deliveryTime.name }}
  121.                     </span>
  122.                 </div>
  123.             {% endif %} #}
  124.         </div>
  125.             {% if isListPrice %}
  126.                 {% block buy_widget_was_price %}
  127.                     {% block buy_widget_was_price_badge %}
  128.                         <span class="list-price-badge">&#37;</span>
  129.                     {% endblock %}
  130.                     {% set afterListPriceSnippetExists = "listing.afterListPrice"|trans|length > 0 %}
  131.                     {% set beforeListPriceSnippetExists = "listing.beforeListPrice"|trans|length > 0 %}
  132.                     {% block buy_widget_was_price_wrapper %}
  133.                         <span class="product-detail-list-price-wrapper">
  134.                             {% if beforeListPriceSnippetExists %}{{"listing.beforeListPrice"|trans|trim}}{% endif %}
  135.                             <span{% if not (afterListPriceSnippetExists or beforeListPriceSnippetExists) %} class="list-price-price"{% endif %}>{{ listPrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}</span>
  136.                             {% if afterListPriceSnippetExists %}
  137.                                 {{"listing.afterListPrice"|trans|trim}}
  138.                             {% endif %}
  139.                             <span class="list-price-percentage">{{ "detail.listPricePercentage"|trans({'%price%': listPrice.percentage })|sw_sanitize }}</span>
  140.                         </span>
  141.                     {% endblock %}
  142.                 {% endblock %}
  143.             {% endif %}
  144.             {% if isRegulationPrice %}
  145.                 <span class="product-detail-list-price-wrapper">
  146.                     <span class="regulation-price">{{ "general.listPricePreviously"|trans({'%price%': price.regulationPrice.price|currency }) }}{{ "general.star"|trans|sw_sanitize }}</span>
  147.                 </span>
  148.             {% endif %}
  149.         {% endblock %}
  150.         {% if product.purchaseUnit %}
  151.             {% block buy_widget_price_unit %}
  152.                 <div class="product-detail-price-unit">
  153.                     {% block buy_widget_price_unit_label %}
  154.                         <span class="price-unit-label">
  155.                             {{ "detail.priceUnitName"|trans|sw_sanitize }}
  156.                         </span>
  157.                     {% endblock %}
  158.                     {% block buy_widget_price_unit_content %}
  159.                         <span class="price-unit-content">
  160.                             {{ product.purchaseUnit }} {{ product.unit.translated.name }}
  161.                         </span>
  162.                     {% endblock %}
  163.                     {% if price.referencePrice is not null %}
  164.                         {% block buy_widget_price_unit_reference_content %}
  165.                             <span class="price-unit-reference-content">
  166.                                 ({{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }})
  167.                             </span>
  168.                         {% endblock %}
  169.                     {% endif %}
  170.                 </div>
  171.             {% endblock %}
  172.         {% endif %}
  173.     {% endif %}
  174. {% endblock %}