custom/plugins/NrbnLvgTheme/src/Resources/views/storefront/page/product-detail/index.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
  2. {% block base_main_inner %}
  3.     {% block base_main_container %}
  4.         {{ parent() }}
  5.     {% endblock %}
  6. {% endblock %}
  7. {% block base_breadcrumb %}
  8.     <div class="container">
  9.         {{ parent() }}
  10.     </div>
  11. {% endblock %}
  12. {% block base_content %}
  13.     {% block page_product_detail %}
  14.         <div class="product-detail"
  15.              itemscope
  16.              itemtype="https://schema.org/Product">
  17.             {% block page_product_detail_inner %}
  18.                 {% block page_product_detail_content %}
  19.                     <div class="container">
  20.                         <div class="product-detail-content">
  21.                             {% set mediaItems = page.product.media.media %}
  22.                             {% set nrProductDetailSurcharge = ((page.product.customFields.lvg_fmt_breite_cm * 2 + page.product.customFields.lvg_fmt_hoehe_cm * 2) / 100) * 20 * 3.6 %}
  23.                             {% set nrProductDetailConfiguratorActiveOptionName = null %}
  24.                             {% set nrHasFrameCls = '' %}
  25.                             {% for group in page.configuratorSettings %}
  26.                                 {% for option in group.options %}
  27.                                     {% if option.id in page.product.optionIds %}
  28.                                         {% set nrProductDetailConfiguratorActiveOptionName = option.name %}
  29.                                     {% endif %}
  30.                                 {% endfor %}
  31.                             {% endfor %}
  32.                             {% if nrProductDetailConfiguratorActiveOptionName == 'Ohne' %}
  33.                             {% elseif nrProductDetailConfiguratorActiveOptionName == 'Natur' %}
  34.                                 {% set nrHasFrameCls = 'nr-product-detail-image-framed is-nature' %}
  35.                             {% elseif nrProductDetailConfiguratorActiveOptionName == 'Schwarz' %}
  36.                                 {% set nrHasFrameCls = 'nr-product-detail-image-framed is-black' %}
  37.                             {% elseif nrProductDetailConfiguratorActiveOptionName == 'Weiß' %}
  38.                                 {% set nrHasFrameCls = 'nr-product-detail-image-framed is-white' %}
  39.                             {% elseif nrProductDetailConfiguratorActiveOptionName == 'Gold' %}
  40.                                 {% set nrHasFrameCls = 'nr-product-detail-image-framed is-gold' %}
  41.                             {% elseif nrProductDetailConfiguratorActiveOptionName == 'Silber' %}
  42.                                 {% set nrHasFrameCls = 'nr-product-detail-image-framed is-silver' %}
  43.                             {% endif %}
  44.                             {% block page_product_detail_main %}
  45.                                 <div class="product-detail-main">
  46.                                     {% block page_product_detail_headline %}
  47.                                         <div class="product-detail-headline">
  48.                                             {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  49.                                         </div>
  50.                                     {% endblock %}
  51.                                     {% block page_product_detail_media %}
  52.                                         {% if page.product.cover.media %}
  53.                                             <div class="product-detail-media">
  54.                                                 {% set attributes = {
  55.                                                     'class': (nrHasFrameCls ? 'nr-product-detail-image ' ~ nrHasFrameCls : 'nr-product-detail-image'),
  56.                                                     'id': 'nrProductDetailImage',
  57.                                                     'alt': (page.product.cover.media.translated.alt ?: ''),
  58.                                                     'title': (page.product.cover.media.translated.title ?: '')
  59.                                                 } %}
  60.                                                 {% set sizes = {
  61.                                                     'md': '1200px'
  62.                                                 } %}
  63.                                                 {% sw_thumbnails 'nr-product-detail-image-thumbnails' with {
  64.                                                     media: page.product.cover.media
  65.                                                 } %}
  66.                                             </div>
  67.                                         {% endif %}
  68.                                     {% endblock %}
  69.                                     {% block page_product_detail_buy %}
  70.                                         <div class="product-detail-buy">
  71.                                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' with {
  72.                                                 nrProductDetailSurcharge: nrProductDetailSurcharge,
  73.                                                 nrProductDetailConfiguratorActiveOptionName: nrProductDetailConfiguratorActiveOptionName
  74.                                             }%}
  75.                                         </div>
  76.                                     {% endblock %}
  77.                                     <div class="nr-product-detail-info">
  78.                                         <div class="nr-info-separator" aria-hidden="true"></div>
  79.                                         <div class="nr-info-box row no-gutters flex-column-reverse flex-md-row align-items-start">
  80.                                             <div class="nr-box-image col-12 col-md-6 col-xl-8">
  81.                                                 <div class="nr-product-detail-room-view">
  82.                                                     {# {% if page.product.translated.customFields.nrbn_lvg_product_room_view %}
  83.                                                         {% set nrbnLvgProductRoomViewMediaId = page.product.translated.customFields.nrbn_lvg_product_room_view %}
  84.                                                         {% set nrbnLvgProductRoomViewMediaCollection = searchMedia([nrbnLvgProductRoomViewMediaId], context.context) %}
  85.                                                         {% set nrbnLvgProductRoomViewMedia = nrbnLvgProductRoomViewMediaCollection.get(nrbnLvgProductRoomViewMediaId) %}
  86.                                                     
  87.                                                         {% sw_thumbnails 'nr-room-view-image-thumbnails' with {
  88.                                                             media: nrbnLvgProductRoomViewMedia,
  89.                                                             attributes: {
  90.                                                                 'class': 'nr-room-view-image img-fluid',
  91.                                                             },
  92.                                                             sizes: {
  93.                                                                 'default': '800px'
  94.                                                             }
  95.                                                         } %}
  96.                                                         <div class="nr-room-view-caption">Beispiel Größenrelation</div>
  97.                                                     {% endif %} #}
  98.                                                     <img class="nr-room-view-image img-fluid" src="https://www.littlevangogh.de/interface/gen_gallery/gallery_image.php?artworkID={{ page.product.productNumber }}" alt="Room View">
  99.                                                 </div>
  100.                                             </div>
  101.                                             <div class="nr-box-content col-12 col-md">
  102.                                                 <h2 class="nr-box-title">Daten zum Bild</h2>
  103.                                                 <div class="nr-product-detail-properties">
  104.                                                     {% if page.product.translated.customFields.lvg_technik %}
  105.                                                         <div class="nr-properties-group">
  106.                                                             <div class="nr-properties-title">
  107.                                                                 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="24" height="24">
  108.                                                                     <path stroke-linecap="round" stroke-linejoin="round" d="M9.53 16.122a3 3 0 00-5.78 1.128 2.25 2.25 0 01-2.4 2.245 4.5 4.5 0 008.4-2.245c0-.399-.078-.78-.22-1.128zm0 0a15.998 15.998 0 003.388-1.62m-5.043-.025a15.994 15.994 0 011.622-3.395m3.42 3.42a15.995 15.995 0 004.764-4.648l3.876-5.814a1.151 1.151 0 00-1.597-1.597L14.146 6.32a15.996 15.996 0 00-4.649 4.763m3.42 3.42a6.776 6.776 0 00-3.42-3.42" />
  109.                                                                 </svg>
  110.                                                                 <div class="nr-properties-name">Technik</div>
  111.                                                             </div>
  112.                                                             <div class="nr-properties-value">{{ page.product.translated.customFields.lvg_technik }}</div>
  113.                                                         </div>
  114.                                                     {% endif %}
  115.                                                     {% if page.product.translated.customFields.lvg_format %}
  116.                                                         <div class="nr-properties-group">
  117.                                                             <div class="nr-properties-title">
  118.                                                                 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="24" height="24">
  119.                                                                     <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" />
  120.                                                                 </svg>
  121.                                                                 <div class="nr-properties-name">Größe</div>
  122.                                                             </div>
  123.                                                             <div class="nr-properties-value">{{ page.product.translated.customFields.lvg_format }}</div>
  124.                                                         </div>
  125.                                                     {% endif %}
  126.                                                 </div>
  127.                                             </div>
  128.                                         </div>
  129.                                         <div class="nr-info-separator" aria-hidden="true"></div>
  130.                                         <div class="nr-info-box row no-gutters flex-column-reverse flex-md-row-reverse align-items-start">
  131.                                             <div class="nr-box-image col-12 col-md-6">
  132.                                                 <div class="nr-box-image-ratio-1-1">
  133.                                                     {% set attributes = {
  134.                                                         'class': 'nr-product-detail-manufacturer-image',
  135.                                                         'alt': (page.product.manufacturer.media.translated.alt ?: ''),
  136.                                                         'title': (page.product.manufacturer.media.translated.title ?: ''),
  137.                                                     } %}
  138.                                                     {% set sizes = {
  139.                                                     } %}
  140.                                                     {% sw_thumbnails 'nr-product-detail-manufacturer-image-thumbnails' with {
  141.                                                         media: page.product.manufacturer.media,
  142.                                                     } %}
  143.                                                 </div>
  144.                                             </div>
  145.                                             <div class="nr-box-content col-12 col-md">
  146.                                                 <h2 class="nr-box-title">{{ page.product.manufacturer.name }}</h2>
  147.                                                 <blockquote class="nr-blockquote">
  148.                                                     <svg class="text-primary flex-shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
  149.                                                         <path d="M3.01987 24H0L1.43046 10.9377L3.65563 0H9.37748L7.15232 10.9377L3.01987 24ZM17.6424 24H14.6225L16.053 10.9377L18.3576 0H24L21.6954 10.9377L17.6424 24Z" />
  150.                                                     </svg>
  151.                                                     {{ page.product.manufacturer.customFields.zitat }}
  152.                                                 </blockquote>
  153.                                                 {% if page.product.manufacturer.customFields.refErfolge and page.product.manufacturer.customFields.refErfahrung and page.product.manufacturer.customFields.refAusbildung and page.product.manufacturer.customFields.refAusstellungen %}
  154.                                                     <div class="nr-product-detail-manufacturer-references">
  155.                                                         <div class="nr-references-heading h5">Referenzen</div>
  156.                                                         <ul class="nr-references-list list-unstyled">
  157.                                                             {% set references = [] %}
  158.                                                             {% set references = references|merge(page.product.manufacturer.customFields.refErfolge) %}
  159.                                                             {% set references = references|merge(page.product.manufacturer.customFields.refErfahrung) %}
  160.                                                             {% set references = references|merge(page.product.manufacturer.customFields.refAusbildung) %}
  161.                                                             {% set references = references|merge(page.product.manufacturer.customFields.refAusstellungen) %}
  162.                                                             {% for reference in references %}
  163.                                                                 {% if reference.label %}
  164.                                                                     <li class="nr-references-item">
  165.                                                                         <svg class="nr-references-icon" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="24" height="24">
  166.                                                                             <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
  167.                                                                         </svg>
  168.                                                                         <span class="nr-references-title">{{ reference.label }}</span>
  169.                                                                     </li>
  170.                                                                 {% endif %}
  171.                                                             {% endfor %}
  172.                                                         </ul>
  173.                                                     </div>
  174.                                                 {% endif %}
  175.                                                 <div class="">
  176.                                                     <a class="nr-product-detail-manufacturer-link" href="{{ page.product.manufacture.link }}">Zum Künstler</a>
  177.                                                 </div>
  178.                                             </div>
  179.                                         </div>
  180.                                     </div>
  181.                                 </div>
  182.                             {% endblock %}
  183.                         </div>
  184.                     </div>
  185.                 {% endblock %}
  186.                 {% block page_product_detail_cross_selling %}
  187.                     {% if page.crossSellings.elements is defined and page.crossSellings.elements|filter(item => item.total > 0)|length > 0 %}
  188.                         <div class="product-detail-cross-selling">
  189.                             <div class="container">
  190.                                 {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  191.                                     crossSellings: page.crossSellings
  192.                                 } %}
  193.                             </div>
  194.                         </div>
  195.                     {% endif %}
  196.                     <div class="product-detail-cross-selling">
  197.                         <div class="container">
  198.                             <h2 class="nr-cross-selling-title">Weitere Bilder des Künstlers</h2>
  199.                             {% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
  200.                                 element: {
  201.                                     'data': {
  202.                                         'products': {
  203.                                             elements: page.product.manufacturer.products
  204.                                         }
  205.                                     },
  206.                                     type: 'product-slider'
  207.                                 }
  208.                             } %}
  209.                         </div>
  210.                     </div>
  211.                 {% endblock %}
  212.             {% endblock %}
  213.         </div>
  214.     {% endblock %}
  215. {% endblock %}