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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/block/cms-block-gallery-buybox.html.twig' %}
  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.         {% set values = block.slots.getSlot('right') %}
  7.         <div class="pagecutline"></div>
  8.         <div class="bottomPageCut"></div>
  9.         <div class="leftProductSide">
  10.             <div id="articleheader"></div>
  11.             <div class="col-lg-7 product-detail-media" data-cms-element-id="{{ element.id }}">
  12.                 {% block block_gallery_buybox_column_left_inner %}
  13.                     {% sw_include "@Storefront/storefront/element/cms-element-" ~ element.type ~ ".html.twig" ignore missing
  14.                         with {
  15.                         'isProduct': config.sliderItems.value == 'product.media' and config.sliderItems.source == 'mapped',
  16.                         'startIndexThumbnails': 1,
  17.                         'startIndexSlider': 1
  18.                     } %}
  19.                 {% endblock %}
  20.             </div>
  21.             <div class="clearingItem"></div>
  22.         </div>
  23.         <div class="rightProductSide">
  24.             <div id="articleheader2"></div>
  25.             <div class="product-breadcrumb breadcrumb">
  26.                 {% block cms_breadcrumb %}
  27.                     <div class="breadcrumb cms-breadcrumb container">
  28.                         {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' with {
  29.                             context: context,
  30.                             category: page.product.seoCategory
  31.                         } only %}
  32.                         <div class="breadcrump-produktname">
  33.                             <div class="breadcrumb-placeholder">
  34.                                 <span class="icon icon-arrow-medium-right icon-fluid">
  35.                                 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16"><defs><path id="icons-solid-arrow-medium-right" d="M4.7071 5.2929c-.3905-.3905-1.0237-.3905-1.4142 0-.3905.3905-.3905 1.0237 0 1.4142l4 4c.3905.3905 1.0237.3905 1.4142 0l4-4c.3905-.3905.3905-1.0237 0-1.4142-.3905-.3905-1.0237-.3905-1.4142 0L8 8.5858l-3.2929-3.293z"></path></defs><use transform="rotate(-90 8 8)" xlink:href="#icons-solid-arrow-medium-right" fill="#758CA3" fill-rule="evenodd"></use></svg>
  36.                                 </span>
  37.                             </div>
  38.                             <div class="breadcrump-singleproduktname">
  39.                                 {% set variation = values.data.product.variation %}
  40.                                 {% set sizeoption = variation[0].option %}
  41.                                 {% set coloroption = variation[1].option %}
  42.                                 {% set gloveoption = variation[2].option %}
  43.                                 {% set blank = "" %}
  44.                                 {% set size = " " ~ sizeoption %}
  45.                                 {% set newname = values.data.product.translated.name %}
  46.                                 {% if size != "" %}
  47.                                     {% set newname = newname|replace({(size): blank}) %}
  48.                                 {% endif %}
  49.                                 {% if coloroption != "" %}
  50.                                     {% set newname = newname|replace({(coloroption): blank}) %}
  51.                                 {% endif %}
  52.                                 {% if gloveoption != "" %}
  53.                                     {% set newname = newname|replace({(gloveoption): blank}) %}
  54.                                 {% endif %}
  55.                                 {{ newname }}
  56.                                 {#
  57.                                 {{ values.data.product.translated.name }}
  58.                                 #}
  59.                             </div>
  60.                         </div>
  61.                     </div>
  62.                 {% endblock %}
  63.             </div>
  64.             {% block block_gallery_buybox_column_right %}
  65.                 {% set element = block.slots.getSlot('right') %}
  66.                 <div class="col-lg-5 product-detail-buy" data-cms-element-id="{{ element.id }}">
  67.                     {% block block_gallery_buybox_column_right_inner %}
  68.                         {% sw_include "@Storefront/storefront/element/cms-element-" ~ element.type ~ ".html.twig" ignore missing %}
  69.                     {% endblock %}
  70.                 </div>
  71.             {% endblock %}
  72.             <!--<div class="prodcttitle"><h1>{{ values.data.product.translated.name }}</h1></div>-->
  73.             <div class="clearingItem"></div>
  74.         </div>
  75.         <div class="clearingItem"></div>
  76.         <script>
  77.             var IsTablet = false;
  78.             replaceArticleheader();
  79.             $( window ).resize(function() {
  80.                 replaceArticleheader();
  81.             });
  82.             function replaceArticleheader(){
  83.                 var WindowWith = $(window).width();
  84.                 if(WindowWith <= 1300){
  85.                     var breadcrumContent = $(".product-breadcrumb").html();
  86.                     var productlogoContent = $(".productLogoContainer").html();
  87.                     var prodcttitleContent = $(".prodcttitle").html();
  88.                     var ArticleHeaderContent = $("#articleheader2").html();
  89.                     if(prodcttitleContent != ""){
  90.                         $("#articleheader").append(breadcrumContent);
  91.                         $("#articleheader").append(productlogoContent);
  92.                         $("#articleheader").append(prodcttitleContent);
  93.                     } else {
  94.                         $("#articleheader").append(ArticleHeaderContent);
  95.                     }
  96.                     $(".product-breadcrumb").html("");
  97.                     $(".productLogoContainer").html("");
  98.                     $(".prodcttitle").html("");
  99.                     $("#articleheader2").html("");
  100.                     IsTablet = true;
  101.                 } else {
  102.                     if(IsTablet){
  103.                         var ArticleheaderContent = $("#articleheader").html();
  104.                         $("#articleheader2").prepend(ArticleheaderContent);
  105.                         $("#articleheader").html("");
  106.                         IsTablet = false;
  107.                     }
  108.                 }
  109.             }
  110.         </script>
  111.     {% endblock %}
  112. {% endblock %}