custom/plugins/SchilderSysteme/src/Resources/views/storefront/block/cms-block-gallery-buybox.html.twig line 1

Open in your IDE?
  1. {% set reviewTabId = "#review-tab-" ~ page.product.id %}
  2. {% block block_gallery_buybox %}
  3.     {% block block_gallery_buybox_column_left %}
  4.         {% set element = block.slots.getSlot('left') %}
  5.         {% set config = element.fieldConfig.elements %}
  6.         <div class="col-lg-7 product-detail-media">
  7.             {% if page.product.media %}
  8.                 {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  9.                     'mediaItems': mediaItems,
  10.                     'zoom': false,
  11.                     'zoomModal': true,
  12.                     'displayMode': 'contain',
  13.                     'gutter': 5,
  14.                     'minHeight': '430px',
  15.                     'galleryPosition': 'left',
  16.                     'isProduct': true,
  17.                     'fallbackImageTitle': page.product.translated.name,
  18.                     'startIndexThumbnails': page.product.cover.position,
  19.                     'startIndexSlider': page.product.cover.position
  20.                 } %}
  21.             {% endif %}
  22.         </div>
  23.     {% endblock %}
  24.     {% block block_gallery_buybox_column_right %}
  25.         {% set element = block.slots.getSlot('right') %}
  26.         {{ dump(page.product) }}
  27.         <div class="col-lg-5 position-relative">
  28.             <div class="product-detail-buy-box">
  29.                 <div class="title_wishlist">
  30.                     <div><h1 class="product-detail-name"
  31.                              itemprop="name">
  32.                             {{ page.product.translated.name }}
  33.                             {% if page.product.calculatedCheapestPrice.listPrice.percentage %}
  34.                                 <span class="badge badge-danger">
  35.                     {{ "detail.listPricePercentage"|trans({'%price%': page.product.calculatedCheapestPrice.listPrice.percentage|round })|sw_sanitize }}
  36.                 </span>
  37.                             {% endif %}
  38.                         </h1>
  39.                     </div>
  40.                     {% block component_product_wishlist %}
  41.                         {% set addToWishlistOptions = {
  42.                             productId: page.product.id,
  43.                             router: {
  44.                                 add: {
  45.                                     afterLoginPath: path('frontend.wishlist.add.after.login', { productId: page.product.id }),
  46.                                     path: path('frontend.wishlist.product.add', { productId: page.product.id }),
  47.                                     token: sw_csrf('frontend.wishlist.product.add', {"mode": "token"})
  48.                                 },
  49.                                 remove: {
  50.                                     path: path('frontend.wishlist.product.remove', { productId: page.product.id }),
  51.                                     token: sw_csrf('frontend.wishlist.product.remove', {"mode": "token"}),
  52.                                 }
  53.                             }
  54.                         } %}
  55.                         {% set size = size ?? 'md' %}
  56.                         {% block component_product_wishlist_button %}
  57.                             <button
  58.                                     class="product-wishlist-{{ productId }} product-wishlist-action{% if appearance == 'circle' %}-circle{% endif %} product-wishlist-not-added product-wishlist-loading"
  59.                                     title="{{ "listing.toggleWishlist"|trans|sw_sanitize }}"
  60.                                     data-add-to-wishlist="true"
  61.                                     data-add-to-wishlist-options="{{ addToWishlistOptions|json_encode }}"
  62.                             >
  63.                                 {% block component_product_wishlist_icon %}
  64.                                     {% sw_icon 'heart-fill' style { 'class': 'wishlist icon-wishlist-added', 'size': size } %}
  65.                                     {% sw_icon 'heart' style {'class': 'wishlist icon-wishlist-not-added', 'size': size } %}
  66.                                 {% endblock %}
  67.                             </button>
  68.                         {% endblock %}
  69.                     {% endblock %}
  70.                 </div>
  71.                 <p class="sw-cms-el-buy-box__product-number">{{ page.product.productNumber }}</p>
  72.                 {% if page.product.customFields.custom_product_icons_icon %}
  73.                     <div class="icons-container flex">
  74.                         {% for icon in page.product.customFields.custom_product_icons_icon %}
  75.                             {% if loop.index0 <= 9 %}
  76.                                 {% if icon == 'icon_fire' %}
  77.                                     <div class="tooltipcontainer">
  78.                                         <img class="icon" height="20px" width="auto"
  79.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_fire.svg'), 'asset') }}"
  80.                                              alt="Icon Brandklasse B1">
  81.                                         <span class="tooltiptext">Brandklasse B1</span>
  82.                                     </div>
  83.                                 {% endif %}
  84.                                 {% if icon == 'icon_paper' %}
  85.                                     <div class="tooltipcontainer">
  86.                                         <img class="icon" height="20px" width="auto"
  87.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_paper.svg'), 'asset') }}"
  88.                                              alt="Icon Papiereinleger zur Selbtsbeschriftung">
  89.                                         <span class="tooltiptext">Papiereinleger zur Selbstbeschriftung</span>
  90.                                     </div>
  91.                                 {% endif %}
  92.                                 {% if icon == 'icon_plates' %}
  93.                                     <div class="tooltipcontainer">
  94.                                         <img class="icon" height="20px" width="auto"
  95.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_plates.svg'), 'asset') }}"
  96.                                              alt="Icon Beschriftungsplatten wechselbar">
  97.                                         <span class="tooltiptext">Beschriftungsplatten wechselbar</span>
  98.                                     </div>
  99.                                 {% endif %}
  100.                                 {% if icon == 'icon_glue_and_screw' %}
  101.                                     <div class="tooltipcontainer">
  102.                                         <img class="icon" height="20px" width="auto"
  103.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_glue_and_screw.svg'), 'asset') }}"
  104.                                              alt="Icon Klebe- und Schraubmontage">
  105.                                         <span class="tooltiptext">Klebe- und Schraubmontage</span>
  106.                                     </div>
  107.                                 {% endif %}
  108.                                 {% if icon == 'icon_screw_countersunk' %}
  109.                                     <div class="tooltipcontainer">
  110.                                         <img class="icon" height="20px" width="auto"
  111.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_screw_countersunk.svg'), 'asset') }}"
  112.                                              alt="Icon Schraubmontage mit Senkkopfschrauben">
  113.                                         <span class="tooltiptext">Schraubmontage mit Senkkopfschrauben</span>
  114.                                     </div>
  115.                                 {% endif %}
  116.                                 {% if icon == 'icon_screw_flathead' %}
  117.                                     <div class="tooltipcontainer">
  118.                                         <img class="icon" height="20px" width="auto"
  119.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_screw_flathead.svg'), 'asset') }}"
  120.                                              alt="Icon Schraubmontage mit Flachkopfschrauben">
  121.                                         <span class="tooltiptext">Schraubmontage mit Flachkopfschrauben</span>
  122.                                     </div>
  123.                                 {% endif %}
  124.                                 {% if icon == 'icon_glue' %}
  125.                                     <div class="tooltipcontainer">
  126.                                         <img class="icon" height="20px" width="auto"
  127.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_glue.svg'), 'asset') }}"
  128.                                              alt="Klebemontage">
  129.                                         <span class="tooltiptext">Klebemontage</span>
  130.                                     </div>
  131.                                 {% endif %}
  132.                                 {% if icon == 'icon_feeder_changer' %}
  133.                                     <div class="tooltipcontainer">
  134.                                         <img class="icon" height="20px" width="auto"
  135.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_feeder_changer.svg'), 'asset') }}"
  136.                                              alt="Icon Einlegerwechsel mittels Haftsauger">
  137.                                         <span class="tooltiptext">Einlegerwechsel mittels Haftsauger</span>
  138.                                     </div>
  139.                                 {% endif %}
  140.                                 {% if icon == 'icon_paper_secured' %}
  141.                                     <div class="tooltipcontainer">
  142.                                         <img class="icon" height="20px" width="auto"
  143.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_paper_secured.svg'), 'asset') }}"
  144.                                              alt="Icon Einleger gesichert">
  145.                                         <span class="tooltiptext">Einleger gesichert</span>
  146.                                     </div>
  147.                                 {% endif %}
  148.                                 {% if icon == 'icon_direct_printing' %}
  149.                                     <div class="tooltipcontainer">
  150.                                         <img class="icon" height="20px" width="auto"
  151.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_direct_printing.svg'), 'asset') }}"
  152.                                              alt="Icon Direktdruck">
  153.                                         <span class="tooltiptext">Direktdruck</span>
  154.                                     </div>
  155.                                 {% endif %}
  156.                                 {% if icon == 'icon_tactile_labeling' %}
  157.                                     <div class="tooltipcontainer">
  158.                                         <img class="icon" height="20px" width="auto"
  159.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_tactile_labeling.svg'), 'asset') }}"
  160.                                              alt="Icon Taktile Beschriftung möglich">
  161.                                         <span class="tooltiptext">Taktile Beschriftung möglich</span>
  162.                                     </div>
  163.                                 {% endif %}
  164.                                 {% if icon == 'icon_stock' %}
  165.                                     <div class="tooltipcontainer">
  166.                                         <img class="icon" height="20px" width="auto"
  167.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_stock.svg'), 'asset') }}"
  168.                                              alt="Lagerartikel, rascher Versand">
  169.                                         <span class="tooltiptext">Lagerartikel, rascher Versand</span>
  170.                                     </div>
  171.                                 {% endif %}
  172.                                 {% if icon == 'icon_feeder_changer_tools' %}
  173.                                     <div class="tooltipcontainer">
  174.                                         <img class="icon" height="20px" width="auto"
  175.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_feeder_changer_tools.svg'), 'asset') }}"
  176.                                              alt="Icon Einlegerwechsel mittels Werkzeug">
  177.                                         <span class="tooltiptext">Einlegerwechsel mittels Werkzeug</span>
  178.                                     </div>
  179.                                 {% endif %}
  180.                                 {% if icon == 'icon_escape_sign' %}
  181.                                     <div class="tooltipcontainer">
  182.                                         <img class="icon" height="20px" width="auto"
  183.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_escape_sign.svg'), 'asset') }}"
  184.                                              alt="Icon Noirmgröße Fluchtwegschilder">
  185.                                         <span class="tooltiptext">Normgröße Fluchtwegschilder</span>
  186.                                     </div>
  187.                                 {% endif %}
  188.                                 {% if icon == 'icon_sustainable' %}
  189.                                     <div class="tooltipcontainer">
  190.                                         <img class="icon" height="20px" width="auto"
  191.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_sustainable.svg'), 'asset') }}"
  192.                                              alt="Icon Umweltfreundliches Produkt">
  193.                                         <span class="tooltiptext">Umweltfreundliches Produkt</span>
  194.                                     </div>
  195.                                 {% endif %}
  196.                                 {% if icon == 'icon_outdoor' %}
  197.                                     <div class="tooltipcontainer">
  198.                                         <img class="icon" height="20px" width="auto"
  199.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_outdoor.svg'), 'asset') }}"
  200.                                              alt="Icon Außenanwendung">
  201.                                         <span class="tooltiptext">Außenanwendung</span>
  202.                                     </div>
  203.                                 {% endif %}
  204.                                 {% if icon == 'icon_feeder_changer_without_tools' %}
  205.                                     <div class="tooltipcontainer">
  206.                                         <img class="icon" height="20px" width="auto"
  207.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_feeder_changer_without_tools.svg'), 'asset') }}"
  208.                                              alt="Icon Einlegerwechsel ohne Werkzeug">
  209.                                         <span class="tooltiptext">Einlegerwechsel ohne Werkzeug</span>
  210.                                     </div>
  211.                                 {% endif %}
  212.                                 {% if icon == 'icon_opening_right' %}
  213.                                     <div class="tooltipcontainer">
  214.                                         <img class="icon" height="20px" width="auto"
  215.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_opening_right.svg'), 'asset') }}"
  216.                                              alt="Icon Öffnungsseite">
  217.                                         <span class="tooltiptext">Öffnungsseite</span>
  218.                                     </div>
  219.                                 {% endif %}
  220.                                 {% if icon == 'icon_led' %}
  221.                                     <div class="tooltipcontainer">
  222.                                         <img class="icon" height="20px" width="auto"
  223.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_led.svg'), 'asset') }}"
  224.                                              alt="Icon LED Beleuchtung">
  225.                                         <span class="tooltiptext">LED Beleuchtung</span>
  226.                                     </div>
  227.                                 {% endif %}
  228.                                 {% if icon == 'icon_flange' %}
  229.                                     <div class="tooltipcontainer">
  230.                                         <img class="icon" height="20px" width="auto"
  231.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_flange.svg'), 'asset') }}"
  232.                                              alt="Icon Flanschmontage">
  233.                                         <span class="tooltiptext">Flanschmontage</span>
  234.                                     </div>
  235.                                 {% endif %}
  236.                                 {% if icon == 'icon_quiver' %}
  237.                                     <div class="tooltipcontainer">
  238.                                         <img class="icon" height="20px" width="auto"
  239.                                              src="{{ asset(('bundles/schildersysteme/icons/icon_quiver.svg'), 'asset') }}"
  240.                                              alt="Icon Köchermontage">
  241.                                         <span class="tooltiptext">Köchermontage</span>
  242.                                     </div>
  243.                                 {% endif %}
  244.                             {% endif %}
  245.                         {% endfor %}
  246.                     </div>
  247.                 {% endif %}
  248.                 <div class="product-detail-buy">
  249.                     {% set EXTENSION_NAME = constant('LenzPlatformCustomerDiscount\\Core\\Content\\Product\\SalesChannel\\Price\\CustomerDiscountProductPriceCalculator::MODIFICATION_APPLIED') %}
  250.                     {% if page.product.price.hasExtension(EXTENSION_NAME) %}
  251.                         {% set x = page.product.price.getExtension(EXTENSION_NAME).all %}
  252.                         {% if x.priceBlocked == true and config('LenzPlatformCustomerDiscount.config.showDiscountExcludedNotice') == true %}
  253.                             {% set alertText = "lenzPlatformCustomerDiscount.productDetail.noDiscountAlertMessage"|trans %}
  254.                             {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  255.                                 type:"info",
  256.                                 content: alertText
  257.                             } %}
  258.                         {% elseif x.priceBlocked == false and config('LenzPlatformCustomerDiscount.config.showDiscountNotice') == true %}
  259.                             {% set alertText = "lenzPlatformCustomerDiscount.productDetail.discountAlertMessage"|trans({"%percent%": x.percent}) %}
  260.                             {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  261.                                 type:"success",
  262.                                 content: alertText
  263.                             } %}
  264.                         {% endif %}
  265.                     {% endif %}
  266.                     {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  267.                 </div>
  268.                 {% if page.product.calculatedPrices|length > 1 and page.product.customFields.custom_units_piece_per_pu == 1 and page.product.customFields.price_on_request_six_group!=1 %}
  269.                     {% block page_product_detail_price_block %}
  270.                         <div class="product-block-prices">
  271.                             <span class="mass-discount">Mengenrabatte</span>
  272.                             {% block page_product_detail_price_block_table %}
  273.                                 <table class="table product-block-prices-grid">
  274.                                     {% block page_product_detail_price_block_table_head %}
  275.                                         <thead class="product-block-prices-head">
  276.                                         {% block page_product_detail_price_block_table_head_inner %}
  277.                                             <tr class="product-block-prices-row">
  278.                                                 <th scope="col" class="product-block-prices-cell">
  279.                                                 </th>
  280.                                                 <th scope="col" class="product-block-prices-cell">
  281.                                                     {{ "detail.dataColumnPrice"|trans|sw_sanitize }}
  282.                                                 </th>
  283.                                                 {% if page.product.calculatedPrice.referencePrice %}
  284.                                                     <th scope="col" class="product-block-prices-cell">
  285.                                                         {{ "detail.dataColumnReferencePrice"|trans|sw_sanitize }}
  286.                                                     </th>
  287.                                                 {% endif %}
  288.                                                 <th scope="col" class="product-block-prices-cell">
  289.                                                     Rabatt
  290.                                                 </th>
  291.                                             </tr>
  292.                                         {% endblock %}
  293.                                         </thead>
  294.                                     {% endblock %}
  295.                                     {% block page_product_detail_price_block_table_body %}
  296.                                         <tbody class="product-block-prices-body">
  297.                                         {% block page_product_detail_price_block_table_body_inner %}
  298.                                             {% for price in page.product.calculatedPrices %}
  299.                                                 {% set unitPrice = page.product.calculatedPrice.unitPrice|trim %}
  300.                                                 {% set quantityPrice = price.unitPrice|trim %}
  301.                                                 {% if ((1-(quantityPrice/unitPrice))*100)|round !=0 %}
  302.                                                     {% block page_product_detail_price_block_table_body_row %}
  303.                                                         {% if page.product.calculatedPrices.elements[loop.index0 -1].quantity != 0 %}
  304.                                                         <tr class="product-block-prices-row"
  305.                                                             itemprop="offers" itemscope
  306.                                                             itemtype="https://schema.org/Offer">
  307.                                                             {% block page_product_detail_price_block_table_body_cell_quantity %}
  308.                                                                 <th scope="row"
  309.                                                                     class="product-block-prices-cell product-block-prices-cell-thin">
  310.                                                                     <meta itemprop="priceCurrency"
  311.                                                                           content="{{ page.header.activeCurrency.id }}"/>
  312.                                                                     <meta itemprop="price"
  313.                                                                           content="{{ price.unitPrice }}"/>
  314.                                                                     <link itemprop="availability"
  315.                                                                           href="https://schema.org/InStock"/>
  316.                                                                     {{ "detail.priceDataInfoFrom"|trans|sw_sanitize }}
  317.                                                                     <span class="product-block-prices-quantity">{{ page.product.calculatedPrices.elements[loop.index0 -1].quantity + 1}}</span> {{ "detail.quantity"|trans|sw_sanitize }}
  318.                                                                 </th>
  319.                                                             {% endblock %}
  320.                                                             {% block page_product_detail_price_block_table_body_cell_price %}
  321.                                                                 <td class="product-block-prices-cell">
  322.                                                                     {% sw_include '@Storefront/storefront/component/product/block-price.html.twig' with {
  323.                                                                         price: price
  324.                                                                     } only %}
  325.                                                                 </td>
  326.                                                             {% endblock %}
  327.                                                             {% block page_product_detail_price_block_table_body_cell_reference_price %}
  328.                                                                 {% if price.referencePrice is not null %}
  329.                                                                     <td class="product-block-prices-cell product-block-prices-cell-thin">
  330.                                                                         {{ price.referencePrice.price|currency }}{{ "general.star"|trans|sw_sanitize }}
  331.                                                                         / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}
  332.                                                                     </td>
  333.                                                                 {% endif %}
  334.                                                             {% endblock %}
  335.                                                             <td class="product-block-prices-cell discount_percent_table">
  336.                                                                 {% set unitPrice = page.product.calculatedPrices.elements[0].unitPrice|trim %}
  337.                                                                 {% set quantityPrice = price.unitPrice|trim %}
  338.                                                                 - {{ ((1-(quantityPrice/unitPrice))*100)|round }}
  339.                                                                 %
  340.                                                             </td>
  341.                                                         </tr>
  342.                                                         {% endif %}
  343.                                                     {% endblock %}
  344.                                                 {% endif %}
  345.                                             {% endfor %}
  346.                                         {% endblock %}
  347.                                         </tbody>
  348.                                     {% endblock %}
  349.                                 </table>                            {% endblock %}
  350.                         </div>
  351.                         {% if page.product.calculatedPrices|length > 1 and page.product.customFields.variants|length>0 %}
  352.                             {% set bestprice = false %}
  353.                             {% for variant in page.product.customFields.variants|filter((variant) => variant.availableStock == true) %}
  354.                                 {% if variant.customFields.custom_units_piece_per_pu != 1 %}
  355.                                     {% set bestprice = true %}
  356.                                 {% endif %}
  357.                             {% endfor %}
  358.                             {% if bestprice == true %}
  359.                                 <a class="best-price-cta" href="#best-price">
  360.                                     Verpackungseinheiten zum Bestpreis
  361.                                     <img src="{{ asset(('bundles/schildersysteme/icons/arrow_down.svg'), 'asset') }}"
  362.                                          width="10"
  363.                                          height="10" alt="">
  364.                                 </a>
  365.                             {% endif %}
  366.                         {% endif %}
  367.                     {% endblock %}
  368.                 {% endif %}
  369.             </div>
  370.         </div>
  371.     {% endblock %}
  372. {% endblock %}