var/cache/dev/twig/6e/6e11f1878353cd5d58ac8a0453be2fc7473b43eff87c5d35a637238f23c0c6d3.php line 34

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. /* frontend/productMasonry.html.twig */
  14. class __TwigTemplate_4d231d4decfc66a6c382465bb358cf2d5803e2f298f7c3f824b97f855a3a1b3e extends \Twig\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.             'masonryProducts' => [$this, 'block_masonryProducts'],
  25.         ];
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros = $this->macros;
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "frontend/productMasonry.html.twig"));
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "frontend/productMasonry.html.twig"));
  34.         // line 1
  35.         $this->displayBlock('masonryProducts', $context, $blocks);
  36.         // line 230
  37.         echo "
  38. ";
  39.         // line 231
  40.         if (((isset($context["products"]) || array_key_exists("products", $context)) && (isset($context["noPagination"]) || array_key_exists("noPagination", $context)))) {
  41.             // line 232
  42.             echo "  ";
  43.             if ((isset($context["noPagination"]) || array_key_exists("noPagination", $context) ? $context["noPagination"] : (function () { throw new RuntimeError('Variable "noPagination" does not exist.', 232, $this->source); })())) {
  44.                 // line 233
  45.                 echo "    <script>
  46.         function updateLoader() {
  47.             if (document.getElementsByClassName('masonry-product').length ==
  48.                 parseInt(document.getElementById('amountProducts').innerText)
  49.                 &&
  50.                 document.getElementById('product-loader')
  51.             ) {
  52.                 document.getElementById('product-loader').style.display = 'none';
  53.             }
  54.         }
  55.         updateLoader();
  56.         document.addEventListener(\"DOMContentLoaded\", updateLoader);
  57.     </script>
  58.   ";
  59.             }
  60.         }
  61.         // line 249
  62.         echo "
  63. ";
  64.         // line 250
  65.         if (((isset($context["products"]) || array_key_exists("products", $context)) &&  !(isset($context["noPagination"]) || array_key_exists("noPagination", $context)))) {
  66.             // line 251
  67.             echo "    <script>
  68.         if( typeof lazyload !== 'undefined')
  69.             lazyload();
  70.         var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
  71.         if(supportsTouch){
  72.             var elems = document.querySelectorAll(\".button-touch\");
  73.             [].forEach.call(elems, function(el) {
  74.                 el.classList.remove(\"d-none\");
  75.             });
  76.         }
  77.         //console.log('Binding add to cart');
  78.         function updateLoader() {
  79.             if (document.getElementsByClassName('masonry-product').length ==
  80.                 parseInt(document.getElementById('amountProducts').innerText)
  81.                 &&
  82.                 document.getElementById('product-loader')
  83.             ) {
  84.                 document.getElementById('product-loader').style.display = 'none';
  85.             }
  86.         }
  87.         updateLoader();
  88.         document.addEventListener(\"DOMContentLoaded\", updateLoader);
  89.         function addToCart()
  90.         {
  91.             console.log('Masonry add to cart called');
  92.             event.preventDefault();
  93.             var type= this.getAttribute(\"data-type\");
  94.             var id= this.getAttribute(\"data-id\");
  95.             var quantityWidget = this.getAttribute('data-quantity');
  96.             if(quantityWidget && document.getElementById(quantityWidget)){
  97.                 var quantity = document.getElementById(quantityWidget).value;
  98.             }else
  99.                 var quantity = 1;
  100.             var xmlHttp = new XMLHttpRequest();
  101.             xmlHttp.onreadystatechange = function()
  102.             {
  103.                 if(xmlHttp.readyState == 4 && xmlHttp.status == 200)
  104.                 {
  105.                     var total = parseInt(document.getElementById('menu-cart-count').innerHTML);
  106.                     document.getElementById('menu-cart-count').innerHTML = total+1;
  107.                     document.getElementById('menu-cart-count').style.display = 'block';;
  108.                     window.addToCartNotification++;
  109.                     var json = JSON.parse(xmlHttp.responseText);
  110.                     console.log(json);
  111.                     if(document.getElementById('menu_subtotal_cart'))
  112.                         document.getElementById('menu_subtotal_cart').innerHTML = json.totalCart;
  113.                     if(document.getElementById('mobile_menu_subtotal_cart'))
  114.                         document.getElementById('mobile_menu_subtotal_cart').innerHTML = json.totalCart;
  115.                 }
  116.             }
  117.             //xmlHttp.open(\"post\", '/API/cart/add/'+id+'/'+quantity);
  118.             var subscribe = this.getAttribute('data-subscribe');
  119.             if( subscribe )
  120.                 xmlHttp.open(\"post\", '/API/cart/add/'+id+'/'+quantity+'/'+subscribe);
  121.             else
  122.                 xmlHttp.open(\"post\", '/API/cart/add/'+id+'/'+quantity);
  123.             xmlHttp.send();
  124.             /*
  125.             \$.ajax({
  126.                 url: Routing.generate('addToCart', {id: id, quantity: quantity}),
  127.                 method: 'POST',
  128.                 dataType: 'json',
  129.                 complete: _this.addedToCart
  130.             });
  131.              */
  132.         }
  133.         var classname = document.getElementsByClassName(\"add-to-cart\");
  134.         for (var i = 0; i < classname.length; i++) {
  135.             if(!classname[i].classList.contains(\"binded\")){
  136.                 var classString = classname[i].className;
  137.                 var newClass = classString.concat(\" binded\");
  138.                 classname[i].className = newClass;
  139.                 classname[i].addEventListener('click', addToCart, false);
  140.             }
  141.         }
  142.     </script>
  143.     ";
  144.             // line 355
  145.             echo "    
  146.     <div id=\"paginatorDefaultPage\" class=\"d-none\">";
  147.             // line 358
  148.             echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 358, $this->source); })()));
  149.             echo "</div>
  150.     
  151.        
  152. ";
  153.         }
  154.         
  155.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  156.         
  157.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  158.     }
  159.     // line 1
  160.     public function block_masonryProducts($context, array $blocks = [])
  161.     {
  162.         $macros = $this->macros;
  163.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  164.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "masonryProducts"));
  165.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  166.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "masonryProducts"));
  167.         // line 2
  168.         echo "
  169.   <div class=\"row mobile_product_row\">
  170.     ";
  171.         // line 4
  172.         $context['_parent'] = $context;
  173.         $context['_seq'] = twig_ensure_traversable((isset($context["masonryProducts"]) || array_key_exists("masonryProducts", $context) ? $context["masonryProducts"] : (function () { throw new RuntimeError('Variable "masonryProducts" does not exist.', 4, $this->source); })()));
  174.         foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  175.             // line 5
  176.             echo "    <div class=\"col-xs-6 col-sm-6 col-md-3 pb-5 mobile_product_box\">
  177.       ";
  178.             // line 7
  179.             echo "        <div class=\"masonry-product\" data-product=\"";
  180.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 7), "html", null, true);
  181.             echo "\">
  182.             ";
  183.             // line 9
  184.             echo "                <div class=\"product-group\">
  185.                     ";
  186.             // line 10
  187.             if (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 10, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 10)) {
  188.                 // line 11
  189.                 echo "                        <a href=\"";
  190.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewProductInAssociation", ["producerUrl" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 11), "UrlName", [], "any", false, false, false, 11), "productName" => twig_get_attribute($this->env, $this->source, $context["product"], "UrlName", [], "any", false, false, false, 11), "id" => twig_get_attribute($this->env, $this->source, $context["product"], "Id", [], "any", false, false, false, 11), "groupUrlName" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 11, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 11), "urlName", [], "any", false, false, false, 11)]), "html", null, true);
  191.                 echo "\"
  192.                                 ";
  193.                 // line 12
  194.                 if ((twig_get_attribute($this->env, $this->source, $context["product"], "isDisplayedInAssociationOnly", [], "any", false, false, false, 12) && (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 12, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 12) == false))) {
  195.                     echo "  style=\"color: red !important;\" ";
  196.                 }
  197.                 // line 13
  198.                 echo "                        >
  199.                         ";
  200.             } else {
  201.                 // line 15
  202.                 echo "                        <a href=\"";
  203.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewProduct", ["producerUrl" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 15), "UrlName", [], "any", false, false, false, 15), "productName" => twig_get_attribute($this->env, $this->source, $context["product"], "UrlName", [], "any", false, false, false, 15), "id" => twig_get_attribute($this->env, $this->source, $context["product"], "Id", [], "any", false, false, false, 15)]), "html", null, true);
  204.                 echo "\"
  205.                                 ";
  206.                 // line 16
  207.                 if ((twig_get_attribute($this->env, $this->source, $context["product"], "isDisplayedInAssociationOnly", [], "any", false, false, false, 16) && (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 16, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 16) == false))) {
  208.                     echo "  style=\"color: red !important;\" ";
  209.                 }
  210.                 // line 17
  211.                 echo "                        >
  212.                         ";
  213.             }
  214.             // line 19
  215.             echo "
  216.                         ";
  217.             // line 20
  218.             if ((isset($context["forcedProductThumbnail"]) || array_key_exists("forcedProductThumbnail", $context))) {
  219.                 // line 21
  220.                 echo "                            ";
  221.                 $context["size"] = (isset($context["forcedProductThumbnail"]) || array_key_exists("forcedProductThumbnail", $context) ? $context["forcedProductThumbnail"] : (function () { throw new RuntimeError('Variable "forcedProductThumbnail" does not exist.', 21, $this->source); })());
  222.                 // line 22
  223.                 echo "                        ";
  224.             } else {
  225.                 // line 23
  226.                 echo "                            ";
  227.                 $context["size"] = "250";
  228.                 // line 24
  229.                 echo "                        ";
  230.             }
  231.             // line 25
  232.             echo "
  233.                         ";
  234.             // line 26
  235.             if (twig_get_attribute($this->env, $this->source, $context["product"], "mainImage", [], "any", false, false, false, 26)) {
  236.                 // line 27
  237.                 echo "                            <img id=\"masonry-product-image-";
  238.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 27), "html", null, true);
  239.                 echo "\" class=\"product-image lazyload\" src=\"/images/none.png\" data-src=\"";
  240.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("getImageAsCroppedThumb", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "mainImage", [], "any", false, false, false, 27), "Id", [], "any", false, false, false, 27), "height" => (isset($context["size"]) || array_key_exists("size", $context) ? $context["size"] : (function () { throw new RuntimeError('Variable "size" does not exist.', 27, $this->source); })()), "width" => (isset($context["size"]) || array_key_exists("size", $context) ? $context["size"] : (function () { throw new RuntimeError('Variable "size" does not exist.', 27, $this->source); })())]), "html", null, true);
  241.                 echo "\"   style=\"margin-left: auto; margin-right: auto;\">
  242.                         ";
  243.             } else {
  244.                 // line 29
  245.                 echo "                            <img id=\"masonry-product-image-";
  246.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 29), "html", null, true);
  247.                 echo "\"  class=\"product-image\" src=\"/assets/frontend/images/noProductPicture.jpg\" style=\"margin-left: auto; margin-right: auto;\">
  248.                         ";
  249.             }
  250.             // line 31
  251.             echo "
  252.                     </a>
  253.                     <div class=\"product-btn\">
  254.                         <button type=\"button\" class=\"product-btn-overview\"
  255.                                               data-toggle=\"modal\"
  256.                                               data-target=\"#previewProduct_";
  257.             // line 36
  258.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 36), "html", null, true);
  259.             echo "\" style=\"font-size: 9px;\">
  260.                             APERÇU RAPIDE
  261.                         </button>
  262.                         <button class=\"product-btn-like ";
  263.             // line 39
  264.             if (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 39, $this->source); })()), "hasFavorite", [0 => $context["product"]], "method", false, false, false, 39)) {
  265.                 echo "product-btn-liked ";
  266.             }
  267.             echo "\" data-id=\"";
  268.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 39), "html", null, true);
  269.             echo "\"></button>
  270.                         ";
  271.             // line 41
  272.             if (twig_get_attribute($this->env, $this->source, $context["product"], "isSalable", [], "any", false, false, false, 41)) {
  273.                 // line 42
  274.                 echo "                            ";
  275.                 if (twig_get_attribute($this->env, $this->source, $context["product"], "isSubscribable", [], "any", false, false, false, 42)) {
  276.                     // line 43
  277.                     echo "                                ";
  278.                     if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 43))) {
  279.                         // line 44
  280.                         echo "                                    <div class=\"product-btn-add-to-cart button button-200 button-orange add-to-cart\" data-type=\"product\" data-id=\"";
  281.                         echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 44), "html", null, true);
  282.                         echo "\" data-quantity=\"qty-for-product-";
  283.                         echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 44), "html", null, true);
  284.                         echo "\" data-subscribe=\"";
  285.                         echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribable", [], "any", false, false, false, 44), "html", null, true);
  286.                         echo "\">
  287.                                         AJOUTER AU PANIER
  288.                                     </div>
  289.                                 ";
  290.                     } else {
  291.                         // line 48
  292.                         echo "                                    <button style=\"background-color: #f0632f;color: white;width:fit-content;\" class=\"product-btn-add-to-cart button button-200 dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">AJOUTER AU PANIER
  293.                                     </button>
  294.                                     <div class=\"dropdown-menu\" style=\"width: 300px;text-transform: uppercase;\">
  295.                                         <input id=\"qty-for-product-";
  296.                         // line 51
  297.                         echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 51), "html", null, true);
  298.                         echo "\" type=\"hidden\" value=\"1\">
  299.                                         ";
  300.                         // line 52
  301.                         if ( !twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribable", [], "any", false, false, false, 52)) {
  302.                             // line 53
  303.                             echo "                                            <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  304.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 53), "html", null, true);
  305.                             echo "\" data-quantity=\"qty-for-product-";
  306.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 53), "html", null, true);
  307.                             echo "\">Sans abonnement</a>
  308.                                         ";
  309.                         }
  310.                         // line 55
  311.                         echo "                                        ";
  312.                         if (( !twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 55) || (twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 55) == 2))) {
  313.                             // line 56
  314.                             echo "                                            <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  315.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 56), "html", null, true);
  316.                             echo "\" data-quantity=\"qty-for-product-";
  317.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 56), "html", null, true);
  318.                             echo "\" data-subscribe=\"2\">Abonnement hebdomadaire</a>
  319.                                         ";
  320.                         }
  321.                         // line 58
  322.                         echo "                                        ";
  323.                         if (( !twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 58) || (twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 58) == 3))) {
  324.                             // line 59
  325.                             echo "                                            <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  326.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 59), "html", null, true);
  327.                             echo "\" data-quantity=\"qty-for-product-";
  328.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 59), "html", null, true);
  329.                             echo "\" data-subscribe=\"3\">Abonnement bi-mensuel</a>
  330.                                         ";
  331.                         }
  332.                         // line 61
  333.                         echo "                                        ";
  334.                         if (( !twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 61) || (twig_get_attribute($this->env, $this->source, $context["product"], "isOnlySubscribableToType", [], "any", false, false, false, 61) == 4))) {
  335.                             // line 62
  336.                             echo "                                            <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  337.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 62), "html", null, true);
  338.                             echo "\" data-quantity=\"qty-for-product-";
  339.                             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 62), "html", null, true);
  340.                             echo "\" data-subscribe=\"4\">Abonnement mensuel</a>
  341.                                         ";
  342.                         }
  343.                         // line 64
  344.                         echo "                                    </div>
  345.                                 ";
  346.                     }
  347.                     // line 66
  348.                     echo "                            ";
  349.                 } else {
  350.                     // line 67
  351.                     echo "                                <div class=\"product-btn-add-to-cart button button-200 button-orange add-to-cart\" data-type=\"product\" data-id=\"";
  352.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 67), "html", null, true);
  353.                     echo "\">
  354.                                     AJOUTER AU PANIER
  355.                                 </div>
  356.                             ";
  357.                 }
  358.                 // line 71
  359.                 echo "                        ";
  360.             } else {
  361.                 // line 72
  362.                 echo "                            <a href=\"";
  363.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewProduct", ["producerUrl" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 72), "UrlName", [], "any", false, false, false, 72), "productName" => twig_get_attribute($this->env, $this->source, $context["product"], "UrlName", [], "any", false, false, false, 72), "id" => twig_get_attribute($this->env, $this->source, $context["product"], "Id", [], "any", false, false, false, 72)]), "html", null, true);
  364.                 echo "\"  class=\"button button-200 button-orange product-btn-add-to-cart\" style=\"background-color: white!important;color: black!important;\">VOIR LE DÉTAIL</a>
  365.                         ";
  366.             }
  367.             // line 74
  368.             echo "                    </div>
  369.                 </div>
  370.                 <div class=\"product\">
  371.                     ";
  372.             // line 77
  373.             if (twig_get_attribute($this->env, $this->source, $context["product"], "isSalable", [], "any", false, false, false, 77)) {
  374.                 // line 78
  375.                 echo "                        <div class=\"button button-orange add-to-cart button-touch d-none d-none-btn-add-to-cart\" data-type=\"product\" data-id=\"";
  376.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 78), "html", null, true);
  377.                 echo "\">
  378.                             AU PANIER
  379.                         </div>
  380.                     ";
  381.             }
  382.             // line 82
  383.             echo "                    <div class=\"product-title underline-effect-wrapper\">
  384.                         <a  ";
  385.             // line 83
  386.             if ((twig_get_attribute($this->env, $this->source, $context["product"], "isDisplayedInAssociationOnly", [], "any", false, false, false, 83) && (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 83, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 83) == false))) {
  387.                 echo "  style=\"color: red !important;\" ";
  388.             }
  389.             // line 84
  390.             echo "                                class=\"underline-effect underline-effect-h1 underline-effect-black\" href=\"";
  391.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewProduct", ["producerUrl" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 84), "UrlName", [], "any", false, false, false, 84), "productName" => twig_get_attribute($this->env, $this->source, $context["product"], "UrlName", [], "any", false, false, false, 84), "id" => twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 84)]), "html", null, true);
  392.             echo "\">";
  393.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "Name", [], "any", false, false, false, 84), "html", null, true);
  394.             echo "</a>
  395.                     </div>
  396.                     <div class=\"product-subtitle\">
  397.                         <a href=\"";
  398.             // line 87
  399.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("companyStore", ["urlname" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 87), "urlname", [], "any", false, false, false, 87), "id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 87), "id", [], "any", false, false, false, 87)]), "html", null, true);
  400.             echo "\"
  401.                                 ";
  402.             // line 88
  403.             if ((twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 88, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 88) && (twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 88), "associations", [], "any", false, false, false, 88)) || (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 88, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 88), "UrlName", [], "any", false, false, false, 88) != twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 88), "associations", [], "any", false, false, false, 88), 0, [], "array", false, false, false, 88), "UrlName", [], "any", false, false, false, 88))))) {
  404.                 echo "  style=\"color: red !important;\" ";
  405.             }
  406.             // line 89
  407.             echo "                        >";
  408.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 89), "name", [], "any", false, false, false, 89), "html", null, true);
  409.             echo "</a>
  410.                     </div>
  411.                     <div class=\"product-price\" style=\"align-items: center;\">
  412.                         ";
  413.             // line 92
  414.             if (twig_get_attribute($this->env, $this->source, $context["product"], "hasDiscount", [], "any", false, false, false, 92)) {
  415.                 // line 93
  416.                 echo "                            <span class=\"\" style=\"\">
  417.                                 <strike>";
  418.                 // line 94
  419.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "displayPrice", [], "any", false, false, false, 94), "html", null, true);
  420.                 echo "</strike> ";
  421.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "displayPrice", [0 => true], "method", false, false, false, 94), "html", null, true);
  422.                 echo "
  423.                             </span>
  424.                         ";
  425.             } else {
  426.                 // line 97
  427.                 echo "                            ";
  428.                 // line 98
  429.                 echo "                            <span class=\"\" style=\"\">
  430.                              ";
  431.                 // line 99
  432.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "getPriceUnitStandard", [], "any", false, false, false, 99), "html", null, true);
  433.                 echo "
  434.                               </span>
  435.                         ";
  436.             }
  437.             // line 102
  438.             echo "                        <br>
  439.                          <span class=\"\" style=\"font-size: 12px;color: gray;display: block;\">
  440.                             ";
  441.             // line 104
  442.             if (((twig_get_attribute($this->env, $this->source, $context["product"], "getUnitAmount", [], "any", false, false, false, 104) && (twig_get_attribute($this->env, $this->source, $context["product"], "isBoxOfProducts", [], "any", false, false, false, 104) == false)) && twig_get_attribute($this->env, $this->source, $context["product"], "getPricePer100gramme", [], "any", false, false, false, 104))) {
  443.                 // line 105
  444.                 echo "                                ";
  445.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "getPricePer100gramme", [], "any", false, false, false, 105), "html", null, true);
  446.                 echo "
  447.                             ";
  448.             }
  449.             // line 107
  450.             echo "                         </span>
  451.                     </div>
  452.                       <div>
  453.                             ";
  454.             // line 110
  455.             if (twig_get_attribute($this->env, $this->source, $context["product"], "isShippedByMaturin", [], "any", false, false, false, 110)) {
  456.                 // line 111
  457.                 echo "                                <img style=\"padding-right: 15px;margin-top: 3px;\" src=\"/images/maturinshipping.png\" alt=\"Livraison par Maturin\" title=\"Livraison par Maturin\" class=\"pull-right\">
  458.                             ";
  459.             }
  460.             // line 113
  461.             echo "                            ";
  462.             if ( !(null === twig_get_attribute($this->env, $this->source, $context["product"], "subCategory", [], "any", false, false, false, 113))) {
  463.                 // line 114
  464.                 echo "                                ";
  465.                 if ((twig_get_attribute($this->env, $this->source, $context["product"], "getOrgaCertification", [], "any", false, false, false, 114) == true)) {
  466.                     echo " 
  467.                                     <img style=\"padding-right: 5px;\" src=\"/images/biosymbol.png\" alt=\"produit biologique\" title=\"produit biologique\" class=\"pull-right\">
  468.                                 ";
  469.                 }
  470.                 // line 116
  471.                 echo " 
  472.                                 ";
  473.                 // line 117
  474.                 if ((twig_get_attribute($this->env, $this->source, $context["product"], "conservation", [], "any", false, false, false, 117) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "conservation", [], "any", false, false, false, 117), "id", [], "any", false, false, false, 117) == 6))) {
  475.                     // line 118
  476.                     echo "                                    <img style=\"padding-right: 5px;\" src=\"/images/froozen.png\" alt=\"Congelé\" title=\"Congelé\" class=\"pull-right\">
  477.                                 ";
  478.                 } elseif ((twig_get_attribute($this->env, $this->source,                 // line 119
  479. $context["product"], "conservation", [], "any", false, false, false, 119) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "conservation", [], "any", false, false, false, 119), "id", [], "any", false, false, false, 119) == 5))) {
  480.                     // line 120
  481.                     echo "                                    <img style=\"padding-right: 5px;\" src=\"/images/snow.png\" alt=\"Réfrigéré\" title=\"Réfrigéré\" class=\"pull-right\">
  482.                                 ";
  483.                 }
  484.                 // line 122
  485.                 echo "                            ";
  486.             }
  487.             // line 123
  488.             echo "                        </div>
  489.                 </div>
  490.             </div>
  491.         </div>
  492.     ";
  493.         }
  494.         $_parent = $context['_parent'];
  495.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  496.         $context = array_intersect_key($context, $_parent) + $_parent;
  497.         // line 128
  498.         echo "  </div>
  499.   ";
  500.         // line 130
  501.         $context['_parent'] = $context;
  502.         $context['_seq'] = twig_ensure_traversable((isset($context["masonryProducts"]) || array_key_exists("masonryProducts", $context) ? $context["masonryProducts"] : (function () { throw new RuntimeError('Variable "masonryProducts" does not exist.', 130, $this->source); })()));
  503.         foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  504.             // line 131
  505.             echo "      <!-- Product Modal -->
  506.       <div class=\"modal\" id=\"previewProduct_";
  507.             // line 132
  508.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "Id", [], "any", false, false, false, 132), "html", null, true);
  509.             echo "\" tabindex=\"-1\" role=\"dialog\"
  510.                                                                           aria-labelledby=\"previewModalTitle\" aria-hidden=\"true\">
  511.           <div class=\"modal-dialog modal-dialog-centered modal-lg\" role=\"document\">
  512.               <div class=\"modal-content\">
  513.                   <div class=\"modal-body\">
  514.                       <div class=\"row\">
  515.                           <div class=\"col-6\">
  516.                               ";
  517.             // line 139
  518.             if (twig_get_attribute($this->env, $this->source, $context["product"], "mainImage", [], "any", false, false, false, 139)) {
  519.                 // line 140
  520.                 echo "                                  <img class=\"modal-product-image lazyload\" src=\"/images/none.png\" data-src=\"";
  521.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("getImageAsFixedWidth", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "mainImage", [], "any", false, false, false, 140), "Id", [], "any", false, false, false, 140), "width" => "270"]), "html", null, true);
  522.                 echo "\">
  523.                               ";
  524.             } else {
  525.                 // line 142
  526.                 echo "                                  <img class=\"modal-product-image\" src=\"/assets/frontend/images/noProductPicture.jpg\">
  527.                               ";
  528.             }
  529.             // line 144
  530.             echo "                          </div>
  531.                           <div class=\"col-6\">
  532.                               <div class=\"modal-product-title\" ";
  533.             // line 146
  534.             if ((twig_get_attribute($this->env, $this->source, $context["product"], "isDisplayedInAssociationOnly", [], "any", false, false, false, 146) && (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 146, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 146) == false))) {
  535.                 echo "  style=\"color: red !important;\" ";
  536.             }
  537.             echo " >";
  538.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "Name", [], "any", false, false, false, 146), "html", null, true);
  539.             echo "</div>
  540.                               <div class=\"modal-product-subtitle\">
  541.                                   <a ";
  542.             // line 148
  543.             if ((twig_get_attribute($this->env, $this->source, $context["product"], "isDisplayedInAssociationOnly", [], "any", false, false, false, 148) && (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 148, $this->source); })()), "associationUserIsBrowsing", [], "any", false, false, false, 148) == false))) {
  544.                 echo "  style=\"color: red !important;\" ";
  545.             }
  546.             echo " href=\"";
  547.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("companyStore", ["urlname" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 148), "urlname", [], "any", false, false, false, 148), "id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 148), "id", [], "any", false, false, false, 148)]), "html", null, true);
  548.             echo "\">";
  549.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 148), "name", [], "any", false, false, false, 148), "html", null, true);
  550.             echo "</a>
  551.                               </div>
  552.                               <br><p>";
  553.             // line 150
  554.             echo twig_join_filter(twig_slice($this->env, twig_split_filter($this->env, strip_tags(twig_get_attribute($this->env, $this->source, $context["product"], "description", [], "any", false, false, false, 150)), " "), 0, 30), " ");
  555.             echo "...</p>
  556.                           <div class=\"product-price\">
  557.                               ";
  558.             // line 152
  559.             if (twig_get_attribute($this->env, $this->source, $context["product"], "hasDiscount", [], "any", false, false, false, 152)) {
  560.                 // line 153
  561.                 echo "                                  <strike>";
  562.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "displayPrice", [], "any", false, false, false, 153), "html", null, true);
  563.                 echo "</strike> ";
  564.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "displayPrice", [0 => true], "method", false, false, false, 153), "html", null, true);
  565.                 echo "
  566.                               ";
  567.             } else {
  568.                 // line 155
  569.                 echo "                                  ";
  570.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "displayPrice", [], "any", false, false, false, 155), "html", null, true);
  571.                 echo "
  572.                               ";
  573.             }
  574.             // line 157
  575.             echo "                              ";
  576.             if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "pricings", [], "any", false, false, false, 157)) > 1)) {
  577.                 // line 158
  578.                 echo "                                  <h5 class=\"font-weight-bold\">
  579.                                       Format économique
  580.                                   </h5>
  581.                                   <ul style=\"color: darkgray; font-size: small;\">
  582.                                       ";
  583.                 // line 162
  584.                 $context['_parent'] = $context;
  585.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["product"], "pricings", [], "any", false, false, false, 162));
  586.                 foreach ($context['_seq'] as $context["_key"] => $context["price"]) {
  587.                     // line 163
  588.                     echo "                                          <li>";
  589.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["price"], "displayPrice", [], "any", false, false, false, 163), "html", null, true);
  590.                     echo "</li>
  591.                                       ";
  592.                 }
  593.                 $_parent = $context['_parent'];
  594.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['price'], $context['_parent'], $context['loop']);
  595.                 $context = array_intersect_key($context, $_parent) + $_parent;
  596.                 // line 165
  597.                 echo "                                  </ul>
  598.                               ";
  599.             }
  600.             // line 167
  601.             echo "                          </div>
  602.                           ";
  603.             // line 169
  604.             if (twig_get_attribute($this->env, $this->source, $context["product"], "isShippedByMaturin", [], "any", false, false, false, 169)) {
  605.                 // line 170
  606.                 echo "                              ";
  607.                 if ((twig_get_attribute($this->env, $this->source, $context["product"], "qtyReadyToShip", [], "any", false, false, false, 170) > 0)) {
  608.                     // line 171
  609.                     echo "                                  <div class=\"modal-product-in-stock\">En inventaire</div>
  610.                               ";
  611.                 } else {
  612.                     // line 173
  613.                     echo "                                  <div class=\"modal-product-in-stock\">Inventaire épuisé</div>
  614.                               ";
  615.                 }
  616.                 // line 175
  617.                 echo "                          ";
  618.             } else {
  619.                 // line 176
  620.                 echo "                              <div class=\"modal-product-in-stock\">Livraison indépendante</div>
  621.                           ";
  622.             }
  623.             // line 178
  624.             echo "
  625.                           ";
  626.             // line 180
  627.             if (twig_get_attribute($this->env, $this->source, $context["product"], "isSalable", [], "any", false, false, false, 180)) {
  628.                 // line 181
  629.                 echo "                              <div class=\"modal-product-amount\">
  630.                                   ";
  631.                 // line 182
  632.                 if ( !twig_get_attribute($this->env, $this->source, $context["product"], "isSubscribable", [], "any", false, false, false, 182)) {
  633.                     // line 183
  634.                     echo "                                      <div class=\"modal-product-amount-title\">Quantité</div>
  635.                                   ";
  636.                 }
  637.                 // line 185
  638.                 echo "                                  <div class=\"row\">
  639.                                   ";
  640.                 // line 186
  641.                 if ( !twig_get_attribute($this->env, $this->source, $context["product"], "isSubscribable", [], "any", false, false, false, 186)) {
  642.                     // line 187
  643.                     echo "                                      <div class=\"col-12 pb-3\">
  644.                                           <input class=\"form-control modal-product-btn-amount\" id=\"qty-for-product-";
  645.                     // line 188
  646.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 188), "html", null, true);
  647.                     echo "\" type=\"number\" name=\"points\" step=\"1\" value=\"1\" min=\"1\">
  648.                                       </div>
  649.                                   ";
  650.                 }
  651.                 // line 191
  652.                 echo "                                    <div class=\"col-12\">
  653.                                           ";
  654.                 // line 192
  655.                 if (twig_get_attribute($this->env, $this->source, $context["product"], "isSubscribable", [], "any", false, false, false, 192)) {
  656.                     // line 193
  657.                     echo "                                              <button style=\"background-color: #f0632f;color: white;white-space: nowrap;\" class=\"button button-200 dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">AJOUTER AU PANIER
  658.                                               </button>
  659.                                               <div class=\"dropdown-menu\" style=\"width: 300px;text-transform: uppercase;\">
  660.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  661.                     // line 196
  662.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 196), "html", null, true);
  663.                     echo "\" data-quantity=\"p-qty-s-";
  664.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 196), "html", null, true);
  665.                     echo "\">Une seul fois</a>
  666.                                                   <input type=\"hidden\" value=\"1\" id=\"p-qty-s-";
  667.                     // line 197
  668.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 197), "html", null, true);
  669.                     echo "\">
  670.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  671.                     // line 198
  672.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 198), "html", null, true);
  673.                     echo "\" data-quantity=\"p-qty-1-";
  674.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 198), "html", null, true);
  675.                     echo "\">Abonnement hebdomadaire</a>
  676.                                                   <input type=\"hidden\" value=\"2\" id=\"p-qty-1-";
  677.                     // line 199
  678.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 199), "html", null, true);
  679.                     echo "\">
  680.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  681.                     // line 200
  682.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 200), "html", null, true);
  683.                     echo "\" data-quantity=\"p-qty-2-";
  684.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 200), "html", null, true);
  685.                     echo "\">Abonnement bi-mensuel</a>
  686.                                                   <input type=\"hidden\" value=\"3\" id=\"p-qty-2-";
  687.                     // line 201
  688.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 201), "html", null, true);
  689.                     echo "\">
  690.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"";
  691.                     // line 202
  692.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 202), "html", null, true);
  693.                     echo "\" data-quantity=\"p-qty-3-";
  694.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 202), "html", null, true);
  695.                     echo "\">Abonnement mensuel</a>
  696.                                                   <input type=\"hidden\" value=\"4\" id=\"p-qty-3-";
  697.                     // line 203
  698.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 203), "html", null, true);
  699.                     echo "\">
  700.                                               </div>
  701.                                           ";
  702.                 } else {
  703.                     // line 206
  704.                     echo "                                              <button class=\"modal-product-btn-add-to-cart button button-200 button-orange add-to-cart\" data-type=\"product\" data-id=\"";
  705.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 206), "html", null, true);
  706.                     echo "\" data-quantity=\"qty-for-product-";
  707.                     echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 206), "html", null, true);
  708.                     echo "\">
  709.                                                   AJOUTER AU PANIER
  710.                                               </button>
  711.                                           ";
  712.                 }
  713.                 // line 210
  714.                 echo "                                      </div>
  715.                                   </div>
  716.                               </div>
  717.                           ";
  718.             }
  719.             // line 214
  720.             echo "                              <br>
  721.                               <div class=\"modal-product-complete-list\">
  722.                                   <a href=\"";
  723.             // line 216
  724.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewProduct", ["producerUrl" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "company", [], "any", false, false, false, 216), "UrlName", [], "any", false, false, false, 216), "productName" => twig_get_attribute($this->env, $this->source, $context["product"], "UrlName", [], "any", false, false, false, 216), "id" => twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 216)]), "html", null, true);
  725.             echo "\">VOIR LA FICHE DU PRODUIT
  726.                                       <span class=\"modal-product-complete-list-arrow\"> </span>
  727.                                   </a>
  728.                               </div>
  729.                           </div>
  730.                       </div>
  731.                   </div>
  732.                 </div>
  733.               </div>
  734.           </div>
  735.       <!-- Product Modal -->
  736.   ";
  737.         }
  738.         $_parent = $context['_parent'];
  739.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  740.         $context = array_intersect_key($context, $_parent) + $_parent;
  741.         
  742.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  743.         
  744.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  745.     }
  746.     public function getTemplateName()
  747.     {
  748.         return "frontend/productMasonry.html.twig";
  749.     }
  750.     public function isTraitable()
  751.     {
  752.         return false;
  753.     }
  754.     public function getDebugInfo()
  755.     {
  756.         return array (  762 => 216,  758 => 214,  752 => 210,  742 => 206,  736 => 203,  730 => 202,  726 => 201,  720 => 200,  716 => 199,  710 => 198,  706 => 197,  700 => 196,  695 => 193,  693 => 192,  690 => 191,  684 => 188,  681 => 187,  679 => 186,  676 => 185,  672 => 183,  670 => 182,  667 => 181,  665 => 180,  661 => 178,  657 => 176,  654 => 175,  650 => 173,  646 => 171,  643 => 170,  641 => 169,  637 => 167,  633 => 165,  624 => 163,  620 => 162,  614 => 158,  611 => 157,  605 => 155,  597 => 153,  595 => 152,  590 => 150,  579 => 148,  570 => 146,  566 => 144,  562 => 142,  556 => 140,  554 => 139,  544 => 132,  541 => 131,  537 => 130,  533 => 128,  523 => 123,  520 => 122,  516 => 120,  514 => 119,  511 => 118,  509 => 117,  506 => 116,  499 => 114,  496 => 113,  492 => 111,  490 => 110,  485 => 107,  479 => 105,  477 => 104,  473 => 102,  467 => 99,  464 => 98,  462 => 97,  454 => 94,  451 => 93,  449 => 92,  442 => 89,  438 => 88,  434 => 87,  425 => 84,  421 => 83,  418 => 82,  410 => 78,  408 => 77,  403 => 74,  397 => 72,  394 => 71,  386 => 67,  383 => 66,  379 => 64,  371 => 62,  368 => 61,  360 => 59,  357 => 58,  349 => 56,  346 => 55,  338 => 53,  336 => 52,  332 => 51,  327 => 48,  315 => 44,  312 => 43,  309 => 42,  307 => 41,  298 => 39,  292 => 36,  285 => 31,  279 => 29,  271 => 27,  269 => 26,  266 => 25,  263 => 24,  260 => 23,  257 => 22,  254 => 21,  252 => 20,  249 => 19,  245 => 17,  241 => 16,  236 => 15,  232 => 13,  228 => 12,  223 => 11,  221 => 10,  218 => 9,  213 => 7,  210 => 5,  206 => 4,  202 => 2,  192 => 1,  177 => 358,  172 => 355,  77 => 251,  75 => 250,  72 => 249,  54 => 233,  51 => 232,  49 => 231,  46 => 230,  44 => 1,);
  757.     }
  758.     public function getSourceContext()
  759.     {
  760.         return new Source("{% block masonryProducts %}
  761.   <div class=\"row mobile_product_row\">
  762.     {% for product in masonryProducts %}
  763.     <div class=\"col-xs-6 col-sm-6 col-md-3 pb-5 mobile_product_box\">
  764.       {# <div class=\"masonry-layout\"> #}
  765.         <div class=\"masonry-product\" data-product=\"{{product.id}}\">
  766.             {# <div class=\"masonry-layout__panel-content\"> #}
  767.                 <div class=\"product-group\">
  768.                     {% if global.associationUserIsBrowsing %}
  769.                         <a href=\"{{path('viewProductInAssociation', {'producerUrl': product.company.UrlName, 'productName': product.UrlName, 'id': product.Id, 'groupUrlName': global.associationUserIsBrowsing.urlName})}}\"
  770.                                 {% if product.isDisplayedInAssociationOnly and global.associationUserIsBrowsing == false  %}  style=\"color: red !important;\" {% endif %}
  771.                         >
  772.                         {% else %}
  773.                         <a href=\"{{path('viewProduct', {'producerUrl': product.company.UrlName, 'productName': product.UrlName, 'id': product.Id })}}\"
  774.                                 {% if product.isDisplayedInAssociationOnly and global.associationUserIsBrowsing == false  %}  style=\"color: red !important;\" {% endif %}
  775.                         >
  776.                         {% endif %}
  777.                         {% if forcedProductThumbnail is defined %}
  778.                             {% set size = forcedProductThumbnail %}
  779.                         {% else %}
  780.                             {% set size = '250' %}
  781.                         {% endif %}
  782.                         {% if product.mainImage %}
  783.                             <img id=\"masonry-product-image-{{product.id}}\" class=\"product-image lazyload\" src=\"/images/none.png\" data-src=\"{{path('getImageAsCroppedThumb', {'id': product.mainImage.Id, 'height': size, 'width': size})}}\"   style=\"margin-left: auto; margin-right: auto;\">
  784.                         {% else %}
  785.                             <img id=\"masonry-product-image-{{product.id}}\"  class=\"product-image\" src=\"/assets/frontend/images/noProductPicture.jpg\" style=\"margin-left: auto; margin-right: auto;\">
  786.                         {% endif %}
  787.                     </a>
  788.                     <div class=\"product-btn\">
  789.                         <button type=\"button\" class=\"product-btn-overview\"
  790.                                               data-toggle=\"modal\"
  791.                                               data-target=\"#previewProduct_{{product.id}}\" style=\"font-size: 9px;\">
  792.                             APERÇU RAPIDE
  793.                         </button>
  794.                         <button class=\"product-btn-like {% if global.hasFavorite(product) %}product-btn-liked {% endif %}\" data-id=\"{{product.id}}\"></button>
  795.                         {% if product.isSalable %}
  796.                             {% if product.isSubscribable %}
  797.                                 {% if product.isOnlySubscribableToType is not empty %}
  798.                                     <div class=\"product-btn-add-to-cart button button-200 button-orange add-to-cart\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"qty-for-product-{{product.id}}\" data-subscribe=\"{{product.isOnlySubscribable}}\">
  799.                                         AJOUTER AU PANIER
  800.                                     </div>
  801.                                 {% else %}
  802.                                     <button style=\"background-color: #f0632f;color: white;width:fit-content;\" class=\"product-btn-add-to-cart button button-200 dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">AJOUTER AU PANIER
  803.                                     </button>
  804.                                     <div class=\"dropdown-menu\" style=\"width: 300px;text-transform: uppercase;\">
  805.                                         <input id=\"qty-for-product-{{product.id}}\" type=\"hidden\" value=\"1\">
  806.                                         {% if not product.isOnlySubscribable %}
  807.                                             <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"qty-for-product-{{product.id}}\">Sans abonnement</a>
  808.                                         {% endif %}
  809.                                         {% if not product.isOnlySubscribableToType or product.isOnlySubscribableToType == 2 %}
  810.                                             <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"qty-for-product-{{product.id}}\" data-subscribe=\"2\">Abonnement hebdomadaire</a>
  811.                                         {% endif %}
  812.                                         {% if not product.isOnlySubscribableToType or product.isOnlySubscribableToType == 3 %}
  813.                                             <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"qty-for-product-{{product.id}}\" data-subscribe=\"3\">Abonnement bi-mensuel</a>
  814.                                         {% endif %}
  815.                                         {% if not product.isOnlySubscribableToType or product.isOnlySubscribableToType == 4 %}
  816.                                             <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"qty-for-product-{{product.id}}\" data-subscribe=\"4\">Abonnement mensuel</a>
  817.                                         {% endif %}
  818.                                     </div>
  819.                                 {% endif %}
  820.                             {% else %}
  821.                                 <div class=\"product-btn-add-to-cart button button-200 button-orange add-to-cart\" data-type=\"product\" data-id=\"{{product.id}}\">
  822.                                     AJOUTER AU PANIER
  823.                                 </div>
  824.                             {% endif %}
  825.                         {% else %}
  826.                             <a href=\"{{path('viewProduct', {'producerUrl':product.company.UrlName, 'productName': product.UrlName, 'id': product.Id})}}\"  class=\"button button-200 button-orange product-btn-add-to-cart\" style=\"background-color: white!important;color: black!important;\">VOIR LE DÉTAIL</a>
  827.                         {% endif %}
  828.                     </div>
  829.                 </div>
  830.                 <div class=\"product\">
  831.                     {% if product.isSalable %}
  832.                         <div class=\"button button-orange add-to-cart button-touch d-none d-none-btn-add-to-cart\" data-type=\"product\" data-id=\"{{product.id}}\">
  833.                             AU PANIER
  834.                         </div>
  835.                     {% endif %}
  836.                     <div class=\"product-title underline-effect-wrapper\">
  837.                         <a  {% if product.isDisplayedInAssociationOnly and global.associationUserIsBrowsing == false %}  style=\"color: red !important;\" {% endif %}
  838.                                 class=\"underline-effect underline-effect-h1 underline-effect-black\" href=\"{{path('viewProduct', {'producerUrl': product.company.UrlName, 'productName': product.UrlName, 'id': product.id})}}\">{{product.Name}}</a>
  839.                     </div>
  840.                     <div class=\"product-subtitle\">
  841.                         <a href=\"{{path('companyStore', {'urlname': product.company.urlname, 'id':product.company.id })}}\"
  842.                                 {% if global.associationUserIsBrowsing and (product.company.associations is empty or global.associationUserIsBrowsing.UrlName != product.company.associations[0].UrlName) %}  style=\"color: red !important;\" {% endif %}
  843.                         >{{product.company.name}}</a>
  844.                     </div>
  845.                     <div class=\"product-price\" style=\"align-items: center;\">
  846.                         {% if product.hasDiscount %}
  847.                             <span class=\"\" style=\"\">
  848.                                 <strike>{{product.displayPrice}}</strike> {{product.displayPrice(true)}}
  849.                             </span>
  850.                         {% else %}
  851.                             {# {{product.displayPrice}} #}
  852.                             <span class=\"\" style=\"\">
  853.                              {{ product.getPriceUnitStandard }}
  854.                               </span>
  855.                         {% endif %}
  856.                         <br>
  857.                          <span class=\"\" style=\"font-size: 12px;color: gray;display: block;\">
  858.                             {% if product.getUnitAmount and product.isBoxOfProducts == false and product.getPricePer100gramme %}
  859.                                 {{product.getPricePer100gramme}}
  860.                             {% endif %}
  861.                          </span>
  862.                     </div>
  863.                       <div>
  864.                             {% if product.isShippedByMaturin %}
  865.                                 <img style=\"padding-right: 15px;margin-top: 3px;\" src=\"/images/maturinshipping.png\" alt=\"Livraison par Maturin\" title=\"Livraison par Maturin\" class=\"pull-right\">
  866.                             {% endif %}
  867.                             {% if product.subCategory is not null  %}
  868.                                 {% if product.getOrgaCertification == true %} 
  869.                                     <img style=\"padding-right: 5px;\" src=\"/images/biosymbol.png\" alt=\"produit biologique\" title=\"produit biologique\" class=\"pull-right\">
  870.                                 {% endif %} 
  871.                                 {% if product.conservation and product.conservation.id == 6 %}
  872.                                     <img style=\"padding-right: 5px;\" src=\"/images/froozen.png\" alt=\"Congelé\" title=\"Congelé\" class=\"pull-right\">
  873.                                 {% elseif product.conservation and product.conservation.id == 5 %}
  874.                                     <img style=\"padding-right: 5px;\" src=\"/images/snow.png\" alt=\"Réfrigéré\" title=\"Réfrigéré\" class=\"pull-right\">
  875.                                 {% endif %}
  876.                             {% endif %}
  877.                         </div>
  878.                 </div>
  879.             </div>
  880.         </div>
  881.     {% endfor %}
  882.   </div>
  883.   {% for product in masonryProducts %}
  884.       <!-- Product Modal -->
  885.       <div class=\"modal\" id=\"previewProduct_{{product.Id}}\" tabindex=\"-1\" role=\"dialog\"
  886.                                                                           aria-labelledby=\"previewModalTitle\" aria-hidden=\"true\">
  887.           <div class=\"modal-dialog modal-dialog-centered modal-lg\" role=\"document\">
  888.               <div class=\"modal-content\">
  889.                   <div class=\"modal-body\">
  890.                       <div class=\"row\">
  891.                           <div class=\"col-6\">
  892.                               {% if product.mainImage %}
  893.                                   <img class=\"modal-product-image lazyload\" src=\"/images/none.png\" data-src=\"{{path('getImageAsFixedWidth', {'id': product.mainImage.Id, 'width': '270'})}}\">
  894.                               {% else %}
  895.                                   <img class=\"modal-product-image\" src=\"/assets/frontend/images/noProductPicture.jpg\">
  896.                               {% endif %}
  897.                           </div>
  898.                           <div class=\"col-6\">
  899.                               <div class=\"modal-product-title\" {% if product.isDisplayedInAssociationOnly and global.associationUserIsBrowsing == false %}  style=\"color: red !important;\" {% endif %} >{{product.Name}}</div>
  900.                               <div class=\"modal-product-subtitle\">
  901.                                   <a {% if product.isDisplayedInAssociationOnly and global.associationUserIsBrowsing == false %}  style=\"color: red !important;\" {% endif %} href=\"{{path('companyStore', {'urlname': product.company.urlname, 'id':product.company.id })}}\">{{product.company.name}}</a>
  902.                               </div>
  903.                               <br><p>{{product.description | striptags | split(' ') | slice(0, 30) | join(' ')| raw }}...</p>
  904.                           <div class=\"product-price\">
  905.                               {% if product.hasDiscount %}
  906.                                   <strike>{{product.displayPrice}}</strike> {{product.displayPrice(true)}}
  907.                               {% else %}
  908.                                   {{product.displayPrice}}
  909.                               {% endif %}
  910.                               {% if product.pricings | length > 1 %}
  911.                                   <h5 class=\"font-weight-bold\">
  912.                                       Format économique
  913.                                   </h5>
  914.                                   <ul style=\"color: darkgray; font-size: small;\">
  915.                                       {% for price in product.pricings %}
  916.                                           <li>{{price.displayPrice}}</li>
  917.                                       {% endfor %}
  918.                                   </ul>
  919.                               {% endif %}
  920.                           </div>
  921.                           {% if product.isShippedByMaturin %}
  922.                               {% if product.qtyReadyToShip > 0 %}
  923.                                   <div class=\"modal-product-in-stock\">En inventaire</div>
  924.                               {% else %}
  925.                                   <div class=\"modal-product-in-stock\">Inventaire épuisé</div>
  926.                               {% endif %}
  927.                           {% else %}
  928.                               <div class=\"modal-product-in-stock\">Livraison indépendante</div>
  929.                           {% endif %}
  930.                           {% if product.isSalable %}
  931.                               <div class=\"modal-product-amount\">
  932.                                   {% if not product.isSubscribable %}
  933.                                       <div class=\"modal-product-amount-title\">Quantité</div>
  934.                                   {% endif %}
  935.                                   <div class=\"row\">
  936.                                   {% if not product.isSubscribable %}
  937.                                       <div class=\"col-12 pb-3\">
  938.                                           <input class=\"form-control modal-product-btn-amount\" id=\"qty-for-product-{{product.id}}\" type=\"number\" name=\"points\" step=\"1\" value=\"1\" min=\"1\">
  939.                                       </div>
  940.                                   {% endif %}
  941.                                     <div class=\"col-12\">
  942.                                           {% if product.isSubscribable %}
  943.                                               <button style=\"background-color: #f0632f;color: white;white-space: nowrap;\" class=\"button button-200 dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">AJOUTER AU PANIER
  944.                                               </button>
  945.                                               <div class=\"dropdown-menu\" style=\"width: 300px;text-transform: uppercase;\">
  946.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"p-qty-s-{{product.id}}\">Une seul fois</a>
  947.                                                   <input type=\"hidden\" value=\"1\" id=\"p-qty-s-{{product.id}}\">
  948.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"p-qty-1-{{product.id}}\">Abonnement hebdomadaire</a>
  949.                                                   <input type=\"hidden\" value=\"2\" id=\"p-qty-1-{{product.id}}\">
  950.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"p-qty-2-{{product.id}}\">Abonnement bi-mensuel</a>
  951.                                                   <input type=\"hidden\" value=\"3\" id=\"p-qty-2-{{product.id}}\">
  952.                                                   <a class=\"dropdown-item add-to-cart\" href=\"#\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"p-qty-3-{{product.id}}\">Abonnement mensuel</a>
  953.                                                   <input type=\"hidden\" value=\"4\" id=\"p-qty-3-{{product.id}}\">
  954.                                               </div>
  955.                                           {% else %}
  956.                                               <button class=\"modal-product-btn-add-to-cart button button-200 button-orange add-to-cart\" data-type=\"product\" data-id=\"{{product.id}}\" data-quantity=\"qty-for-product-{{product.id}}\">
  957.                                                   AJOUTER AU PANIER
  958.                                               </button>
  959.                                           {% endif %}
  960.                                       </div>
  961.                                   </div>
  962.                               </div>
  963.                           {% endif %}
  964.                               <br>
  965.                               <div class=\"modal-product-complete-list\">
  966.                                   <a href=\"{{path('viewProduct', {'producerUrl': product.company.UrlName, 'productName': product.UrlName, 'id': product.id})}}\">VOIR LA FICHE DU PRODUIT
  967.                                       <span class=\"modal-product-complete-list-arrow\"> </span>
  968.                                   </a>
  969.                               </div>
  970.                           </div>
  971.                       </div>
  972.                   </div>
  973.                 </div>
  974.               </div>
  975.           </div>
  976.       <!-- Product Modal -->
  977.   {% endfor %}
  978. {% endblock %}
  979. {% if products is defined and noPagination is defined %}
  980.   {% if noPagination %}
  981.     <script>
  982.         function updateLoader() {
  983.             if (document.getElementsByClassName('masonry-product').length ==
  984.                 parseInt(document.getElementById('amountProducts').innerText)
  985.                 &&
  986.                 document.getElementById('product-loader')
  987.             ) {
  988.                 document.getElementById('product-loader').style.display = 'none';
  989.             }
  990.         }
  991.         updateLoader();
  992.         document.addEventListener(\"DOMContentLoaded\", updateLoader);
  993.     </script>
  994.   {% endif %}
  995. {% endif %}
  996. {% if products is defined and noPagination is not defined %}
  997.     <script>
  998.         if( typeof lazyload !== 'undefined')
  999.             lazyload();
  1000.         var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
  1001.         if(supportsTouch){
  1002.             var elems = document.querySelectorAll(\".button-touch\");
  1003.             [].forEach.call(elems, function(el) {
  1004.                 el.classList.remove(\"d-none\");
  1005.             });
  1006.         }
  1007.         //console.log('Binding add to cart');
  1008.         function updateLoader() {
  1009.             if (document.getElementsByClassName('masonry-product').length ==
  1010.                 parseInt(document.getElementById('amountProducts').innerText)
  1011.                 &&
  1012.                 document.getElementById('product-loader')
  1013.             ) {
  1014.                 document.getElementById('product-loader').style.display = 'none';
  1015.             }
  1016.         }
  1017.         updateLoader();
  1018.         document.addEventListener(\"DOMContentLoaded\", updateLoader);
  1019.         function addToCart()
  1020.         {
  1021.             console.log('Masonry add to cart called');
  1022.             event.preventDefault();
  1023.             var type= this.getAttribute(\"data-type\");
  1024.             var id= this.getAttribute(\"data-id\");
  1025.             var quantityWidget = this.getAttribute('data-quantity');
  1026.             if(quantityWidget && document.getElementById(quantityWidget)){
  1027.                 var quantity = document.getElementById(quantityWidget).value;
  1028.             }else
  1029.                 var quantity = 1;
  1030.             var xmlHttp = new XMLHttpRequest();
  1031.             xmlHttp.onreadystatechange = function()
  1032.             {
  1033.                 if(xmlHttp.readyState == 4 && xmlHttp.status == 200)
  1034.                 {
  1035.                     var total = parseInt(document.getElementById('menu-cart-count').innerHTML);
  1036.                     document.getElementById('menu-cart-count').innerHTML = total+1;
  1037.                     document.getElementById('menu-cart-count').style.display = 'block';;
  1038.                     window.addToCartNotification++;
  1039.                     var json = JSON.parse(xmlHttp.responseText);
  1040.                     console.log(json);
  1041.                     if(document.getElementById('menu_subtotal_cart'))
  1042.                         document.getElementById('menu_subtotal_cart').innerHTML = json.totalCart;
  1043.                     if(document.getElementById('mobile_menu_subtotal_cart'))
  1044.                         document.getElementById('mobile_menu_subtotal_cart').innerHTML = json.totalCart;
  1045.                 }
  1046.             }
  1047.             //xmlHttp.open(\"post\", '/API/cart/add/'+id+'/'+quantity);
  1048.             var subscribe = this.getAttribute('data-subscribe');
  1049.             if( subscribe )
  1050.                 xmlHttp.open(\"post\", '/API/cart/add/'+id+'/'+quantity+'/'+subscribe);
  1051.             else
  1052.                 xmlHttp.open(\"post\", '/API/cart/add/'+id+'/'+quantity);
  1053.             xmlHttp.send();
  1054.             /*
  1055.             \$.ajax({
  1056.                 url: Routing.generate('addToCart', {id: id, quantity: quantity}),
  1057.                 method: 'POST',
  1058.                 dataType: 'json',
  1059.                 complete: _this.addedToCart
  1060.             });
  1061.              */
  1062.         }
  1063.         var classname = document.getElementsByClassName(\"add-to-cart\");
  1064.         for (var i = 0; i < classname.length; i++) {
  1065.             if(!classname[i].classList.contains(\"binded\")){
  1066.                 var classString = classname[i].className;
  1067.                 var newClass = classString.concat(\" binded\");
  1068.                 classname[i].className = newClass;
  1069.                 classname[i].addEventListener('click', addToCart, false);
  1070.             }
  1071.         }
  1072.     </script>
  1073.     {# <div class=\"row d-none\">
  1074.         <div class=\"col-sm-12 text-center\">
  1075.             {% if ajax is defined %}
  1076.              {{ knp_pagination_render(products, 'bundles/knp-paginator-bundle/ajaxPagination.html.twig', {}, { 
  1077.                     'searchToken': searchToken
  1078.                 }) }}
  1079.             {% else %}
  1080.                 {{ knp_pagination_render(products) }}
  1081.             {% endif %}
  1082.         </div>
  1083.     </div> #}
  1084.     
  1085.     <div id=\"paginatorDefaultPage\" class=\"d-none\">{{ knp_pagination_render(products) }}</div>
  1086.     
  1087.        
  1088. {% endif %}
  1089. ", "frontend/productMasonry.html.twig", "/var/www/html/Markego/templates/frontend/productMasonry.html.twig");
  1090.     }
  1091. }