custom/plugins/zenitPlatformHorizon/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_body %}
  3.     {# ... body classes #}
  4.     {% if galleryMode is same as ('scroller') %}
  5.         {% set bodyClasses = ['is-gallery-scroller']|merge(bodyClasses) %}
  6.     {% endif %}
  7.     {{ parent() }}
  8. {% endblock %}
  9. {% block base_main_inner %}
  10.     {# ... remove .container here #}
  11.     {{ block('base_main_container') }}
  12. {% endblock %}
  13. {% block base_breadcrumb %}
  14.     <div class="breadcrumb-container">
  15.         <div class="container">
  16.             {{ parent() }}
  17.         </div>
  18.     </div>
  19. {% endblock %}
  20. {% block base_content %}
  21.     {% block page_product_detail %}
  22.         <div class="product-detail"
  23.              itemscope
  24.              itemtype="https://schema.org/Product">
  25.             {% block page_product_detail_inner %}
  26.                 {% block page_product_detail_content %}
  27.                     <div class="product-detail-content">
  28.                         <div class="container">
  29.                             {# ... removed headline here #}
  30.                             {% set mediaItems = page.product.media.media %}
  31.                             {% block page_product_detail_main %}
  32.                                 {# ... these settings are only available on default product-pages (non-cms product pages) #}
  33.                                 {% set galleryWidthConfig = theme_config('zen-product-gallery-slider-width') ?: 7 %}
  34.                                 {% set buyboxWidthConfig = theme_config('zen-product-gallery-slider-width') ? 12 - theme_config('zen-product-gallery-slider-width') : 5 %}
  35.                                 {% set displayModeConfig = theme_config('zen-product-gallery-slider-display-mode') ?: 'contain' %}
  36.                                 {% set verticalAlignConfig = theme_config('zen-product-gallery-slider-vertical-align') ?: 'center' %}
  37.                                 {% set minHeightConfig = theme_config('zen-product-gallery-slider-min-height-desktop') ? theme_config('zen-product-gallery-slider-min-height-desktop')  ~ 'px' : '430px' %}
  38.                                 {% set navigationArrowsConfig = theme_config('zen-product-gallery-slider-navigation-arrows') ?: 'inside' %}
  39.                                 {% set navigationDotsConfig = theme_config('zen-product-gallery-slider-navigation-dots') ?: 'inside' %}
  40.                                 {% set galleryPositionConfig = theme_config('zen-product-gallery-slider-gallery-position') ?: 'left' %}
  41.                                 {% set thumbnailsConfig = thumbnailsConfig ? thumbnailsConfig : true %}
  42.                                 {% if buyboxWidthConfig is same as (0) %}
  43.                                     {% set buyboxWidthConfig = 12 %}
  44.                                 {% endif %}
  45.                                 {% if theme_config('zen-product-gallery-slider-zoom') is null %}
  46.                                     {# fallback for older child-themes without this config #}
  47.                                     {% set zoomConfig = true %}
  48.                                 {% else %}
  49.                                     {% set zoomConfig = theme_config('zen-product-gallery-slider-zoom') %}
  50.                                 {% endif %}
  51.                                 {% if theme_config('zen-product-gallery-slider-zoom-modal') is null %}
  52.                                     {# fallback for older child-themes without this config #}
  53.                                     {% set zoomModalConfig = true %}
  54.                                 {% else %}
  55.                                     {% set zoomModalConfig = theme_config('zen-product-gallery-slider-zoom-modal') %}
  56.                                 {% endif %}
  57.                                 {% if theme_config('zen-product-gallery-slider-keep-aspect-ratio-on-zoom') is null %}
  58.                                     {# fallback for older child-themes without this config #}
  59.                                     {% set keepAspectRatioOnZoom = false %}
  60.                                 {% else %}
  61.                                     {% set keepAspectRatioOnZoom = theme_config('zen-product-gallery-slider-keep-aspect-ratio-on-zoom') %}
  62.                                 {% endif %}
  63.                                 {% if theme_config('zen-product-gallery-slider-magnifier-over-gallery') is null %}
  64.                                     {# fallback for older child-themes without this config #}
  65.                                     {% set magnifierOverGallery = false %}
  66.                                 {% else %}
  67.                                     {% set magnifierOverGallery = theme_config('zen-product-gallery-slider-magnifier-over-gallery') %}
  68.                                 {% endif %}
  69.                                 {% if navigationArrowsConfig is same as ('none') %}
  70.                                     {% set navigationArrowsConfig = null %}
  71.                                 {% endif %}
  72.                                 {% if navigationDotsConfig is same as ('none') %}
  73.                                     {% set navigationDotsConfig = null %}
  74.                                 {% endif %}
  75.                                 {% if galleryPositionConfig is same as ('none') %}
  76.                                     {# if gallery position is none, behave like underneath and hides the thumbnails #}
  77.                                     {% set galleryPositionConfig = 'underneath' %}
  78.                                     {% set hideThumbnailsConfig = true %}
  79.                                 {% endif %}
  80.                                 {% if theme_config("zen-category-header-position") is same as ('absolute') or (theme_config("zen-category-header-position") is same as ('relative') and zenCustomFields.category.zenit_horizon_category_header_position is same as ('absolute')) %}
  81.                                     {% set sectionCategoryOverlay = true %}
  82.                                 {% endif %}
  83.                                 <div class="row product-detail-main">
  84.                                     {% block page_product_detail_media %}
  85.                                         <div class="col-lg-7 col-xl-{{ galleryWidthConfig }} product-detail-media">
  86.                                             {% if page.product.media %}
  87.                                                 {% sw_include '@Storefront/storefront/element/cms-element-image-gallery.html.twig' with {
  88.                                                     'mediaItems': mediaItems,
  89.                                                     'zoom': zoomConfig,
  90.                                                     'zoomModal': zoomModalConfig,
  91.                                                     'displayMode': displayModeConfig,
  92.                                                     'verticalAlign': verticalAlignConfig,
  93.                                                     'gutter': gutterConfig,
  94.                                                     'minHeight': minHeightConfig,
  95.                                                     'navigationArrows': navigationArrowsConfig,
  96.                                                     'navigationDots': navigationDotsConfig,
  97.                                                     'galleryPosition': galleryPositionConfig,
  98.                                                     'hideThumbnails': hideThumbnailsConfig,
  99.                                                     'isProduct': true,
  100.                                                     'fallbackImageTitle': page.product.translated.name,
  101.                                                     'startIndexThumbnails': 1,
  102.                                                     'startIndexSlider': 1,
  103.                                                     'keepAspectRatioOnZoom': keepAspectRatioOnZoom
  104.                                                 } %}
  105.                                             {% endif %}
  106.                                         </div>
  107.                                     {% endblock %}
  108.                                     {% block page_product_detail_buy %}
  109.                                         <div class="col-lg-5 col-xl-{{ buyboxWidthConfig }} product-detail-buy" data-sticky-buybox="true">
  110.                                             {# ... add headline here #}
  111.                                             {% block page_product_detail_headline %}
  112.                                                 <div class="row product-detail-headline">
  113.                                                     {% sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' %}
  114.                                                 </div>
  115.                                             {% endblock %}
  116.                                             {# ... add short description #}
  117.                                             {% block zen_page_product_detail_short_description %}
  118.                                                 {% if page.product.translated.metaDescription and theme_config('zen-product-details-short-description') %}
  119.                                                     <div class="product-detail-short-description">
  120.                                                         {{ page.product.translated.metaDescription|raw }}
  121.                                                     </div>
  122.                                                 {% endif %}
  123.                                             {% endblock %}
  124.                                             {% sw_include '@Storefront/storefront/page/product-detail/buy-widget.html.twig' %}
  125.                                         </div>
  126.                                     {% endblock %}
  127.                                 </div>
  128.                             {% endblock %}
  129.                         </div>
  130.                     </div>
  131.                 {% endblock %}
  132.                 {% block page_product_detail_tabs %}
  133.                     <div class="product-detail-tabs">
  134.                         <div class="container">
  135.                             {% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  136.                         </div>
  137.                     </div>
  138.                 {% endblock %}
  139.                 {% block page_product_detail_cross_selling %}
  140.                     {% if page.crossSellings.elements is not empty %}
  141.                         <div class="product-detail-tabs product-detail-cross-selling">
  142.                             <div class="container">
  143.                                 {% sw_include '@Storefront/storefront/page/product-detail/cross-selling/tabs.html.twig' with {
  144.                                     crossSellings: page.crossSellings
  145.                                 } %}
  146.                             </div>
  147.                         </div>
  148.                     {% endif %}
  149.                 {% endblock %}
  150.             {% endblock %}
  151.         </div>
  152.     {% endblock %}
  153. {% endblock %}