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

Open in your IDE?
  1. {% sw_extends "@zenitPlatformStratus/storefront/page/product-detail/index.html.twig" %}
  2. {% block page_product_detail_media %}
  3.     <div class="col-lg-12">
  4.         {% block page_product_detail_headline %}
  5.             <div class="row product-detail-headline">
  6.                 {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  7.             </div>
  8.         {% endblock %}
  9.     </div>
  10.     {{parent()}}
  11. {% endblock %}
  12. {% block page_product_detail_buy %}
  13.     <div class="col-lg-5 col-xl-{{ buyboxWidthConfig }} product-detail-buy" data-sticky-buybox="true">
  14.         {% block zen_page_product_detail_short_description %}
  15.             {% if page.product.translated.metaDescription and theme_config('zen-product-details-short-description') %}
  16.                 <div class="product-detail-short-description">
  17.                     {{ page.product.translated.metaDescription|raw }}
  18.                 </div>
  19.             {% endif %}
  20.             {% sw_include "@Storefront/storefront/page/product-detail/buy-widget.html.twig" %}
  21.         {% endblock %}
  22.         {% if page.product.parentId and page.configuratorSettings|length > 0 %}
  23.             <div class="product-detail-configurator-container">
  24.                 {% sw_include '@Storefront/storefront/page/product-detail/configurator.html.twig' %}
  25.             </div>
  26.         {% endif %}
  27.         {% set tigerSegments = page.product.translated.customFields['tiger-segmenter'] %}
  28.         {% if tigerSegments %}
  29.             <h3>{{ "productDetail.segmentsTitle"|trans|sw_sanitize }}</h3>
  30.             <h4 class="product-detail-custom-segments-subtitle">{{ "productDetail.segmentsSubtitle"|trans|sw_sanitize }}</h4>
  31.             <div class="product-detail-custom-wrapper">
  32.             {% for segment in tigerSegments %}
  33.                 <div class="product-detail-custom-item product-detail-custom-item--segment">
  34.                     <div class="product-detail-custom-item-media">
  35.                         <img width="100%" height="100%" src="{{ theme_config("#{segment}-image") }}">
  36.                     </div>
  37.                     <h5>{{ "segments.#{segment}"|trans }} </h5>
  38.                 </div>
  39.             {% endfor %}
  40.             </div>
  41.         {% endif %}
  42.         {% set productColorSrc = page.product.customFields['tiger-produkt-link-farvekort'] %}
  43.         {% set productPaperSrc = page.product.customFields['tiger-produkt-link-produktblad']%}
  44.         {% set productDataSrc = page.product.customFields['tiger-produkt-link-datablad'] %}
  45.         {% set productBrochureSrc = page.product.customFields['tiger-produkt-link-brochure'] %}
  46.         {% set mediaCollection = searchMedia([
  47.             productColorSrc,
  48.             productPaperSrc,
  49.             productDataSrc,
  50.             productBrochureSrc
  51.         ], context.context) %}
  52.         <div class="product-detail-custom-wrapper product-detail-custom-wrapper--data">
  53.             {% if mediaCollection.get(productDataSrc) %}
  54.                 <a href="{{ mediaCollection.get(productDataSrc).url }}" target="_blank"
  55.                    class="product-detail-custom-item product-detail-custom-item--data">
  56.                     <div class="product-detail-custom-item-media product-detail-custom-item-media--data">
  57.                         <img width="100%" height="100%" src="{{ theme_config('sw-product-data-paper-image') }}" alt="">
  58.                     </div>
  59.                     <h5>{{ "productDetailData.productPaper"|trans }}</h5>
  60.                 </a>
  61.             {% endif %}
  62.             {% if mediaCollection.get(productPaperSrc) %}
  63.                 <a href="{{ mediaCollection.get(productPaperSrc).url }}" target="_blank"
  64.                    class="product-detail-custom-item product-detail-custom-item--data">
  65.                     <div class="product-detail-custom-item-media product-detail-custom-item-media--data">
  66.                         <img width="100%" height="100%" src="{{ theme_config('sw-product-paper-image') }}" alt="">
  67.                     </div>
  68.                     <h5>{{ "productDetailData.productDataPaper"|trans }}</h5>
  69.                 </a>
  70.             {% endif %}
  71.             {% if mediaCollection.get(productColorSrc) %}
  72.                 <a href="{{ mediaCollection.get(productColorSrc).url }}" target="_blank"
  73.                    class="product-detail-custom-item product-detail-custom-item--data">
  74.                     <div class="product-detail-custom-item-media product-detail-custom-item-media--data">
  75.                         <img width="100%" height="100%" src="{{ theme_config('sw-color-card-image') }}" alt="">
  76.                     </div>
  77.                     <h5>{{ "productDetailData.colorCard"|trans }}</h5>
  78.                 </a>
  79.             {% endif %}
  80.             {% if mediaCollection.get(productBrochureSrc) %}
  81.                 <a href="{{ mediaCollection.get(productBrochureSrc).url }}" target="_blank" class="product-detail-custom-item product-detail-custom-item--data">
  82.                     <div class="product-detail-custom-item-media product-detail-custom-item-media--data">
  83.                         <img width="100%" height="100%" src="{{ theme_config('sw-product-data-brochure-image') }}" alt="">
  84.                     </div>
  85.                     <h5>{{ "productDetailData.productDataBrochure"|trans }}</h5>
  86.                 </a>
  87.             {% endif %}
  88.         </div>
  89.     </div>
  90. {% endblock %}
  91. {% block page_product_detail_tabs %}
  92.     <div class="container row product-detail-how-to-wrapper">
  93.         {% set replacedUrl = page.product.translated.customFields["tiger-how-to-video-url"]|replace({'/watch?v=' : '/embed/'}) %}
  94.         {% if replacedUrl %}
  95.             <div class="col-lg-6">
  96.                 <div class="custom-video-container custom-video-container--gallery">
  97.                     <iframe width="100%" height="auto" src="{{ replacedUrl }}" id="videoIframe"></iframe>
  98.                 </div>
  99.             </div>
  100.         {% set howToDescription = page.product.translated.customFields["tiger-how-to-description"] %}
  101.             <div class="col-lg-6 my-4">
  102.                 {{ howToDescription|raw }}
  103.             </div>
  104.         {% endif %}
  105.     </div>
  106.     <div class="product-detail-tabs">
  107.         <div class="container">
  108.             {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  109.         </div>
  110.         {% set tigerStepsData = [] %}
  111.         {% for i in 1..5 %}
  112.             {% set imageKey = 'tiger-steps_image-' ~ i %}
  113.             {% set textKey = 'tiger-steps_text-' ~ i %}
  114.             {% set image = page.product.customFields[imageKey] %}
  115.             {% set text = page.product.customFields[textKey] %}
  116.             {% set stepData = {'image': image, 'text': text} %}
  117.             {% set tigerStepsData = tigerStepsData|merge([stepData]) %}
  118.         {% endfor %}
  119.         {% if tigerStepsData[0].text is not null %}
  120.             <div class="container product-detail-steps-wrapper">
  121.                 <h3 class="product-detail-steps-title">{{ "productDetail.stepsTitle"|trans|sw_sanitize }}</h3>
  122.                 <h4 class="product-detail-steps-subtitle">{{ "productDetail.stepsSubtitle"|trans|sw_sanitize }}</h4>
  123.                 <div class="product-detail-steps">
  124.                 {% for item in tigerStepsData %}
  125.                     {% set stepsCollection = searchMedia([
  126.                         item.image
  127.                     ], context.context) %}
  128.                     {% if item.image or item.text %}
  129.                         <div class="product-detail-step">
  130.                             <img class="product-detail-step__image" width="auto" src="{{ stepsCollection.get(item.image).url }}">
  131.                             <h5>{{ item.text }}</h5>
  132.                         </div>
  133.                     {% endif %}
  134.                 {% endfor %}
  135.                 </div>
  136.             </div>
  137.         {% endif %}
  138.     </div>
  139. {% endblock %}
  140. {% block page_product_detail_cross_selling %}
  141.     {% if page.crossSellings.elements is not empty %}
  142.         <div class="product-detail-tabs product-detail-cross-selling">
  143.             <div class="container">
  144.                 {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  145.                     crossSellings: page.crossSellings,
  146.                 } %}
  147.             </div>
  148.         </div>
  149.     {% endif %}
  150. {% endblock %}