var/cache/dev_h7c987e168e0fffb75676c4822b2502a6/twig/00/005fe2b478d4e9d8fc8698d3720e53a2f423cc5c041daa708d5cfa21659cbdb2.php line 50

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @CustomContentPdp/storefront/page/product-detail/index.html.twig */
  16. class __TwigTemplate_63d1c0d382b6850a2ba12ed36964f29f extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->blocks = [
  25.             'page_product_detail_tabs' => [$this'block_page_product_detail_tabs'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "@AmMacTrade/storefront/page/product-detail/index.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@CustomContentPdp/storefront/page/product-detail/index.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@CustomContentPdp/storefront/page/product-detail/index.html.twig"));
  40.         $this->parent $this->loadTemplate("@AmMacTrade/storefront/page/product-detail/index.html.twig""@CustomContentPdp/storefront/page/product-detail/index.html.twig"2);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 3
  48.     public function block_page_product_detail_tabs($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_product_detail_tabs"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_product_detail_tabs"));
  55.         // line 4
  56.         echo 
  57. ";
  58.         // line 7
  59.         echo "            ";
  60.         // line 13
  61.         echo "
  62.             <div class=\"m1 menu\">
  63.             <div id=\"menu-center\">
  64.                 <ul>
  65.               
  66.     ";
  67.         // line 18
  68.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse18), "extensions", [], "any"falsefalsefalse18), "netiProductCms", [], "any"falsefalsefalse18) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse18), "extensions", [], "any"falsefalsefalse18), "netiProductCms", [], "any"falsefalsefalse18), "getAboveProductDetailDescriptionContent", [], "method"falsefalsefalse18))) {
  69.             // line 19
  70.             $context['_parent'] = $context;
  71.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse19), "extensions", [], "any"falsefalsefalse19), "netiProductCms", [], "any"falsefalsefalse19), "getAboveProductDetailDescriptionContent", [], "method"falsefalsefalse19));
  72.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  73.                 // line 20
  74.                 if (twig_in_filter("Technische"$context["content"])) {
  75.                     // line 21
  76.                     echo "<li><a href=\"#technische\">Technische Daten</a></li>
  77. ";
  78.                 }
  79.                 // line 22
  80.                 echo 
  81. ";
  82.             }
  83.             $_parent $context['_parent'];
  84.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  85.             $context array_intersect_key($context$_parent) + $_parent;
  86.             // line 24
  87.             echo "
  88. ";
  89.         }
  90.         // line 26
  91.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse26), "extensions", [], "any"falsefalsefalse26), "netiProductCms", [], "any"falsefalsefalse26) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse26), "extensions", [], "any"falsefalsefalse26), "netiProductCms", [], "any"falsefalsefalse26), "getAboveProductDetailDescriptionContent", [], "method"falsefalsefalse26))) {
  92.             // line 27
  93.             $context['_parent'] = $context;
  94.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse27), "extensions", [], "any"falsefalsefalse27), "netiProductCms", [], "any"falsefalsefalse27), "getAboveProductDetailDescriptionContent", [], "method"falsefalsefalse27));
  95.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  96.                 // line 28
  97.                 if (twig_in_filter("Kombinierbare"$context["content"])) {
  98.                     // line 29
  99.                     echo "<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
  100. ";
  101.                 }
  102.                 // line 30
  103.                 echo 
  104. ";
  105.             }
  106.             $_parent $context['_parent'];
  107.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  108.             $context array_intersect_key($context$_parent) + $_parent;
  109.             // line 33
  110.             echo "
  111. ";
  112.         }
  113.         // line 35
  114.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse35), "extensions", [], "any"falsefalsefalse35), "netiProductCms", [], "any"falsefalsefalse35) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse35), "extensions", [], "any"falsefalsefalse35), "netiProductCms", [], "any"falsefalsefalse35), "getAboveProductDescriptionContent", [], "method"falsefalsefalse35))) {
  115.             // line 36
  116.             $context['_parent'] = $context;
  117.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse36), "extensions", [], "any"falsefalsefalse36), "netiProductCms", [], "any"falsefalsefalse36), "getAboveProductDescriptionContent", [], "method"falsefalsefalse36));
  118.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  119.                 // line 37
  120.                 echo "
  121. ";
  122.                 // line 38
  123.                 if (twig_in_filter("Kombinierbare"$context["content"])) {
  124.                     // line 39
  125.                     echo "<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
  126. ";
  127.                 }
  128.                 // line 40
  129.                 echo 
  130. ";
  131.             }
  132.             $_parent $context['_parent'];
  133.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  134.             $context array_intersect_key($context$_parent) + $_parent;
  135.             // line 43
  136.             echo "
  137. ";
  138.         }
  139.         // line 45
  140.         echo "
  141. ";
  142.         // line 47
  143.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse47), "extensions", [], "any"falsefalsefalse47), "netiProductCms", [], "any"falsefalsefalse47) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse47), "extensions", [], "any"falsefalsefalse47), "netiProductCms", [], "any"falsefalsefalse47), "getBelowProductDescriptionContent", [], "method"falsefalsefalse47))) {
  144.             // line 48
  145.             $context['_parent'] = $context;
  146.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse48), "extensions", [], "any"falsefalsefalse48), "netiProductCms", [], "any"falsefalsefalse48), "getBelowProductDescriptionContent", [], "method"falsefalsefalse48));
  147.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  148.                 // line 49
  149.                 echo "
  150. ";
  151.                 // line 50
  152.                 if (twig_in_filter("Kombinierbare"$context["content"])) {
  153.                     // line 51
  154.                     echo "<li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
  155. ";
  156.                 }
  157.                 // line 52
  158.                 echo 
  159. ";
  160.             }
  161.             $_parent $context['_parent'];
  162.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  163.             $context array_intersect_key($context$_parent) + $_parent;
  164.             // line 54
  165.             echo "
  166. ";
  167.         }
  168.         // line 56
  169.         echo "
  170.                    
  171.                     <li><a href=\"#produktbeschreibung\">Produktbeschreibung</a></li>
  172.                     
  173.                     
  174. ";
  175.         // line 61
  176.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse61), "extensions", [], "any"falsefalsefalse61), "netiProductCms", [], "any"falsefalsefalse61) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse61), "extensions", [], "any"falsefalsefalse61), "netiProductCms", [], "any"falsefalsefalse61), "getBelowProductDetailDescriptionContent", [], "method"falsefalsefalse61))) {
  177.             // line 62
  178.             $context['_parent'] = $context;
  179.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse62), "extensions", [], "any"falsefalsefalse62), "netiProductCms", [], "any"falsefalsefalse62), "getBelowProductDetailDescriptionContent", [], "method"falsefalsefalse62));
  180.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  181.                 // line 63
  182.                 if (twig_in_filter("Technische"$context["content"])) {
  183.                     // line 64
  184.                     echo "<li><a href=\"#technische\">Technische Daten</a></li>
  185. ";
  186.                 }
  187.                 // line 65
  188.                 echo 
  189. ";
  190.             }
  191.             $_parent $context['_parent'];
  192.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  193.             $context array_intersect_key($context$_parent) + $_parent;
  194.             // line 68
  195.             echo "
  196. ";
  197.         }
  198.         // line 70
  199.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse70), "extensions", [], "any"falsefalsefalse70), "netiProductCms", [], "any"falsefalsefalse70) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse70), "extensions", [], "any"falsefalsefalse70), "netiProductCms", [], "any"falsefalsefalse70), "getAboveProductDescriptionContent", [], "method"falsefalsefalse70))) {
  200.             // line 71
  201.             $context['_parent'] = $context;
  202.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse71), "extensions", [], "any"falsefalsefalse71), "netiProductCms", [], "any"falsefalsefalse71), "getAboveProductDescriptionContent", [], "method"falsefalsefalse71));
  203.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  204.                 // line 72
  205.                 echo "
  206. ";
  207.                 // line 73
  208.                 if (twig_in_filter("Technische"$context["content"])) {
  209.                     // line 74
  210.                     echo "<li><a href=\"#technische\">Technische Daten</a></li>
  211. ";
  212.                 }
  213.                 // line 75
  214.                 echo 
  215. ";
  216.             }
  217.             $_parent $context['_parent'];
  218.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  219.             $context array_intersect_key($context$_parent) + $_parent;
  220.             // line 78
  221.             echo "
  222. ";
  223.         }
  224.         // line 80
  225.         echo "
  226. ";
  227.         // line 82
  228.         if ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse82), "extensions", [], "any"falsefalsefalse82), "netiProductCms", [], "any"falsefalsefalse82) && sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse82), "extensions", [], "any"falsefalsefalse82), "netiProductCms", [], "any"falsefalsefalse82), "getBelowProductDescriptionContent", [], "method"falsefalsefalse82))) {
  229.             // line 83
  230.             $context['_parent'] = $context;
  231.             $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse83), "extensions", [], "any"falsefalsefalse83), "netiProductCms", [], "any"falsefalsefalse83), "getBelowProductDescriptionContent", [], "method"falsefalsefalse83));
  232.             foreach ($context['_seq'] as $context["_key"] => $context["content"]) {
  233.                 // line 84
  234.                 echo "
  235. ";
  236.                 // line 85
  237.                 if (twig_in_filter("Technische"$context["content"])) {
  238.                     // line 86
  239.                     echo "<li><a href=\"#technische\">Technische Daten</a></li>
  240. ";
  241.                 }
  242.                 // line 87
  243.                 echo 
  244. ";
  245.             }
  246.             $_parent $context['_parent'];
  247.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['content'], $context['_parent'], $context['loop']);
  248.             $context array_intersect_key($context$_parent) + $_parent;
  249.             // line 89
  250.             echo "
  251. ";
  252.         }
  253.         // line 91
  254.         echo "
  255.                 </ul>
  256.             </div>
  257.         </div>
  258.             
  259.             ";
  260.         // line 97
  261.         echo "
  262.             ";
  263.         // line 99
  264.         echo "              <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>
  265.               <script>
  266.              
  267.                 let onScroll = function(event){
  268.    
  269.                 \$('#menu-center a').each(function () {
  270.                     var scrollPos = \$(document).scrollTop();
  271.                     var currLink = \$(this);
  272.                     var refElement = \$(currLink.attr(\"href\"));
  273.                     scrollPos += 150;
  274.                     //console.log(refElement.position().top, refElement.height(), scrollPos);
  275.                     if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
  276.                         \$('#menu-center ul a').parent().removeClass(\"active\");
  277.                         console.log('position true', refElement);
  278.                         currLink.parent().addClass(\"active\");
  279.                     }
  280.                     else{
  281.                         currLink.parent().removeClass(\"active\");
  282.                     }
  283.                 });
  284.             }
  285.             \$(document).ready(function () {
  286.                 \$(document).on(\"scroll.custom\", onScroll);
  287.                 
  288.                 //smoothscroll
  289.                 \$('a[href^=\"#\"]').on('click', function (e) {
  290.                     e.preventDefault();
  291.                     \$(document).off(\"scroll.custom\");
  292.                     
  293.                     \$('a').each(function () {
  294.                         \$(this).parent().removeClass('active');
  295.                     })
  296.                     \$(this).parent().addClass('active');
  297.                 
  298.                     var target = this.hash;
  299.                 e.preventDefault();
  300.                         var pos = \$(this).attr('href');
  301.                         doScrolling(pos, 1000);
  302.                     
  303.                 });
  304.             });
  305.         function doScrolling(element, duration) {
  306.             var startingY = window.pageYOffset
  307.             var elementY = getElementY(element) + 70
  308.             var targetY = document.body.scrollHeight - elementY < window.innerHeight ? document.body.scrollHeight - window.innerHeight : elementY
  309.             var diff = (targetY - (130 + 85)) - startingY
  310.             var easing = function(t) {
  311.                 return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
  312.             }
  313.             var start
  314.             if (!diff)
  315.                 return
  316.             window.requestAnimationFrame(function step(timestamp) {
  317.                 if (!start)
  318.                     start = timestamp
  319.                 var time = timestamp - start
  320.                 var percent = Math.min(time / duration, 1)
  321.                 percent = easing(percent)
  322.                 window.scrollTo(0, startingY + diff * percent)
  323.                 if (time < duration) {
  324.                     window.requestAnimationFrame(step);
  325.                 } else {
  326.                     \$(element).parent().addClass(\"active\").siblings().removeClass(\"active\");
  327.                      \$(document).on(\"scroll.custom\", onScroll);
  328.                 }
  329.             })
  330.         }
  331.          function getElementY(query) {
  332.             return window.pageYOffset + document.querySelector(query).getBoundingClientRect().top
  333.         }
  334.         </script>
  335.     ";
  336.         // line 178
  337.         echo "              
  338.               
  339. \t";
  340.         
  341.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  342.         
  343.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  344.     }
  345.     public function getTemplateName()
  346.     {
  347.         return "@CustomContentPdp/storefront/page/product-detail/index.html.twig";
  348.     }
  349.     public function isTraitable()
  350.     {
  351.         return false;
  352.     }
  353.     public function getDebugInfo()
  354.     {
  355.         return array (  363 => 178,  283 => 99,  280 => 97,  273 => 91,  269 => 89,  262 => 87,  258 => 86,  256 => 85,  253 => 84,  249 => 83,  247 => 82,  243 => 80,  239 => 78,  231 => 75,  227 => 74,  225 => 73,  222 => 72,  218 => 71,  216 => 70,  212 => 68,  204 => 65,  200 => 64,  198 => 63,  194 => 62,  192 => 61,  185 => 56,  181 => 54,  174 => 52,  170 => 51,  168 => 50,  165 => 49,  161 => 48,  159 => 47,  155 => 45,  151 => 43,  143 => 40,  139 => 39,  137 => 38,  134 => 37,  130 => 36,  128 => 35,  124 => 33,  116 => 30,  112 => 29,  110 => 28,  106 => 27,  104 => 26,  100 => 24,  93 => 22,  89 => 21,  87 => 20,  83 => 19,  81 => 18,  74 => 13,  72 => 7,  68 => 4,  58 => 3,  35 => 2,);
  356.     }
  357.     public function getSourceContext()
  358.     {
  359.         return new Source("{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
  360. {% block page_product_detail_tabs %}
  361.  
  362. {# start tabs #}
  363.             {# <div class=\"new-tabs\">
  364.               <ul>
  365.                 <li><a href=\"#nmytab1\">Produktbeschreibung</a></li>
  366.                 <li><a href=\"#nmytab2\">Technische Daten</a></li>
  367.               </ul>
  368.             </div> #}
  369.             <div class=\"m1 menu\">
  370.             <div id=\"menu-center\">
  371.                 <ul>
  372.               
  373.     {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
  374. {% for content in page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
  375. {%if 'Technische' in content %}
  376. <li><a href=\"#technische\">Technische Daten</a></li>
  377. {% endif %} 
  378. {% endfor %}
  379. {% endif %}
  380. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
  381. {% for content in page.product.extensions.netiProductCms.getAboveProductDetailDescriptionContent() %}
  382. {%if 'Kombinierbare' in content %}
  383. <li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
  384. {% endif %} 
  385. {% endfor %}
  386. {% endif %}
  387. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
  388. {% for content in page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
  389. {%if 'Kombinierbare' in content %}
  390. <li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
  391. {% endif %} 
  392. {% endfor %}
  393. {% endif %}
  394. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
  395. {% for content in page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
  396. {%if 'Kombinierbare' in content %}
  397. <li><a href=\"#kombinierbare\">Kombinierbare Aktionen</a></li>
  398. {% endif %} 
  399. {% endfor %}
  400. {% endif %}
  401.                    
  402.                     <li><a href=\"#produktbeschreibung\">Produktbeschreibung</a></li>
  403.                     
  404.                     
  405. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDetailDescriptionContent() %}
  406. {% for content in page.product.extensions.netiProductCms.getBelowProductDetailDescriptionContent() %}
  407. {%if 'Technische' in content %}
  408. <li><a href=\"#technische\">Technische Daten</a></li>
  409. {% endif %} 
  410. {% endfor %}
  411. {% endif %}
  412. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
  413. {% for content in page.product.extensions.netiProductCms.getAboveProductDescriptionContent() %}
  414. {%if 'Technische' in content %}
  415. <li><a href=\"#technische\">Technische Daten</a></li>
  416. {% endif %} 
  417. {% endfor %}
  418. {% endif %}
  419. {% if page.product.extensions.netiProductCms and page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
  420. {% for content in page.product.extensions.netiProductCms.getBelowProductDescriptionContent() %}
  421. {%if 'Technische' in content %}
  422. <li><a href=\"#technische\">Technische Daten</a></li>
  423. {% endif %} 
  424. {% endfor %}
  425. {% endif %}
  426.                 </ul>
  427.             </div>
  428.         </div>
  429.             
  430.             {# end tabs #}
  431.             {# start tab js #}
  432.               <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js\"></script>
  433.               <script>
  434.              
  435.                 let onScroll = function(event){
  436.    
  437.                 \$('#menu-center a').each(function () {
  438.                     var scrollPos = \$(document).scrollTop();
  439.                     var currLink = \$(this);
  440.                     var refElement = \$(currLink.attr(\"href\"));
  441.                     scrollPos += 150;
  442.                     //console.log(refElement.position().top, refElement.height(), scrollPos);
  443.                     if (refElement.position().top <= scrollPos && refElement.position().top + refElement.height() > scrollPos) {
  444.                         \$('#menu-center ul a').parent().removeClass(\"active\");
  445.                         console.log('position true', refElement);
  446.                         currLink.parent().addClass(\"active\");
  447.                     }
  448.                     else{
  449.                         currLink.parent().removeClass(\"active\");
  450.                     }
  451.                 });
  452.             }
  453.             \$(document).ready(function () {
  454.                 \$(document).on(\"scroll.custom\", onScroll);
  455.                 
  456.                 //smoothscroll
  457.                 \$('a[href^=\"#\"]').on('click', function (e) {
  458.                     e.preventDefault();
  459.                     \$(document).off(\"scroll.custom\");
  460.                     
  461.                     \$('a').each(function () {
  462.                         \$(this).parent().removeClass('active');
  463.                     })
  464.                     \$(this).parent().addClass('active');
  465.                 
  466.                     var target = this.hash;
  467.                 e.preventDefault();
  468.                         var pos = \$(this).attr('href');
  469.                         doScrolling(pos, 1000);
  470.                     
  471.                 });
  472.             });
  473.         function doScrolling(element, duration) {
  474.             var startingY = window.pageYOffset
  475.             var elementY = getElementY(element) + 70
  476.             var targetY = document.body.scrollHeight - elementY < window.innerHeight ? document.body.scrollHeight - window.innerHeight : elementY
  477.             var diff = (targetY - (130 + 85)) - startingY
  478.             var easing = function(t) {
  479.                 return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1
  480.             }
  481.             var start
  482.             if (!diff)
  483.                 return
  484.             window.requestAnimationFrame(function step(timestamp) {
  485.                 if (!start)
  486.                     start = timestamp
  487.                 var time = timestamp - start
  488.                 var percent = Math.min(time / duration, 1)
  489.                 percent = easing(percent)
  490.                 window.scrollTo(0, startingY + diff * percent)
  491.                 if (time < duration) {
  492.                     window.requestAnimationFrame(step);
  493.                 } else {
  494.                     \$(element).parent().addClass(\"active\").siblings().removeClass(\"active\");
  495.                      \$(document).on(\"scroll.custom\", onScroll);
  496.                 }
  497.             })
  498.         }
  499.          function getElementY(query) {
  500.             return window.pageYOffset + document.querySelector(query).getBoundingClientRect().top
  501.         }
  502.         </script>
  503.     {# end tab js #}
  504.               
  505.               
  506. \t{#<div class=\"product-detail-tabs tb-pd\">
  507. \t\t{% sw_include '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  508. \t</div> #}
  509. {% endblock %}
  510. ""@CustomContentPdp/storefront/page/product-detail/index.html.twig""/var/www/vhosts/devmt.de/httpdocs/shopware-ce/custom/plugins/CustomContentPdp/src/Resources/views/storefront/page/product-detail/index.html.twig");
  511.     }
  512. }