var/cache/dev/twig/d7/d7ecbda4370222d02abf88029b28976a.php line 68

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* product/detail.html.twig */
  14. class __TwigTemplate_6536a2e232404baad86c0840d0273ae0 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return $this->loadTemplate($this->extensions['App\Twig\Extension\WebsiteExtension']->getBaseLayout(), "product/detail.html.twig"1);
  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""product/detail.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""product/detail.html.twig"));
  40.         // line 3
  41.         if ((( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'3$this->source); })()), "oms", [], "any"falsefalsetrue3)) &&  !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'3$this->source); })()), "oms", [], "any"falsefalsetrue3))) &&  !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'3$this->source); })()), "oms", [], "any"falsefalsetrue3)))) {
  42.             // line 4
  43.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'4$this->source); })()), "combinedCategoryName", [], "any"falsefalsetrue4))) {
  44.                 // line 5
  45.                 $context["categorieName"] = twig_capitalize_string_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'5$this->source); })()), "combinedCategoryName", [], "any"falsefalsetrue5), 5$this->source));
  46.             } else {
  47.                 // line 7
  48.                 $context["categorieName"] = twig_capitalize_string_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'7$this->source); })()), "oms", [], "any"falsefalsetrue7), 7$this->source));
  49.             }
  50.             // line 10
  51.             $context["head_title"] = (((($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'10$this->source); })()), "oms", [], "any"falsefalsetrue10), 10$this->source) . " | ") . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'10$this->source); })()), "oms", [], "any"falsefalsetrue10), 10$this->source)) . " | ") . $this->sandbox->ensureToStringAllowed((isset($context["categorieName"]) || array_key_exists("categorieName"$context) ? $context["categorieName"] : (function () { throw new RuntimeError('Variable "categorieName" does not exist.'10$this->source); })()), 10$this->source));
  52.         }
  53.         // line 13
  54.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'13$this->source); })()), "extrainfo", [], "any"falsefalsetrue13))) {
  55.             // line 14
  56.             $context["head_description"] = $this->extensions['App\Twig\Extension\TruncateExtension']->truncateContent($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'14$this->source); })()), "extrainfo", [], "any"falsefalsetrue14), 14$this->source), 200"...");
  57.         }
  58.         // line 1
  59.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  60.         
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  62.         
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64.     }
  65.     // line 17
  66.     public function block_content($context, array $blocks = [])
  67.     {
  68.         $macros $this->macros;
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  72.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  73.         // line 18
  74.         echo "    <div class=\"container\">
  75.         <div class=\"row\">
  76.             <div class=\"col-12 mb-3 pt-5 position-relative\">
  77.                 <h3 class=\"text-primary\">";
  78.         // line 23
  79.         echo twig_escape_filter($this->envtwig_capitalize_string_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'23$this->source); })()), "oms", [], "any"falsefalsetrue23), 23$this->source)), "html"nulltrue);
  80.         echo "</h3>
  81.                 <span class=\"position-absolute top-0 pt-3\">
  82.                     <a href=\"";
  83.         // line 25
  84.         if ($this->extensions['App\Twig\Extension\CheckwebsiteSettingExtension']->getCheckWebsitesetting("product_document""document")) {
  85.             echo twig_escape_filter($this->env$this->extensions['MultilingualBundle\Twig\Extension\InotherlangExtension']->getInotherlang("LocalizedDocument"$this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("product_document")), "html"nulltrue);
  86.         }
  87.         echo "\">";
  88.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Aanbod"), "html"nulltrue);
  89.         echo "</a>
  90.                     /
  91.                     ";
  92.         // line 27
  93.         $context["categoryLink"] = $this->extensions['App\Twig\Extension\ProductExtension']->generateGroupLink($this->sandbox->ensureToStringAllowed((isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'27$this->source); })()), 27$this->source));
  94.         // line 28
  95.         echo "                    <a href=\"";
  96.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["categoryLink"]) || array_key_exists("categoryLink"$context) ? $context["categoryLink"] : (function () { throw new RuntimeError('Variable "categoryLink" does not exist.'28$this->source); })()), 28$this->source), "html"nulltrue);
  97.         echo "\">
  98.                         ";
  99.         // line 29
  100.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'29$this->source); })()), "combinedCategoryName", [], "any"falsefalsetrue29))) {
  101.             // line 30
  102.             echo "                            ";
  103.             echo twig_escape_filter($this->envtwig_capitalize_string_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'30$this->source); })()), "combinedCategoryName", [], "any"falsefalsetrue30), 30$this->source)), "html"nulltrue);
  104.             echo "
  105.                         ";
  106.         } else {
  107.             // line 32
  108.             echo "                            ";
  109.             echo twig_escape_filter($this->envtwig_capitalize_string_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'32$this->source); })()), "oms", [], "any"falsefalsetrue32), 32$this->source)), "html"nulltrue);
  110.             echo "
  111.                         ";
  112.         }
  113.         // line 34
  114.         echo "                    </a>
  115.                     /
  116.                     ";
  117.         // line 36
  118.         $context["subcategoryLink"] = $this->extensions['App\Twig\Extension\ProductExtension']->generateSubGroupLink($this->sandbox->ensureToStringAllowed((isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'36$this->source); })()), 36$this->source), $this->sandbox->ensureToStringAllowed((isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'36$this->source); })()), 36$this->source));
  119.         // line 37
  120.         echo "                    <a href=\"";
  121.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["subcategoryLink"]) || array_key_exists("subcategoryLink"$context) ? $context["subcategoryLink"] : (function () { throw new RuntimeError('Variable "subcategoryLink" does not exist.'37$this->source); })()), 37$this->source), "html"nulltrue);
  122.         echo "\">";
  123.         echo twig_escape_filter($this->envtwig_capitalize_string_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'37$this->source); })()), "oms", [], "any"falsefalsetrue37), 37$this->source)), "html"nulltrue);
  124.         echo "</a>
  125.                     /
  126.                 </span>
  127.             </div>
  128.         </div>
  129.         <div class=\"row justify-content-between\">
  130.             ";
  131.         // line 46
  132.         if (twig_get_attribute($this->env$this->source, ($context["product"] ?? null), "getFotos", [], "method"truetruetrue46)) {
  133.             // line 47
  134.             echo "                ";
  135.             if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'47$this->source); })()), "getFotos", [], "method"falsefalsetrue47)) > 0)) {
  136.                 // line 48
  137.                 echo "                    <div class=\"col-12 col-lg-6 mb-3 mb-lg-0\">
  138.                         <img src=\"";
  139.                 // line 49
  140.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'49$this->source); })()), "getFotos", [], "method"falsefalsetrue49), "getThumbnail", [=> "prod-thumb"], "method"falsefalsetrue49), 49$this->source), "html"nulltrue);
  141.                 echo "\" class=\"img-fluid\">
  142.                     </div>
  143.                 ";
  144.             }
  145.             // line 52
  146.             echo "            ";
  147.         }
  148.         // line 53
  149.         echo "
  150.             ";
  151.         // line 55
  152.         echo "            ";
  153.         // line 56
  154.         echo "            ";
  155.         // line 57
  156.         echo "            ";
  157.         // line 58
  158.         echo "            ";
  159.         // line 59
  160.         echo "            ";
  161.         // line 60
  162.         echo "            ";
  163.         // line 61
  164.         echo "            ";
  165.         // line 62
  166.         echo "            ";
  167.         // line 63
  168.         echo "            ";
  169.         // line 64
  170.         echo "            ";
  171.         // line 65
  172.         echo "            ";
  173.         // line 66
  174.         echo "            ";
  175.         // line 67
  176.         echo "            ";
  177.         // line 68
  178.         echo "            ";
  179.         // line 69
  180.         echo "
  181.             <div class=\"col-12 col-lg-6 ps-lg-5\">
  182.                 <div class=\"row mb-3\">
  183.                     <div class=\"col-12\">
  184.                         <h2 class=\"text-primary\">";
  185.         // line 74
  186.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'74$this->source); })()), "oms", [], "any"falsefalsetrue74), 74$this->source), "html"nulltrue);
  187.         echo "</h2>
  188.                         <i class=\"text-black text-opacity-50\">";
  189.         // line 75
  190.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Code:"), "html"nulltrue);
  191.         echo " ";
  192.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'75$this->source); })()), "code", [], "any"falsefalsetrue75), 75$this->source), "html"nulltrue);
  193.         echo "</i><br>
  194.                         ";
  195.         // line 76
  196.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'76$this->source); })()), "merk", [], "any"falsefalsetrue76))) {
  197.             // line 77
  198.             echo "                            <span>";
  199.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Merk:"), "html"nulltrue);
  200.             echo " ";
  201.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'77$this->source); })()), "merk", [], "any"falsefalsetrue77), 77$this->source), "html"nulltrue);
  202.             echo "</span><br>
  203.                         ";
  204.         }
  205.         // line 79
  206.         echo "                        <div class=\"mt-3\">
  207.                         ";
  208.         // line 80
  209.         echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'80$this->source); })()), "extrainfo", [], "any"falsefalsetrue80), 80$this->source);
  210.         echo "</div>
  211.                     </div>
  212.                 </div>
  213.                 <div class=\"row mb-5\">
  214.                     <div class=\"col-12\">
  215.                       ";
  216.         // line 101
  217.         echo "
  218.                         ";
  219.         // line 102
  220.         if (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'102$this->source); })()), "productAPE", [], "any"falsefalsetrue102)) {
  221.             // line 103
  222.             echo "                            ";
  223.             $context["productUnit"] = twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'103$this->source); })()), "APEeenheid", [], "any"falsefalsetrue103);
  224.             // line 104
  225.             echo "                        ";
  226.         } else {
  227.             // line 105
  228.             echo "                            ";
  229.             $context["productUnit"] = "stuk(s)";
  230.             // line 106
  231.             echo "                        ";
  232.         }
  233.         // line 107
  234.         echo "
  235.                         ";
  236.         // line 108
  237.         if ((twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'108$this->source); })()), "stock", [], "any"falsefalsetrue108) <= 0)) {
  238.             // line 109
  239.             echo "                            <p><span class=\"stockrood me-1\">
  240.                              <i class=\"fas fa-xs fa-circle\"></i>
  241.                          </span>";
  242.             // line 111
  243.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("momenteel niet voorradig *");
  244.             echo "</p>
  245.                         ";
  246.         } elseif ((twig_get_attribute($this->env$this->source,         // line 112
  247. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'112$this->source); })()), "stock", [], "any"falsefalsetrue112) <= twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'112$this->source); })()), "aantalVerkochtLaatsteMaand", [], "any"falsefalsetrue112))) {
  248.             // line 113
  249.             echo "                            <span class=\"stockoranje ms-1\">
  250.                                     <i class=\"fas fa-xs  fa-circle\"></i>
  251.                                 ";
  252.             // line 115
  253.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Beperkt op voorraad, er zijn momenteel ");
  254.             echo " ";
  255.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'115$this->source); })()), "stock", [], "any"falsefalsetrue115), 115$this->source), "html"nulltrue);
  256.             echo " ";
  257.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed((isset($context["productUnit"]) || array_key_exists("productUnit"$context) ? $context["productUnit"] : (function () { throw new RuntimeError('Variable "productUnit" does not exist.'115$this->source); })()), 115$this->source));
  258.             echo " ";
  259.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(" in voorraad. *");
  260.             echo "</span>
  261.                         ";
  262.         } elseif ((twig_get_attribute($this->env$this->source,         // line 116
  263. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'116$this->source); })()), "stock", [], "any"falsefalsetrue116) > twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'116$this->source); })()), "aantalVerkochtLaatsteMaand", [], "any"falsefalsetrue116))) {
  264.             // line 117
  265.             echo "                            <span class=\"stockgroen ms-1\">
  266.                                     <i class=\"fas fa-xs fa-circle\"></i>
  267.                                 ";
  268.             // line 119
  269.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Voldoende voorraad, er zijn momenteel ");
  270.             echo " ";
  271.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'119$this->source); })()), "stock", [], "any"falsefalsetrue119), 119$this->source), "html"nulltrue);
  272.             echo " ";
  273.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed((isset($context["productUnit"]) || array_key_exists("productUnit"$context) ? $context["productUnit"] : (function () { throw new RuntimeError('Variable "productUnit" does not exist.'119$this->source); })()), 119$this->source));
  274.             echo " ";
  275.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(" in voorraad. *");
  276.             echo "</span>
  277.                         ";
  278.         }
  279.         // line 121
  280.         echo "
  281.                     </div>
  282.                 </div>
  283.                 <script>
  284.                     \$(document).ready(function(){
  285.                         \$(\"#myModal\").modal('show');
  286.                     });
  287.                 </script>
  288.                 ";
  289.         // line 137
  290.         if ((twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'137$this->source); })()), "stock", [], "any"falsefalsetrue137) <= 0)) {
  291.             // line 138
  292.             echo "                    <div id=\"myModal\" class=\"modal fade\" tabindex=\"-1\">
  293.                         <div class=\"modal-dialog\">
  294.                             <div class=\"modal-content\">
  295.                                 <div class=\"modal-header\">
  296.                                     <h5 class=\"modal-title\">";
  297.             // line 142
  298.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Momenteel niet op voorraad"), "html"nulltrue);
  299.             echo "</h5>
  300.                                     <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
  301.                                 </div>
  302.                                 <div class=\"modal-body\">
  303.                                     <p>";
  304.             // line 146
  305.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Opgepast, dit product is momenteel niet op voorraad en levering kan langer duren dan gebruikelijk."), "html"nulltrue);
  306.             echo "</p>
  307.                                 </div>
  308.                                 <div class=\"modal-footer\">
  309.                                     <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">";
  310.             // line 149
  311.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Oke"), "html"nulltrue);
  312.             echo "</button>
  313.                                 </div>
  314.                             </div>
  315.                         </div>
  316.                     </div>
  317.                 ";
  318.         }
  319.         // line 155
  320.         echo "
  321.                 <div class=\"row\">
  322.                     <div class=\"col-12\">
  323.                             ";
  324.         // line 159
  325.         if (twig_get_attribute($this->env$this->source, ($context["product"] ?? null), "promoprijs", [], "any"truetruetrue159)) {
  326.             // line 160
  327.             echo "                                <div class=\"p-3 bg-light-grey bg-opacity-50 w-75 mb-3\">
  328.                                 ";
  329.             // line 161
  330.             if ((twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'161$this->source); })()), "promoprijs", [], "any"falsefalsetrue161) > 0)) {
  331.                 // line 162
  332.                 echo "                                    ";
  333.                 if (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'162$this->source); })()), "productAPE", [], "any"falsefalsetrue162)) {
  334.                     // line 163
  335.                     echo "                                        ";
  336.                     $context["APE"] = (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'163$this->source); })()), "prijs", [], "any"falsefalsetrue163) * twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'163$this->source); })()), "AantalPerEenheid", [], "any"falsefalsetrue163));
  337.                     // line 164
  338.                     echo "                                        ";
  339.                     $context["APEpromo"] = (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'164$this->source); })()), "promoprijs", [], "any"falsefalsetrue164) * twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'164$this->source); })()), "AantalPerEenheid", [], "any"falsefalsetrue164));
  340.                     // line 165
  341.                     echo "
  342.                                         <span class=\"fs-7 text-decoration-underline\">   ";
  343.                     // line 166
  344.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("per"), "html"nulltrue);
  345.                     echo " € ";
  346.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'166$this->source); })()), "promoprijs", [], "any"falsefalsetrue166), 166$this->source), 2","" "), "html"nulltrue);
  347.                     echo " ";
  348.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'166$this->source); })()), "APEeenheid", [], "any"falsefalsetrue166), 166$this->source)), "html"nulltrue);
  349.                     echo " </span>
  350.                                         <br>
  351.                                         <strike>€ ";
  352.                     // line 168
  353.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["APE"]) || array_key_exists("APE"$context) ? $context["APE"] : (function () { throw new RuntimeError('Variable "APE" does not exist.'168$this->source); })()), 168$this->source), 2","" "), "html"nulltrue);
  354.                     echo " | ";
  355.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'168$this->source); })()), "AantalPerEenheid", [], "any"falsefalsetrue168), 168$this->source), "html"nulltrue);
  356.                     echo " ";
  357.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'168$this->source); })()), "APEeenheid", [], "any"falsefalsetrue168), 168$this->source)), "html"nulltrue);
  358.                     echo "</strike><br>
  359.                                         <span class=\"fw-bold fs-4 text-red\">€ ";
  360.                     // line 169
  361.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["APEpromo"]) || array_key_exists("APEpromo"$context) ? $context["APEpromo"] : (function () { throw new RuntimeError('Variable "APEpromo" does not exist.'169$this->source); })()), 169$this->source), 2","" "), "html"nulltrue);
  362.                     echo "  ";
  363.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("/"), "html"nulltrue);
  364.                     echo " ";
  365.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'169$this->source); })()), "AantalPerEenheid", [], "any"falsefalsetrue169), 169$this->source), "html"nulltrue);
  366.                     echo " ";
  367.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'169$this->source); })()), "APEeenheid", [], "any"falsefalsetrue169), 169$this->source)), "html"nulltrue);
  368.                     echo "</span>
  369.                                     ";
  370.                 } else {
  371.                     // line 171
  372.                     echo "                                        <strike>€ ";
  373.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'171$this->source); })()), "prijs", [], "any"falsefalsetrue171), 171$this->source), 2","" "), "html"nulltrue);
  374.                     echo "</strike><br>
  375.                                         <span class=\"fw-bold text-red\">€ ";
  376.                     // line 172
  377.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'172$this->source); })()), "promoprijs", [], "any"falsefalsetrue172), 172$this->source), 2","" "), "html"nulltrue);
  378.                     echo "</span>
  379.                                     ";
  380.                 }
  381.                 // line 174
  382.                 echo "                                ";
  383.             } else {
  384.                 // line 175
  385.                 echo "                                    ";
  386.                 if (twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'175$this->source); })()), "productAPE", [], "any"falsefalsetrue175)) {
  387.                     // line 176
  388.                     echo "                                    <span class=\"fs-7 fw-bold py-5 text-decoration-underline\">
  389.                                        € ";
  390.                     // line 177
  391.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'177$this->source); })()), "prijs", [], "any"falsefalsetrue177), 177$this->source), 2","" "), "html"nulltrue);
  392.                     echo "   ";
  393.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("per"), "html"nulltrue);
  394.                     echo " ";
  395.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'177$this->source); })()), "APEeenheid", [], "any"falsefalsetrue177), 177$this->source)), "html"nulltrue);
  396.                     echo "
  397.                                     </span>
  398.                                 <br>
  399.                                     <div class=\"mt-3 col-6\">
  400.                                         <label for=\"length\">";
  401.                     // line 181
  402.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed((isset($context["orderByQuantity"]) || array_key_exists("orderByQuantity"$context) ? $context["orderByQuantity"] : (function () { throw new RuntimeError('Variable "orderByQuantity" does not exist.'181$this->source); })()), 181$this->source)), "html"nulltrue);
  403.                     echo "</label>
  404.                                         <input class=\"form-control col-3\" type=\"number\" id=\"length\" name=\"length\" step=\"0.1\" required>
  405.                                     </div>
  406.                                     <div class=\"col-6 d-none\">
  407.                                         <label for=\"width\">";
  408.                     // line 185
  409.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Breedte in m:"), "html"nulltrue);
  410.                     echo "</label>
  411.                                         <input class=\"form-control col-3\" type=\"number\" id=\"width\" name=\"width\" step=\"0.1\"
  412.                                                value=\"";
  413.                     // line 187
  414.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'187$this->source); })()), "AantalPerEenheid", [], "any"falsefalsetrue187), 187$this->source), 2"."" "), "html"nulltrue);
  415.                     echo "\" readonly>
  416.                                     </div>
  417.                                     <div class=\"row g-3 align-items-start mt-1\">
  418.                                         <div class=\"col-auto\">
  419.                                             <label for=\"product_amount\" class=\"col-form-label\">";
  420.                     // line 192
  421.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((("Aantal " $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'192$this->source); })()), "APEeenheid", [], "any"falsefalsetrue192), 192$this->source)) . ":")), "html"nulltrue);
  422.                     echo "</label>
  423.                                         </div>
  424.                                         <div class=\"col-auto\">
  425.                                             <input type=\"number\" id=\"product_amount\" min=\"1\" max=\"999\" value=\"\" readonly class=\"form-control\"/>
  426.                                         </div>
  427.                                         <div class=\"col-auto pt-1\">
  428.             <span class=\"fs-7 fw-bold\" id=\"amount_price\">
  429.                 € ";
  430.                     // line 199
  431.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'199$this->source); })()), "prijs", [], "any"falsefalsetrue199), 199$this->source), 2","" "), "html"nulltrue);
  432.                     echo "
  433.             </span>
  434.                                         </div>
  435.                                         <div class=\"col-auto\">
  436.                                             <button id=\"add_to_cart\" class=\"btn btn-secondary\">
  437.                                                 <i class=\"fas fa-cart-plus\"></i>
  438.                                             </button>
  439.                                         </div>
  440.                                     </div>
  441.                                     <script>
  442.                                         document.addEventListener('DOMContentLoaded', () => {
  443.                                             const lengthInput = document.getElementById('length');
  444.                                             const widthInput = document.getElementById('width');
  445.                                             const totalInput = document.getElementById('product_amount');
  446.                                             const amountPriceSpan = document.getElementById('amount_price');
  447.                                             const pricePerSquareMeter = ";
  448.                     // line 215
  449.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'215$this->source); })()), "prijs", [], "any"falsefalsetrue215), 215$this->source), 2"."""), "html"nulltrue);
  450.                     echo ";
  451.                                             const updateTotal = () => {
  452.                                                 const length = parseFloat(lengthInput.value);
  453.                                                 const width = parseFloat(widthInput.value);
  454.                                                 if (!isNaN(length) && !isNaN(width)) {
  455.                                                     const totalArea = length * width; // Bereken het aantal m²
  456.                                                     const roundedArea = Math.ceil(totalArea); // Rond naar boven af
  457.                                                     const totalPrice = roundedArea * pricePerSquareMeter; // Bereken de totale prijsvolgens afgerond opp
  458.                                                     totalInput.value = roundedArea; // Update aantal m²
  459.                                                     amountPriceSpan.textContent = `€ \${totalPrice.toFixed(2).replace('.', ',')}`; // Update de prijs
  460.                                                 } else {
  461.                                                     totalInput.value = '';
  462.                                                     amountPriceSpan.textContent = `€ \${pricePerSquareMeter.toFixed(2).replace('.', ',')}`;
  463.                                                 }
  464.                                             };
  465.                                             lengthInput.addEventListener('input', updateTotal);
  466.                                             // Zorg ervoor dat de prijs bij het laden correct wordt weergegeven
  467.                                             updateTotal();
  468.                                         });
  469.                                     </script>
  470.                                     ";
  471.                 } else {
  472.                     // line 242
  473.                     echo "                                        <span class=\"fw-bold fs-4\">€ ";
  474.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'242$this->source); })()), "prijs", [], "any"falsefalsetrue242), 242$this->source), 2","" "), "html"nulltrue);
  475.                     echo "</span>
  476.                                     <div class=\"row g-3 align-items-start mt-1\">
  477.                                         <div class=\"col-auto\">
  478.                                             <label for=\"product_amount\" class=\"col-form-label\">";
  479.                     // line 245
  480.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Aantal:"), "html"nulltrue);
  481.                     echo "</label>
  482.                                         </div>
  483.                                         <div class=\"col-auto\">
  484.                                             <input type=\"number\" id=\"product_amount\" min=\"1\" max=\"999\" value=\"1\" class=\"form-control\"/></div>
  485.                                         <div class=\"col-auto\">
  486.                                             <button id=\"add_to_cart\" class=\"btn btn-secondary\"><i class=\"fas fa-cart-plus\"></i></button>
  487.                                         </div>
  488.                                     </div>
  489.                                     ";
  490.                 }
  491.                 // line 254
  492.                 echo "                                ";
  493.             }
  494.             // line 255
  495.             echo "                                </div>
  496.                                 <input type=\"hidden\" id=\"product_id\" value=\"";
  497.             // line 256
  498.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'256$this->source); })()), "id", [], "any"falsefalsetrue256), 256$this->source), "html"nulltrue);
  499.             echo "\">
  500.                                 <span id=\"product_added_confirmation\" class=\"w-100\" style=\"display: none;\"><i class=\"fas fa-check\"></i> ";
  501.             // line 257
  502.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Toegevoegd aan winkelwagen."), "html"nulltrue);
  503.             echo "</span>
  504.                             ";
  505.         }
  506.         // line 259
  507.         echo "                    </div>
  508.                 </div>
  509.             </div>
  510.         </div>
  511.     </div>
  512.     <div class=\"row my-5\">
  513.         <div class=\"col-12 text-center\">
  514.             ";
  515.         // line 268
  516.         $context["subcategoryLink"] = $this->extensions['App\Twig\Extension\ProductExtension']->generateSubGroupLink($this->sandbox->ensureToStringAllowed((isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'268$this->source); })()), 268$this->source), $this->sandbox->ensureToStringAllowed((isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'268$this->source); })()), 268$this->source));
  517.         // line 269
  518.         echo "            <a class=\"btn btn-outline-secondary\" href=\"";
  519.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["subcategoryLink"]) || array_key_exists("subcategoryLink"$context) ? $context["subcategoryLink"] : (function () { throw new RuntimeError('Variable "subcategoryLink" does not exist.'269$this->source); })()), 269$this->source), "html"nulltrue);
  520.         echo "\">
  521.                     <span class=\"material-symbols-outlined inline-icon\">
  522. chevron_left
  523. </span> ";
  524.         // line 272
  525.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Terug naar"), "html"nulltrue);
  526.         echo " ";
  527.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["subcategory"]) || array_key_exists("subcategory"$context) ? $context["subcategory"] : (function () { throw new RuntimeError('Variable "subcategory" does not exist.'272$this->source); })()), "oms", [], "any"falsefalsetrue272), 272$this->source), "html"nulltrue);
  528.         echo "
  529.             </a>
  530.         </div>
  531.     </div>
  532.     ";
  533.         // line 277
  534.         if (array_key_exists("shortLink"$context)) {
  535.             // line 278
  536.             echo "        ";
  537.             if (((isset($context["shortLink"]) || array_key_exists("shortLink"$context) ? $context["shortLink"] : (function () { throw new RuntimeError('Variable "shortLink" does not exist.'278$this->source); })()) == true)) {
  538.                 // line 279
  539.                 echo "            <script>
  540.                 \$('#add_to_cart').click((e)=>{
  541.                     e.preventDefault();
  542.                     let productId = \$('#product_id').val();
  543.                     let amount = \$('#product_amount').val();
  544.                     let fetchUrl = `/\${jsLanguage}/cart/update`;
  545.                     let productAddedCheckMark = \$('#product_added_confirmation');
  546.                     productAddedCheckMark.show();
  547.                     productAddedCheckMark.fadeOut(3000);
  548.                     \$.ajax({
  549.                         url: fetchUrl,
  550.                         cache: false,
  551.                         type:'GET',
  552.                         data: {
  553.                             productId: productId,
  554.                             amount: amount,
  555.                             action: 'add'
  556.                         },
  557.                         success: (data)=>{
  558.                             if (data) {
  559.                                 \$('#amount_in_cart').html(data.cartCount);
  560.                             }
  561.                         },
  562.                         error: function (jqXHR, textStatus, errorThrown) {
  563.                             let errorObj = JSON.parse(jqXHR.responseText);
  564.                         },
  565.                         complete: function () {
  566.                         }
  567.                     })
  568.                 })
  569.             </script>
  570.         ";
  571.             }
  572.             // line 317
  573.             echo "    ";
  574.         }
  575.         // line 318
  576.         echo "
  577. ";
  578.         
  579.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  580.         
  581.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  582.     }
  583.     public function getTemplateName()
  584.     {
  585.         return "product/detail.html.twig";
  586.     }
  587.     public function isTraitable()
  588.     {
  589.         return false;
  590.     }
  591.     public function getDebugInfo()
  592.     {
  593.         return array (  625 => 318,  622 => 317,  582 => 279,  579 => 278,  577 => 277,  567 => 272,  560 => 269,  558 => 268,  547 => 259,  542 => 257,  538 => 256,  535 => 255,  532 => 254,  520 => 245,  513 => 242,  483 => 215,  464 => 199,  454 => 192,  446 => 187,  441 => 185,  434 => 181,  423 => 177,  420 => 176,  417 => 175,  414 => 174,  409 => 172,  404 => 171,  393 => 169,  385 => 168,  376 => 166,  373 => 165,  370 => 164,  367 => 163,  364 => 162,  362 => 161,  359 => 160,  357 => 159,  351 => 155,  342 => 149,  336 => 146,  329 => 142,  323 => 138,  321 => 137,  303 => 121,  292 => 119,  288 => 117,  286 => 116,  276 => 115,  272 => 113,  270 => 112,  266 => 111,  262 => 109,  260 => 108,  257 => 107,  254 => 106,  251 => 105,  248 => 104,  245 => 103,  243 => 102,  240 => 101,  229 => 80,  226 => 79,  218 => 77,  216 => 76,  210 => 75,  206 => 74,  199 => 69,  197 => 68,  195 => 67,  193 => 66,  191 => 65,  189 => 64,  187 => 63,  185 => 62,  183 => 61,  181 => 60,  179 => 59,  177 => 58,  175 => 57,  173 => 56,  171 => 55,  168 => 53,  165 => 52,  159 => 49,  156 => 48,  153 => 47,  151 => 46,  136 => 37,  134 => 36,  130 => 34,  124 => 32,  118 => 30,  116 => 29,  111 => 28,  109 => 27,  100 => 25,  95 => 23,  88 => 18,  78 => 17,  68 => 1,  65 => 14,  63 => 13,  60 => 10,  57 => 7,  54 => 5,  52 => 4,  50 => 3,  37 => 1,);
  594.     }
  595.     public function getSourceContext()
  596.     {
  597.         return new Source("{% extends base_layout() %}
  598. {% if category.oms is not empty and subcategory.oms is not empty and product.oms is not empty %}
  599.     {% if category.combinedCategoryName is not empty %}
  600.         {% set categorieName = category.combinedCategoryName|capitalize %}
  601.     {% else %}
  602.         {% set categorieName = category.oms|capitalize %}
  603.     {% endif %}
  604.     {% set head_title = product.oms ~ ' | ' ~ subcategory.oms ~ ' | ' ~ categorieName %}
  605. {% endif %}
  606. {% if product.extrainfo is not empty %}
  607.     {% set head_description = product.extrainfo|truncate(200, '...') %}
  608. {% endif %}
  609. {% block content %}
  610.     <div class=\"container\">
  611.         <div class=\"row\">
  612.             <div class=\"col-12 mb-3 pt-5 position-relative\">
  613.                 <h3 class=\"text-primary\">{{ subcategory.oms|capitalize }}</h3>
  614.                 <span class=\"position-absolute top-0 pt-3\">
  615.                     <a href=\"{% if check_websitesetting('product_document', 'document') %}{{ inotherlang('LocalizedDocument', pimcore_website_config('product_document')) }}{% endif %}\">{{ 'Aanbod'|trans }}</a>
  616.                     /
  617.                     {% set categoryLink = app_product_grouplink(category) %}
  618.                     <a href=\"{{ categoryLink }}\">
  619.                         {% if category.combinedCategoryName is not empty %}
  620.                             {{ category.combinedCategoryName|capitalize }}
  621.                         {% else %}
  622.                             {{ category.oms|capitalize }}
  623.                         {% endif %}
  624.                     </a>
  625.                     /
  626.                     {% set subcategoryLink = app_product_subgrouplink(category, subcategory) %}
  627.                     <a href=\"{{ subcategoryLink }}\">{{ subcategory.oms|capitalize }}</a>
  628.                     /
  629.                 </span>
  630.             </div>
  631.         </div>
  632.         <div class=\"row justify-content-between\">
  633.             {% if product.getFotos() is defined %}
  634.                 {% if product.getFotos()|length > 0 %}
  635.                     <div class=\"col-12 col-lg-6 mb-3 mb-lg-0\">
  636.                         <img src=\"{{ product.getFotos().getThumbnail('prod-thumb') }}\" class=\"img-fluid\">
  637.                     </div>
  638.                 {% endif %}
  639.             {% endif %}
  640.             {# {% if product.getImages()|length > 0 %} #}
  641.             {# <div class=\"col-6\"> #}
  642.             {# <ul id=\"lightSlider\"> #}
  643.             {# {% if product.getImages() is defined %} #}
  644.             {# <div class=\"col-md-4 fotoframe\" > #}
  645.             {# {% for productImage in product.getImages() %} #}
  646.             {# {% if productImage is defined %} #}
  647.             {# <li data-thumb=\"{{ productImage.getThumbnail('slideshow-thumb') }}\"><img src=\"{{ productImage.getThumbnail('slideshow-product') }}\" alt=\"{{ product.title }}\" class=\"img-responsive\"></li> #}
  648.             {# {% endif %} #}
  649.             {# {% endfor %} #}
  650.             {# </div> #}
  651.             {# {% endif %} #}
  652.             {# </ul> #}
  653.             {# </div> #}
  654.             {# {% endif %} #}
  655.             <div class=\"col-12 col-lg-6 ps-lg-5\">
  656.                 <div class=\"row mb-3\">
  657.                     <div class=\"col-12\">
  658.                         <h2 class=\"text-primary\">{{ product.oms }}</h2>
  659.                         <i class=\"text-black text-opacity-50\">{{ 'Code:'|trans }} {{ product.code }}</i><br>
  660.                         {% if product.merk is not empty %}
  661.                             <span>{{ 'Merk:'|trans }} {{ product.merk }}</span><br>
  662.                         {% endif %}
  663.                         <div class=\"mt-3\">
  664.                         {{ product.extrainfo|raw }}</div>
  665.                     </div>
  666.                 </div>
  667.                 <div class=\"row mb-5\">
  668.                     <div class=\"col-12\">
  669.                       {#  {% if product.stock <= 0 %}
  670.                             <p><span class=\"stockrood me-1\">
  671.                              <i class=\"fas fa-xs fa-circle\"></i>
  672.                          </span>{{ 'momenteel niet voorradig'|trans|raw }}</p>
  673.                         {% elseif product.stock <= product.aantalVerkochtLaatsteMaand %}
  674.                             <span class=\"stockoranje ms-1\">
  675.                                     <i class=\"fas fa-xs  fa-circle\"></i>
  676.                                 {{ 'beperkte voorraad'|trans|raw }}</span>
  677.                         {% elseif product.stock > product.aantalVerkochtLaatsteMaand %}
  678.                             <span class=\"stockgroen ms-1\">
  679.                                     <i class=\"fas fa-xs fa-circle\"></i>
  680.                                 {{ 'voldoende vooraad'|trans|raw }}</span>
  681.                         {% endif %}#}
  682.                         {% if product.productAPE %}
  683.                             {% set productUnit = product.APEeenheid  %}
  684.                         {% else %}
  685.                             {% set productUnit = 'stuk(s)'  %}
  686.                         {% endif %}
  687.                         {% if product.stock <= 0 %}
  688.                             <p><span class=\"stockrood me-1\">
  689.                              <i class=\"fas fa-xs fa-circle\"></i>
  690.                          </span>{{ 'momenteel niet voorradig *'|trans|raw }}</p>
  691.                         {% elseif product.stock <= product.aantalVerkochtLaatsteMaand %}
  692.                             <span class=\"stockoranje ms-1\">
  693.                                     <i class=\"fas fa-xs  fa-circle\"></i>
  694.                                 {{ 'Beperkt op voorraad, er zijn momenteel '|trans|raw }} {{  product.stock }} {{ productUnit |trans|raw }} {{' in voorraad. *'|trans|raw }}</span>
  695.                         {% elseif product.stock > product.aantalVerkochtLaatsteMaand %}
  696.                             <span class=\"stockgroen ms-1\">
  697.                                     <i class=\"fas fa-xs fa-circle\"></i>
  698.                                 {{ 'Voldoende voorraad, er zijn momenteel '|trans|raw }} {{  product.stock }} {{ productUnit |trans|raw }} {{' in voorraad. *'|trans|raw }}</span>
  699.                         {% endif %}
  700.                     </div>
  701.                 </div>
  702.                 <script>
  703.                     \$(document).ready(function(){
  704.                         \$(\"#myModal\").modal('show');
  705.                     });
  706.                 </script>
  707.                 {% if product.stock <= 0 %}
  708.                     <div id=\"myModal\" class=\"modal fade\" tabindex=\"-1\">
  709.                         <div class=\"modal-dialog\">
  710.                             <div class=\"modal-content\">
  711.                                 <div class=\"modal-header\">
  712.                                     <h5 class=\"modal-title\">{{ 'Momenteel niet op voorraad'|trans }}</h5>
  713.                                     <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
  714.                                 </div>
  715.                                 <div class=\"modal-body\">
  716.                                     <p>{{ 'Opgepast, dit product is momenteel niet op voorraad en levering kan langer duren dan gebruikelijk.'|trans }}</p>
  717.                                 </div>
  718.                                 <div class=\"modal-footer\">
  719.                                     <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">{{ 'Oke'|trans }}</button>
  720.                                 </div>
  721.                             </div>
  722.                         </div>
  723.                     </div>
  724.                 {% endif %}
  725.                 <div class=\"row\">
  726.                     <div class=\"col-12\">
  727.                             {% if product.promoprijs is defined %}
  728.                                 <div class=\"p-3 bg-light-grey bg-opacity-50 w-75 mb-3\">
  729.                                 {% if product.promoprijs > 0 %}
  730.                                     {% if product.productAPE %}
  731.                                         {% set APE = product.prijs * product.AantalPerEenheid %}
  732.                                         {% set APEpromo = product.promoprijs * product.AantalPerEenheid %}
  733.                                         <span class=\"fs-7 text-decoration-underline\">   {{ 'per'|trans }} € {{ product.promoprijs|number_format(2, ',', ' ') }} {{ product.APEeenheid  | trans}} </span>
  734.                                         <br>
  735.                                         <strike>€ {{ APE|number_format(2, ',', ' ') }} | {{ product.AantalPerEenheid }} {{ product.APEeenheid  | trans}}</strike><br>
  736.                                         <span class=\"fw-bold fs-4 text-red\">€ {{ APEpromo|number_format(2, ',', ' ') }}  {{ '/'|trans }} {{ product.AantalPerEenheid }} {{ product.APEeenheid | trans}}</span>
  737.                                     {% else %}
  738.                                         <strike>€ {{ product.prijs|number_format(2, ',', ' ') }}</strike><br>
  739.                                         <span class=\"fw-bold text-red\">€ {{ product.promoprijs|number_format(2, ',', ' ') }}</span>
  740.                                     {% endif %}
  741.                                 {% else %}
  742.                                     {% if product.productAPE %}
  743.                                     <span class=\"fs-7 fw-bold py-5 text-decoration-underline\">
  744.                                        € {{ product.prijs|number_format(2, ',', ' ') }}   {{ 'per'|trans }} {{ product.APEeenheid  | trans }}
  745.                                     </span>
  746.                                 <br>
  747.                                     <div class=\"mt-3 col-6\">
  748.                                         <label for=\"length\">{{ orderByQuantity |trans }}</label>
  749.                                         <input class=\"form-control col-3\" type=\"number\" id=\"length\" name=\"length\" step=\"0.1\" required>
  750.                                     </div>
  751.                                     <div class=\"col-6 d-none\">
  752.                                         <label for=\"width\">{{ 'Breedte in m:'|trans }}</label>
  753.                                         <input class=\"form-control col-3\" type=\"number\" id=\"width\" name=\"width\" step=\"0.1\"
  754.                                                value=\"{{ product.AantalPerEenheid|number_format(2, '.', ' ') }}\" readonly>
  755.                                     </div>
  756.                                     <div class=\"row g-3 align-items-start mt-1\">
  757.                                         <div class=\"col-auto\">
  758.                                             <label for=\"product_amount\" class=\"col-form-label\">{{ ('Aantal ' ~  product.APEeenheid ~  ':') |trans }}</label>
  759.                                         </div>
  760.                                         <div class=\"col-auto\">
  761.                                             <input type=\"number\" id=\"product_amount\" min=\"1\" max=\"999\" value=\"\" readonly class=\"form-control\"/>
  762.                                         </div>
  763.                                         <div class=\"col-auto pt-1\">
  764.             <span class=\"fs-7 fw-bold\" id=\"amount_price\">
  765.                 € {{ product.prijs|number_format(2, ',', ' ') }}
  766.             </span>
  767.                                         </div>
  768.                                         <div class=\"col-auto\">
  769.                                             <button id=\"add_to_cart\" class=\"btn btn-secondary\">
  770.                                                 <i class=\"fas fa-cart-plus\"></i>
  771.                                             </button>
  772.                                         </div>
  773.                                     </div>
  774.                                     <script>
  775.                                         document.addEventListener('DOMContentLoaded', () => {
  776.                                             const lengthInput = document.getElementById('length');
  777.                                             const widthInput = document.getElementById('width');
  778.                                             const totalInput = document.getElementById('product_amount');
  779.                                             const amountPriceSpan = document.getElementById('amount_price');
  780.                                             const pricePerSquareMeter = {{ product.prijs|number_format(2, '.', '') }};
  781.                                             const updateTotal = () => {
  782.                                                 const length = parseFloat(lengthInput.value);
  783.                                                 const width = parseFloat(widthInput.value);
  784.                                                 if (!isNaN(length) && !isNaN(width)) {
  785.                                                     const totalArea = length * width; // Bereken het aantal m²
  786.                                                     const roundedArea = Math.ceil(totalArea); // Rond naar boven af
  787.                                                     const totalPrice = roundedArea * pricePerSquareMeter; // Bereken de totale prijsvolgens afgerond opp
  788.                                                     totalInput.value = roundedArea; // Update aantal m²
  789.                                                     amountPriceSpan.textContent = `€ \${totalPrice.toFixed(2).replace('.', ',')}`; // Update de prijs
  790.                                                 } else {
  791.                                                     totalInput.value = '';
  792.                                                     amountPriceSpan.textContent = `€ \${pricePerSquareMeter.toFixed(2).replace('.', ',')}`;
  793.                                                 }
  794.                                             };
  795.                                             lengthInput.addEventListener('input', updateTotal);
  796.                                             // Zorg ervoor dat de prijs bij het laden correct wordt weergegeven
  797.                                             updateTotal();
  798.                                         });
  799.                                     </script>
  800.                                     {% else %}
  801.                                         <span class=\"fw-bold fs-4\">€ {{ product.prijs|number_format(2, ',', ' ') }}</span>
  802.                                     <div class=\"row g-3 align-items-start mt-1\">
  803.                                         <div class=\"col-auto\">
  804.                                             <label for=\"product_amount\" class=\"col-form-label\">{{ 'Aantal:'|trans }}</label>
  805.                                         </div>
  806.                                         <div class=\"col-auto\">
  807.                                             <input type=\"number\" id=\"product_amount\" min=\"1\" max=\"999\" value=\"1\" class=\"form-control\"/></div>
  808.                                         <div class=\"col-auto\">
  809.                                             <button id=\"add_to_cart\" class=\"btn btn-secondary\"><i class=\"fas fa-cart-plus\"></i></button>
  810.                                         </div>
  811.                                     </div>
  812.                                     {% endif %}
  813.                                 {% endif %}
  814.                                 </div>
  815.                                 <input type=\"hidden\" id=\"product_id\" value=\"{{ product.id }}\">
  816.                                 <span id=\"product_added_confirmation\" class=\"w-100\" style=\"display: none;\"><i class=\"fas fa-check\"></i> {{ \"Toegevoegd aan winkelwagen.\" | trans }}</span>
  817.                             {% endif %}
  818.                     </div>
  819.                 </div>
  820.             </div>
  821.         </div>
  822.     </div>
  823.     <div class=\"row my-5\">
  824.         <div class=\"col-12 text-center\">
  825.             {% set subcategoryLink = app_product_subgrouplink(category, subcategory) %}
  826.             <a class=\"btn btn-outline-secondary\" href=\"{{ subcategoryLink }}\">
  827.                     <span class=\"material-symbols-outlined inline-icon\">
  828. chevron_left
  829. </span> {{ 'Terug naar'|trans }} {{ subcategory.oms }}
  830.             </a>
  831.         </div>
  832.     </div>
  833.     {% if shortLink is defined %}
  834.         {% if shortLink == true %}
  835.             <script>
  836.                 \$('#add_to_cart').click((e)=>{
  837.                     e.preventDefault();
  838.                     let productId = \$('#product_id').val();
  839.                     let amount = \$('#product_amount').val();
  840.                     let fetchUrl = `/\${jsLanguage}/cart/update`;
  841.                     let productAddedCheckMark = \$('#product_added_confirmation');
  842.                     productAddedCheckMark.show();
  843.                     productAddedCheckMark.fadeOut(3000);
  844.                     \$.ajax({
  845.                         url: fetchUrl,
  846.                         cache: false,
  847.                         type:'GET',
  848.                         data: {
  849.                             productId: productId,
  850.                             amount: amount,
  851.                             action: 'add'
  852.                         },
  853.                         success: (data)=>{
  854.                             if (data) {
  855.                                 \$('#amount_in_cart').html(data.cartCount);
  856.                             }
  857.                         },
  858.                         error: function (jqXHR, textStatus, errorThrown) {
  859.                             let errorObj = JSON.parse(jqXHR.responseText);
  860.                         },
  861.                         complete: function () {
  862.                         }
  863.                     })
  864.                 })
  865.             </script>
  866.         {% endif %}
  867.     {% endif %}
  868. {% endblock %}""product/detail.html.twig""/var/www/clients/client2/web42/web/pc/templates/product/detail.html.twig");
  869.     }
  870.     
  871.     public function checkSecurity()
  872.     {
  873.         static $tags = array("if" => 3"set" => 5);
  874.         static $filters = array("capitalize" => 5"truncate" => 14"escape" => 23"trans" => 25"length" => 47"raw" => 80"number_format" => 166);
  875.         static $functions = array("check_websitesetting" => 25"inotherlang" => 25"pimcore_website_config" => 25"app_product_grouplink" => 27"app_product_subgrouplink" => 36"base_layout" => 1);
  876.         try {
  877.             $this->sandbox->checkSecurity(
  878.                 ['if''set'],
  879.                 ['capitalize''truncate''escape''trans''length''raw''number_format'],
  880.                 ['check_websitesetting''inotherlang''pimcore_website_config''app_product_grouplink''app_product_subgrouplink''base_layout']
  881.             );
  882.         } catch (SecurityError $e) {
  883.             $e->setSourceContext($this->source);
  884.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  885.                 $e->setTemplateLine($tags[$e->getTagName()]);
  886.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  887.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  888.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  889.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  890.             }
  891.             throw $e;
  892.         }
  893.     }
  894. }