var/cache/dev/twig/bf/bfbd2ee179b9941420d47c69667026f4.php line 75

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. /* Shop/includes/relatedproducts.html.twig */
  14. class __TwigTemplate_b5e23c632d0c73ab0f0c35c56dc9826e extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Shop/includes/relatedproducts.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Shop/includes/relatedproducts.html.twig"));
  35.         // line 1
  36.         echo "<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
  37. ";
  38.         // line 2
  39.         $context["relatedProducts"] = $this->extensions['App\Twig\Extension\ProductExtension']->getRelatedProducts($this->sandbox->ensureToStringAllowed((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'2$this->source); })()), 2$this->source));
  40.         // line 3
  41.         if ((twig_length_filter($this->env, (isset($context["relatedProducts"]) || array_key_exists("relatedProducts"$context) ? $context["relatedProducts"] : (function () { throw new RuntimeError('Variable "relatedProducts" does not exist.'3$this->source); })())) > 0)) {
  42.             // line 4
  43.             echo "    ";
  44.             $context["defaultPresentation"] = "relatedproductlist.html.twig";
  45.             // line 5
  46.             echo "    ";
  47.             if (( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'5$this->source); })()), "getProperty", ["presentationRelatedProducts"], "method"falsefalsetrue5)) && (twig_get_attribute($this->env$this->source,             // line 6
  48. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'6$this->source); })()), "getProperty", ["presentationRelatedProducts"], "method"falsefalsetrue6) == "carusel"))) {
  49.                 // line 7
  50.                 echo "        ";
  51.                 $context["defaultPresentation"] = "relatedproductcarusel.html.twig";
  52.                 // line 8
  53.                 echo "    ";
  54.             }
  55.             // line 9
  56.             echo "    ";
  57.             $context["defaultPresentation"] = "relatedproductcarusel.html.twig";
  58.             // line 10
  59.             echo "    ";
  60.             $context["defaultPresentation"] = "newRelatedProductCarusel.html.twig";
  61.             // line 11
  62.             echo "    <div class=\"product-related-products\" style=\"clear:both;\"><div class=\"clear\"></div></div>
  63.     <div class=\"upsell-products\" style=\"margin-top:40px;\">
  64.         ";
  65.             // line 13
  66.             $this->loadTemplate(("Shop/includes/" . (isset($context["defaultPresentation"]) || array_key_exists("defaultPresentation"$context) ? $context["defaultPresentation"] : (function () { throw new RuntimeError('Variable "defaultPresentation" does not exist.'13$this->source); })())), "Shop/includes/relatedproducts.html.twig"13)->display($context);
  67.             // line 14
  68.             echo "    </div>
  69. ";
  70.         }
  71.         // line 16
  72.         echo "<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
  73. ";
  74.         
  75.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  76.         
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  78.     }
  79.     /**
  80.      * @codeCoverageIgnore
  81.      */
  82.     public function getTemplateName()
  83.     {
  84.         return "Shop/includes/relatedproducts.html.twig";
  85.     }
  86.     /**
  87.      * @codeCoverageIgnore
  88.      */
  89.     public function isTraitable()
  90.     {
  91.         return false;
  92.     }
  93.     /**
  94.      * @codeCoverageIgnore
  95.      */
  96.     public function getDebugInfo()
  97.     {
  98.         return array (  81 => 16,  77 => 14,  75 => 13,  71 => 11,  68 => 10,  65 => 9,  62 => 8,  59 => 7,  57 => 6,  55 => 5,  52 => 4,  50 => 3,  48 => 2,  45 => 1,);
  99.     }
  100.     public function getSourceContext()
  101.     {
  102.         return new Source("<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
  103. {% set relatedProducts = app_product_related_products(product) %}
  104. {% if relatedProducts | length > 0 %}
  105.     {% set defaultPresentation = \"relatedproductlist.html.twig\" %}
  106.     {%  if product.getProperty(\"presentationRelatedProducts\") is not empty and
  107.         product.getProperty(\"presentationRelatedProducts\") == \"carusel\" %}
  108.         {% set defaultPresentation = \"relatedproductcarusel.html.twig\" %}
  109.     {% endif %}
  110.     {% set defaultPresentation = \"relatedproductcarusel.html.twig\" %}
  111.     {% set defaultPresentation = \"newRelatedProductCarusel.html.twig\" %}
  112.     <div class=\"product-related-products\" style=\"clear:both;\"><div class=\"clear\"></div></div>
  113.     <div class=\"upsell-products\" style=\"margin-top:40px;\">
  114.         {% include ('Shop/includes/' ~ defaultPresentation) %}
  115.     </div>
  116. {%  endif %}
  117. <!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
  118. ""Shop/includes/relatedproducts.html.twig""/var/www/html/templates/Shop/includes/relatedproducts.html.twig");
  119.     }
  120.     
  121.     public function checkSecurity()
  122.     {
  123.         static $tags = array("set" => 2"if" => 3"include" => 13);
  124.         static $filters = array("length" => 3);
  125.         static $functions = array("app_product_related_products" => 2);
  126.         try {
  127.             $this->sandbox->checkSecurity(
  128.                 ['set''if''include'],
  129.                 ['length'],
  130.                 ['app_product_related_products']
  131.             );
  132.         } catch (SecurityError $e) {
  133.             $e->setSourceContext($this->source);
  134.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  135.                 $e->setTemplateLine($tags[$e->getTagName()]);
  136.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  137.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  138.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  139.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  140.             }
  141.             throw $e;
  142.         }
  143.     }
  144. }