var/cache/dev/twig/44/44ebf936626a95050936e6b70831aba0.php line 124

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. /* includes/product-list-item.html.twig */
  14. class __TwigTemplate_57b18913b1d86bb51e73de82966a8177 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->parent = false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros = $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/product-list-item.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/product-list-item.html.twig"));
  35.         // line 1
  36.         $context["detailLink"] = $this->extensions['App\Twig\Extension\ProductPageExtension']->generateLink($this->sandbox->ensureToStringAllowed((isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 1, $this->source); })()), 1, $this->source));
  37.         // line 2
  38.         echo "
  39. <article class=\"product product--row\">
  40.     <div class=\"product__img\">
  41.         <favorite-button
  42.             product-id=\"";
  43.         // line 6
  44.         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 6, $this->source); })()), "id", [], "any", false, false, true, 6), 6, $this->source), "html", null, true);
  45.         echo "\"
  46.             :is-current-favorite=\"";
  47.         // line 7
  48.         echo ((twig_in_filter(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 7, $this->source); })()), "id", [], "any", false, false, true, 7), (isset($context["favoriteIds"]) || array_key_exists("favoriteIds", $context) ? $context["favoriteIds"] : (function () { throw new RuntimeError('Variable "favoriteIds" does not exist.', 7, $this->source); })()))) ? ("true") : ("false"));
  49.         echo "\"
  50.         ></favorite-button>
  51.     </div>
  52.     <div class=\"product__info\">
  53.         <div class=\"product__text\">
  54.             <p class=\"title\"><a href=\"";
  55.         // line 13
  56.         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["detailLink"]) || array_key_exists("detailLink", $context) ? $context["detailLink"] : (function () { throw new RuntimeError('Variable "detailLink" does not exist.', 13, $this->source); })()), 13, $this->source), "html", null, true);
  57.         echo "\">";
  58.         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 13, $this->source); })()), "name", [], "any", false, false, true, 13), 13, $this->source), "html", null, true);
  59.         echo "</a></p>
  60.         ";
  61.         // line 14
  62.         if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 14, $this->source); })()), "onOrder", [], "any", false, false, true, 14)) {
  63.             // line 15
  64.             echo "            <span class=\"d-inline-flex align-items-center mb-1\">
  65.                 <span class=\"badge bg-danger\">";
  66.             // line 16
  67.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Op bestelling!"), "html", null, true);
  68.             echo "</span>
  69.                 ";
  70.             // line 17
  71.             $context["orderMessage"] = $this->extensions['App\Twig\Extension\ProductRankingExtension']->getProductOrderMessage($this->sandbox->ensureToStringAllowed((isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 17, $this->source); })()), 17, $this->source));
  72.             // line 18
  73.             echo "                ";
  74.             if ((isset($context["orderMessage"]) || array_key_exists("orderMessage", $context) ? $context["orderMessage"] : (function () { throw new RuntimeError('Variable "orderMessage" does not exist.', 18, $this->source); })())) {
  75.                 // line 19
  76.                 echo "                    <ranking-info-button :message=\"";
  77.                 echo twig_escape_filter($this->env, json_encode($this->sandbox->ensureToStringAllowed((isset($context["orderMessage"]) || array_key_exists("orderMessage", $context) ? $context["orderMessage"] : (function () { throw new RuntimeError('Variable "orderMessage" does not exist.', 19, $this->source); })()), 19, $this->source)), "html", null, true);
  78.                 echo "\"></ranking-info-button>
  79.                 ";
  80.             }
  81.             // line 21
  82.             echo "            </span>
  83.         ";
  84.         }
  85.         // line 23
  86.         echo "            <p>";
  87.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Code"), "html", null, true);
  88.         echo ": ";
  89.         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 23, $this->source); })()), "code", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
  90.         echo " — ";
  91.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Merk"), "html", null, true);
  92.         echo ": ";
  93.         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 23, $this->source); })()), "brand", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
  94.         echo "</p>
  95.             ";
  96.         // line 24
  97.         if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 24, $this->source); })()), "categoryTypes", [], "any", false, false, true, 24)) {
  98.             // line 25
  99.             echo "                <p>";
  100.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Categorietype"), "html", null, true);
  101.             echo ": ";
  102.             echo twig_escape_filter($this->env, twig_join_filter(twig_array_map($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 25, $this->source); })()), "categoryTypes", [], "any", false, false, true, 25), 25, $this->source), function ($__t__) use ($context, $macros) { $context["t"] = $__t__; return twig_get_attribute($this->env, $this->source, (isset($context["t"]) || array_key_exists("t", $context) ? $context["t"] : (function () { throw new RuntimeError('Variable "t" does not exist.', 25, $this->source); })()), "name", [], "any", false, false, true, 25); }), ", "), "html", null, true);
  103.             echo "</p>
  104.             ";
  105.         }
  106.         // line 27
  107.         echo "        </div>
  108.     </div>
  109.         <div class=\"product__price\">
  110.             ";
  111.         // line 32
  112.         if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 32, $this->source); })()), "OSPrice", [], "any", false, false, true, 32), "getAmount", [], "any", false, false, true, 32), "isZero", [], "any", false, false, true, 32)) {
  113.             // line 33
  114.             echo "                <div class=\"price ";
  115.             if ((((twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 33, $this->source); })()), "promoDate1", [], "any", false, false, true, 33) && twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 33, $this->source); })()), "promoDate2", [], "any", false, false, true, 33)) && (twig_date_converter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 33, $this->source); })()), "promoDate1", [], "any", false, false, true, 33)) < twig_date_converter($this->env))) && (twig_date_converter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 33, $this->source); })()), "promoDate2", [], "any", false, false, true, 33)) > twig_date_converter($this->env)))) {
  116.                 // line 34
  117.                 echo "                    price--promo
  118.                 ";
  119.             }
  120.             // line 35
  121.             echo "\">";
  122.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 35, $this->source); })()), "OSPrice", [], "any", false, false, true, 35), 35, $this->source), "html", null, true);
  123.             echo "<small class=\"price-unit\">/";
  124.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 35, $this->source); })()), "unit", [], "any", false, false, true, 35), 35, $this->source), "html", null, true);
  125.             echo "</small></div>
  126.                 ";
  127.             // line 36
  128.             if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 36, $this->source); })()), "discount", [], "any", false, false, true, 36)) {
  129.                 // line 37
  130.                 echo "                    ";
  131.                 if ((twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 37, $this->source); })()), "OSPrice", [], "any", false, false, true, 37) != twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 37, $this->source); })()), "OSDefaultPrice", [], "any", false, false, true, 37))) {
  132.                     // line 38
  133.                     echo "                        <p class=\"old-price\">";
  134.                     echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 38, $this->source); })()), "OSDefaultPrice", [], "any", false, false, true, 38), 38, $this->source), "html", null, true);
  135.                     echo "</p>
  136.                     ";
  137.                 }
  138.                 // line 40
  139.                 echo "                    <div class=\"promo\">-";
  140.                 echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 40, $this->source); })()), "discount", [], "any", false, false, true, 40), 40, $this->source), "html", null, true);
  141.                 echo "%</div>
  142.                 ";
  143.             }
  144.             // line 42
  145.             echo "            ";
  146.         }
  147.         // line 43
  148.         echo "
  149.             ";
  150.         // line 44
  151.         if ((((twig_get_attribute($this->env, $this->source,         // line 45
  152. (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 45, $this->source); })()), "promoDate1", [], "any", false, false, true, 45) && twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 45, $this->source); })()), "promoDate2", [], "any", false, false, true, 45)) && (twig_date_converter($this->env, twig_get_attribute($this->env, $this->source,         // line 46
  153. (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 46, $this->source); })()), "promoDate1", [], "any", false, false, true, 46)) < twig_date_converter($this->env))) && (twig_date_converter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 46, $this->source); })()), "promoDate2", [], "any", false, false, true, 46)) > twig_date_converter($this->env)))) {
  154.             // line 48
  155.             echo "                ";
  156.             // line 49
  157.             echo "                ";
  158.             if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 49, $this->source); })()), "OSPrice", [], "any", false, false, true, 49), "getAmount", [], "any", false, false, true, 49), "isZero", [], "any", false, false, true, 49)) {
  159.                 // line 50
  160.                 echo "
  161.                     ";
  162.                 // line 51
  163.                 if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 51, $this->source); })()), "promoPrice", [], "any", false, false, true, 51)) {
  164.                     // line 52
  165.                     echo "                        <div class=\"price price--promo\">";
  166.                     echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\CurrencyExtension']->format($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 52, $this->source); })()), "promoPrice", [], "any", false, false, true, 52), 52, $this->source)), "html", null, true);
  167.                     echo "<small class=\"price-unit\">/";
  168.                     echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 52, $this->source); })()), "unit", [], "any", false, false, true, 52), 52, $this->source), "html", null, true);
  169.                     echo "</small></div>
  170.                     ";
  171.                 }
  172.                 // line 54
  173.                 echo "                    ";
  174.                 if (twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 54, $this->source); })()), "promoPercentage", [], "any", false, false, true, 54)) {
  175.                     // line 55
  176.                     echo "                        <div class=\"promo\">-";
  177.                     echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 55, $this->source); })()), "promoPercentage", [], "any", false, false, true, 55), 55, $this->source), "html", null, true);
  178.                     echo "%</div>
  179.                     ";
  180.                 }
  181.                 // line 57
  182.                 echo "                ";
  183.             }
  184.             // line 58
  185.             echo "
  186.                 <p class=\"date\">(";
  187.             // line 59
  188.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Promotie vanaf"), "html", null, true);
  189.             echo " ";
  190.             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 59, $this->source); })()), "promoDate1", [], "any", false, false, true, 59), 59, $this->source), "d/m/Y"), "html", null, true);
  191.             echo " ";
  192.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("tot"), "html", null, true);
  193.             echo " ";
  194.             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 59, $this->source); })()), "promoDate2", [], "any", false, false, true, 59), 59, $this->source), "d/m/Y"), "html", null, true);
  195.             echo ")</p>
  196.             ";
  197.         }
  198.         // line 61
  199.         echo "        </div>
  200.     <div class=\"product__controls\">
  201.        ";
  202.         // line 65
  203.         if ((array_key_exists("cartList", $context) && (isset($context["cartList"]) || array_key_exists("cartList", $context) ? $context["cartList"] : (function () { throw new RuntimeError('Variable "cartList" does not exist.', 65, $this->source); })()))) {
  204.             // line 66
  205.             echo "           <change-cartitem-quantity
  206.                product-id=\"";
  207.             // line 67
  208.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 67, $this->source); })()), "id", [], "any", false, false, true, 67), 67, $this->source), "html", null, true);
  209.             echo "\"
  210.                :current-quantity=\"";
  211.             // line 68
  212.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["cartItem"]) || array_key_exists("cartItem", $context) ? $context["cartItem"] : (function () { throw new RuntimeError('Variable "cartItem" does not exist.', 68, $this->source); })()), "count", [], "any", false, false, true, 68), 68, $this->source), "html", null, true);
  213.             echo "\"
  214.                unit=\"";
  215.             // line 69
  216.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 69, $this->source); })()), "unit", [], "any", false, false, true, 69), 69, $this->source), "html", null, true);
  217.             echo "\"
  218.                minimum-unit=\"";
  219.             // line 70
  220.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 70, $this->source); })()), "unitMinimum", [], "any", false, false, true, 70), 70, $this->source), "html", null, true);
  221.             echo "\"
  222.            ></change-cartitem-quantity>
  223.            <remove-cart-item-button
  224.                product-id=\"";
  225.             // line 73
  226.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 73, $this->source); })()), "id", [], "any", false, false, true, 73), 73, $this->source), "html", null, true);
  227.             echo "\"
  228.            ></remove-cart-item-button>
  229.         ";
  230.         } else {
  231.             // line 76
  232.             echo "            <add-to-cart
  233.                 product-id=\"";
  234.             // line 77
  235.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 77, $this->source); })()), "id", [], "any", false, false, true, 77), 77, $this->source), "html", null, true);
  236.             echo "\"
  237.                 unit=\"";
  238.             // line 78
  239.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 78, $this->source); })()), "unit", [], "any", false, false, true, 78), 78, $this->source), "html", null, true);
  240.             echo "\"
  241.                 minimum-unit=\"";
  242.             // line 79
  243.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 79, $this->source); })()), "unitMinimum", [], "any", false, false, true, 79), 79, $this->source), "html", null, true);
  244.             echo "\"
  245.                 amount-in-cart=\"";
  246.             // line 80
  247.             (((twig_get_attribute($this->env, $this->source, ($context["cartItems"] ?? null), twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 80, $this->source); })()), "id", [], "any", false, false, true, 80), [], "array", true, true, true, 80) &&  !(null === twig_get_attribute($this->env, $this->source, ($context["cartItems"] ?? null), twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 80, $this->source); })()), "id", [], "any", false, false, true, 80), [], "array", false, false, true, 80)))) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["cartItems"] ?? null), twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 80, $this->source); })()), "id", [], "any", false, false, true, 80), [], "array", false, false, true, 80), "html", null, true))) : (print (0)));
  248.             echo "\"
  249.             ></add-to-cart>
  250.         ";
  251.         }
  252.         // line 83
  253.         echo "    </div>
  254. </article>";
  255.         
  256.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  257.         
  258.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  259.     }
  260.     public function getTemplateName()
  261.     {
  262.         return "includes/product-list-item.html.twig";
  263.     }
  264.     public function isTraitable()
  265.     {
  266.         return false;
  267.     }
  268.     public function getDebugInfo()
  269.     {
  270.         return array (  267 => 83,  261 => 80,  257 => 79,  253 => 78,  249 => 77,  246 => 76,  240 => 73,  234 => 70,  230 => 69,  226 => 68,  222 => 67,  219 => 66,  217 => 65,  211 => 61,  200 => 59,  197 => 58,  194 => 57,  188 => 55,  185 => 54,  177 => 52,  175 => 51,  172 => 50,  169 => 49,  167 => 48,  165 => 46,  164 => 45,  163 => 44,  160 => 43,  157 => 42,  151 => 40,  145 => 38,  142 => 37,  140 => 36,  133 => 35,  129 => 34,  126 => 33,  124 => 32,  117 => 27,  109 => 25,  107 => 24,  96 => 23,  92 => 21,  86 => 19,  83 => 18,  81 => 17,  77 => 16,  74 => 15,  72 => 14,  66 => 13,  57 => 7,  53 => 6,  47 => 2,  45 => 1,);
  271.     }
  272.     public function getSourceContext()
  273.     {
  274.         return new Source("{% set detailLink = app_product_detaillink(item) %}
  275. <article class=\"product product--row\">
  276.     <div class=\"product__img\">
  277.         <favorite-button
  278.             product-id=\"{{ item.id }}\"
  279.             :is-current-favorite=\"{{ item.id in favoriteIds ? 'true' : 'false' }}\"
  280.         ></favorite-button>
  281.     </div>
  282.     <div class=\"product__info\">
  283.         <div class=\"product__text\">
  284.             <p class=\"title\"><a href=\"{{ detailLink }}\">{{ item.name }}</a></p>
  285.         {% if item.onOrder %}
  286.             <span class=\"d-inline-flex align-items-center mb-1\">
  287.                 <span class=\"badge bg-danger\">{{ 'Op bestelling!'|trans }}</span>
  288.                 {% set orderMessage = product_order_message(item) %}
  289.                 {% if orderMessage %}
  290.                     <ranking-info-button :message=\"{{ orderMessage|json_encode }}\"></ranking-info-button>
  291.                 {% endif %}
  292.             </span>
  293.         {% endif %}
  294.             <p>{{ 'Code'|trans }}: {{ item.code }} — {{ 'Merk'|trans }}: {{ item.brand }}</p>
  295.             {% if item.categoryTypes %}
  296.                 <p>{{ 'Categorietype'|trans }}: {{ item.categoryTypes|map(t => t.name)|join(', ') }}</p>
  297.             {% endif %}
  298.         </div>
  299.     </div>
  300.         <div class=\"product__price\">
  301.             {% if not item.OSPrice.getAmount.isZero %}
  302.                 <div class=\"price {% if item.promoDate1 and item.promoDate2 and date(item.promoDate1) < date() and date(item.promoDate2) > date() %}
  303.                     price--promo
  304.                 {% endif %}\">{{ item.OSPrice }}<small class=\"price-unit\">/{{ item.unit }}</small></div>
  305.                 {% if( item.discount ) %}
  306.                     {% if( item.OSPrice != item.OSDefaultPrice )  %}
  307.                         <p class=\"old-price\">{{ item.OSDefaultPrice }}</p>
  308.                     {% endif %}
  309.                     <div class=\"promo\">-{{ item.discount }}%</div>
  310.                 {% endif %}
  311.             {% endif %}
  312.             {% if
  313.                 item.promoDate1 and item.promoDate2 and
  314.                 date(item.promoDate1) < date() and date(item.promoDate2) > date()
  315.             %}
  316.                 {# Show promo price even when prices should not show #}
  317.                 {% if item.OSPrice.getAmount.isZero %}
  318.                     {% if item.promoPrice %}
  319.                         <div class=\"price price--promo\">{{ item.promoPrice | currency }}<small class=\"price-unit\">/{{ item.unit }}</small></div>
  320.                     {% endif %}
  321.                     {% if( item.promoPercentage ) %}
  322.                         <div class=\"promo\">-{{ item.promoPercentage }}%</div>
  323.                     {% endif %}
  324.                 {% endif %}
  325.                 <p class=\"date\">({{ 'Promotie vanaf'|trans}} {{ item.promoDate1|date('d/m/Y') }} {{'tot'|trans}} {{ item.promoDate2|date('d/m/Y') }})</p>
  326.             {% endif %}
  327.         </div>
  328.     <div class=\"product__controls\">
  329.        {% if cartList is defined and cartList %}
  330.            <change-cartitem-quantity
  331.                product-id=\"{{ item.id }}\"
  332.                :current-quantity=\"{{ cartItem.count }}\"
  333.                unit=\"{{ item.unit }}\"
  334.                minimum-unit=\"{{ item.unitMinimum }}\"
  335.            ></change-cartitem-quantity>
  336.            <remove-cart-item-button
  337.                product-id=\"{{ item.id }}\"
  338.            ></remove-cart-item-button>
  339.         {% else %}
  340.             <add-to-cart
  341.                 product-id=\"{{ item.id }}\"
  342.                 unit=\"{{ item.unit }}\"
  343.                 minimum-unit=\"{{ item.unitMinimum }}\"
  344.                 amount-in-cart=\"{{ cartItems[item.id] ?? 0 }}\"
  345.             ></add-to-cart>
  346.         {% endif %}
  347.     </div>
  348. </article>", "includes/product-list-item.html.twig", "/data/sites/web/devliegerfilipbe/subsites/dev.devliegerfilip.dspdev.be/templates/includes/product-list-item.html.twig");
  349.     }
  350.     
  351.     public function checkSecurity()
  352.     {
  353.         static $tags = array("set" => 1, "if" => 14);
  354.         static $filters = array("escape" => 6, "trans" => 16, "json_encode" => 19, "join" => 25, "map" => 25, "currency" => 52, "date" => 59);
  355.         static $functions = array("app_product_detaillink" => 1, "product_order_message" => 17, "date" => 33);
  356.         try {
  357.             $this->sandbox->checkSecurity(
  358.                 ['set', 'if'],
  359.                 ['escape', 'trans', 'json_encode', 'join', 'map', 'currency', 'date'],
  360.                 ['app_product_detaillink', 'product_order_message', 'date']
  361.             );
  362.         } catch (SecurityError $e) {
  363.             $e->setSourceContext($this->source);
  364.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  365.                 $e->setTemplateLine($tags[$e->getTagName()]);
  366.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  367.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  368.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  369.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  370.             }
  371.             throw $e;
  372.         }
  373.     }
  374. }