custom/plugins/theme/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 page_product_detail_headline %}
  3. {% endblock %}
  4. {% block page_product_detail_media %}
  5.     {% if page is defined and page.product is defined %}
  6.         {% set product = page.product %}
  7.     {% endif %}
  8.     {#
  9.     {% if product.isCloseout and product.availableStock < product.minPurchase %}
  10.         <span class="clerk"
  11.               data-template="@a-hnliche-produkte"
  12.               data-products='["{{ page.product.id }}"]' ></span>
  13.     {% endif %}
  14.     #}
  15.     <div class="col-lg-8 product-detail-media">
  16.         {% if page.product.media %}
  17.             {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  18.                 'mediaItems': mediaItems,
  19.                 'zoom': true,
  20.                 'zoomModal': true,
  21.                 'displayMode': 'contain',
  22.                 'gutter': 30,
  23.                 'minHeight': '430px',
  24.                 'navigationArrows': 'inside',
  25.                 'navigationDots': 'inside',
  26.                 'galleryPosition': 'left',
  27.                 'isProduct': true,
  28.                 'fallbackImageTitle': page.product.translated.name,
  29.                 'startIndexThumbnails': 1,
  30.                 'startIndexSlider': 1,
  31.                 'keepAspectRatioOnZoom': false,
  32.                 'product': page.product
  33.             } %}
  34.         {% endif %}
  35.     </div>
  36. {% endblock %}
  37. {% block page_product_detail_buy %}
  38.     <div class="col-lg-4 product-detail-buy">
  39.         {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  40.     </div>
  41. {% endblock %}
  42. {% block page_product_detail_tabs %}
  43.     <div class="row">
  44.         <div class="product-detail-tabs col-lg-8">
  45.             {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  46.         </div>
  47.         <div class="product-detail-beef-club col-lg-4">
  48.             {% sw_include '@Storefront/storefront/component/doncarne-beef-club.html.twig' %}
  49.         </div>
  50.     </div>
  51.     {# custom fields will be displayed here as fake cms element. Customer does not want to handle this in CMS but fill via PIM #}
  52.     {# order always the same, only appears if custom fields there of course #}
  53.     {% set customFields = page.product.customFields %}
  54.     {# 1. expert #}
  55.     {% if customFields.migration_DonMigrate_product_dc_commentary %}
  56.         {% set expertContent = customFields.migration_DonMigrate_product_dc_commentary|customFieldJsonDecode %}
  57.         {% sw_include '@Storefront/solution360/product-detail/custom-fields-cms-mapping/expert.html.twig' with {expertContent: expertContent} %}
  58.     {% endif %}
  59.     {# 1.5 clerk #}
  60.     {% sw_include '@Storefront/doncarne/product-detail/clerk-reco.html.twig' %}
  61.     {# 2. zubereitungsempfehlung #}
  62.     {% if customFields.migration_DonMigrate_product_dc_preparation %}
  63.         {% set preparationContent = customFields.migration_DonMigrate_product_dc_preparation|customFieldJsonDecode %}
  64.         {% sw_include '@Storefront/solution360/product-detail/custom-fields-cms-mapping/preparation.html.twig' with {preparationContent: preparationContent} %}
  65.     {% endif %}
  66.     {# 3. seo image and texts, variable length #}
  67.     {% if customFields.migration_DonMigrate_product_dc_stories %}
  68.         {% set storiesContent = customFields.migration_DonMigrate_product_dc_stories|customFieldJsonDecode %}
  69.         {% sw_include '@Storefront/solution360/product-detail/custom-fields-cms-mapping/stories.html.twig' with {storiesContent: storiesContent} %}
  70.     {% endif %}
  71. {% endblock %}
  72. {# 4. cross selling #}
  73. {% block page_product_detail_cross_selling %}
  74.     {% if page.crossSellings.elements is defined and page.crossSellings.elements|filter(item => item.total > 0)|length > 0 %}
  75.         <div class="product-detail-custom-cross-selling cms-block-cross-selling">
  76.             {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  77.                 crossSellings: page.crossSellings
  78.             } %}
  79.         </div>
  80.     {% endif %}
  81.     {# recipe ideas #}
  82.     {% sw_include '@Storefront/solution360/product-detail/custom-fields-cms-mapping/recipe-ideas.html.twig' with {customFields: page.product.customFields} %}
  83.     {# 6. toggle info nutrion info etc #}
  84.     {% sw_include '@Storefront/solution360/product-detail/custom-fields-cms-mapping/accordion.html.twig' with {customFields: page.product.customFields} %}
  85. {% endblock %}