<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* includes/product-list-item.html.twig */
class __TwigTemplate_57b18913b1d86bb51e73de82966a8177 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/product-list-item.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/product-list-item.html.twig"));
// line 1
$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));
// line 2
echo "
<article class=\"product product--row\">
<div class=\"product__img\">
<favorite-button
product-id=\"";
// line 6
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);
echo "\"
:is-current-favorite=\"";
// line 7
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"));
echo "\"
></favorite-button>
</div>
<div class=\"product__info\">
<div class=\"product__text\">
<p class=\"title\"><a href=\"";
// line 13
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);
echo "\">";
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);
echo "</a></p>
";
// line 14
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)) {
// line 15
echo " <span class=\"d-inline-flex align-items-center mb-1\">
<span class=\"badge bg-danger\">";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Op bestelling!"), "html", null, true);
echo "</span>
";
// line 17
$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));
// line 18
echo " ";
if ((isset($context["orderMessage"]) || array_key_exists("orderMessage", $context) ? $context["orderMessage"] : (function () { throw new RuntimeError('Variable "orderMessage" does not exist.', 18, $this->source); })())) {
// line 19
echo " <ranking-info-button :message=\"";
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);
echo "\"></ranking-info-button>
";
}
// line 21
echo " </span>
";
}
// line 23
echo " <p>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Code"), "html", null, true);
echo ": ";
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);
echo " — ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Merk"), "html", null, true);
echo ": ";
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);
echo "</p>
";
// line 24
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)) {
// line 25
echo " <p>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Categorietype"), "html", null, true);
echo ": ";
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);
echo "</p>
";
}
// line 27
echo " </div>
</div>
<div class=\"product__price\">
";
// line 32
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)) {
// line 33
echo " <div class=\"price ";
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)))) {
// line 34
echo " price--promo
";
}
// line 35
echo "\">";
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);
echo "<small class=\"price-unit\">/";
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);
echo "</small></div>
";
// line 36
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)) {
// line 37
echo " ";
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))) {
// line 38
echo " <p class=\"old-price\">";
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);
echo "</p>
";
}
// line 40
echo " <div class=\"promo\">-";
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);
echo "%</div>
";
}
// line 42
echo " ";
}
// line 43
echo "
";
// line 44
if ((((twig_get_attribute($this->env, $this->source, // line 45
(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
(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)))) {
// line 48
echo " ";
// line 49
echo " ";
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)) {
// line 50
echo "
";
// line 51
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)) {
// line 52
echo " <div class=\"price price--promo\">";
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);
echo "<small class=\"price-unit\">/";
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);
echo "</small></div>
";
}
// line 54
echo " ";
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)) {
// line 55
echo " <div class=\"promo\">-";
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);
echo "%</div>
";
}
// line 57
echo " ";
}
// line 58
echo "
<p class=\"date\">(";
// line 59
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Promotie vanaf"), "html", null, true);
echo " ";
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);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("tot"), "html", null, true);
echo " ";
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);
echo ")</p>
";
}
// line 61
echo " </div>
<div class=\"product__controls\">
";
// line 65
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); })()))) {
// line 66
echo " <change-cartitem-quantity
product-id=\"";
// line 67
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);
echo "\"
:current-quantity=\"";
// line 68
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);
echo "\"
unit=\"";
// line 69
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);
echo "\"
minimum-unit=\"";
// line 70
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);
echo "\"
></change-cartitem-quantity>
<remove-cart-item-button
product-id=\"";
// line 73
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);
echo "\"
></remove-cart-item-button>
";
} else {
// line 76
echo " <add-to-cart
product-id=\"";
// line 77
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);
echo "\"
unit=\"";
// line 78
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);
echo "\"
minimum-unit=\"";
// line 79
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);
echo "\"
amount-in-cart=\"";
// line 80
(((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)));
echo "\"
></add-to-cart>
";
}
// line 83
echo " </div>
</article>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "includes/product-list-item.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% set detailLink = app_product_detaillink(item) %}
<article class=\"product product--row\">
<div class=\"product__img\">
<favorite-button
product-id=\"{{ item.id }}\"
:is-current-favorite=\"{{ item.id in favoriteIds ? 'true' : 'false' }}\"
></favorite-button>
</div>
<div class=\"product__info\">
<div class=\"product__text\">
<p class=\"title\"><a href=\"{{ detailLink }}\">{{ item.name }}</a></p>
{% if item.onOrder %}
<span class=\"d-inline-flex align-items-center mb-1\">
<span class=\"badge bg-danger\">{{ 'Op bestelling!'|trans }}</span>
{% set orderMessage = product_order_message(item) %}
{% if orderMessage %}
<ranking-info-button :message=\"{{ orderMessage|json_encode }}\"></ranking-info-button>
{% endif %}
</span>
{% endif %}
<p>{{ 'Code'|trans }}: {{ item.code }} — {{ 'Merk'|trans }}: {{ item.brand }}</p>
{% if item.categoryTypes %}
<p>{{ 'Categorietype'|trans }}: {{ item.categoryTypes|map(t => t.name)|join(', ') }}</p>
{% endif %}
</div>
</div>
<div class=\"product__price\">
{% if not item.OSPrice.getAmount.isZero %}
<div class=\"price {% if item.promoDate1 and item.promoDate2 and date(item.promoDate1) < date() and date(item.promoDate2) > date() %}
price--promo
{% endif %}\">{{ item.OSPrice }}<small class=\"price-unit\">/{{ item.unit }}</small></div>
{% if( item.discount ) %}
{% if( item.OSPrice != item.OSDefaultPrice ) %}
<p class=\"old-price\">{{ item.OSDefaultPrice }}</p>
{% endif %}
<div class=\"promo\">-{{ item.discount }}%</div>
{% endif %}
{% endif %}
{% if
item.promoDate1 and item.promoDate2 and
date(item.promoDate1) < date() and date(item.promoDate2) > date()
%}
{# Show promo price even when prices should not show #}
{% if item.OSPrice.getAmount.isZero %}
{% if item.promoPrice %}
<div class=\"price price--promo\">{{ item.promoPrice | currency }}<small class=\"price-unit\">/{{ item.unit }}</small></div>
{% endif %}
{% if( item.promoPercentage ) %}
<div class=\"promo\">-{{ item.promoPercentage }}%</div>
{% endif %}
{% endif %}
<p class=\"date\">({{ 'Promotie vanaf'|trans}} {{ item.promoDate1|date('d/m/Y') }} {{'tot'|trans}} {{ item.promoDate2|date('d/m/Y') }})</p>
{% endif %}
</div>
<div class=\"product__controls\">
{% if cartList is defined and cartList %}
<change-cartitem-quantity
product-id=\"{{ item.id }}\"
:current-quantity=\"{{ cartItem.count }}\"
unit=\"{{ item.unit }}\"
minimum-unit=\"{{ item.unitMinimum }}\"
></change-cartitem-quantity>
<remove-cart-item-button
product-id=\"{{ item.id }}\"
></remove-cart-item-button>
{% else %}
<add-to-cart
product-id=\"{{ item.id }}\"
unit=\"{{ item.unit }}\"
minimum-unit=\"{{ item.unitMinimum }}\"
amount-in-cart=\"{{ cartItems[item.id] ?? 0 }}\"
></add-to-cart>
{% endif %}
</div>
</article>", "includes/product-list-item.html.twig", "/data/sites/web/devliegerfilipbe/subsites/dev.devliegerfilip.dspdev.be/templates/includes/product-list-item.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 1, "if" => 14);
static $filters = array("escape" => 6, "trans" => 16, "json_encode" => 19, "join" => 25, "map" => 25, "currency" => 52, "date" => 59);
static $functions = array("app_product_detaillink" => 1, "product_order_message" => 17, "date" => 33);
try {
$this->sandbox->checkSecurity(
['set', 'if'],
['escape', 'trans', 'json_encode', 'join', 'map', 'currency', 'date'],
['app_product_detaillink', 'product_order_message', 'date']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}