<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Shop/includes/relatedproducts.html.twig */
class __TwigTemplate_b5e23c632d0c73ab0f0c35c56dc9826e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/includes/relatedproducts.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/includes/relatedproducts.html.twig"));
// line 1
echo "<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
";
// line 2
$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));
// line 3
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)) {
// line 4
echo " ";
$context["defaultPresentation"] = "relatedproductlist.html.twig";
// line 5
echo " ";
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", false, false, true, 5)) && (twig_get_attribute($this->env, $this->source, // line 6
(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", false, false, true, 6) == "carusel"))) {
// line 7
echo " ";
$context["defaultPresentation"] = "relatedproductcarusel.html.twig";
// line 8
echo " ";
}
// line 9
echo " ";
$context["defaultPresentation"] = "relatedproductcarusel.html.twig";
// line 10
echo " ";
$context["defaultPresentation"] = "newRelatedProductCarusel.html.twig";
// line 11
echo " <div class=\"product-related-products\" style=\"clear:both;\"><div class=\"clear\"></div></div>
<div class=\"upsell-products\" style=\"margin-top:40px;\">
";
// line 13
$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);
// line 14
echo " </div>
";
}
// line 16
echo "<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Shop/includes/relatedproducts.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
{% set relatedProducts = app_product_related_products(product) %}
{% if relatedProducts | length > 0 %}
{% set defaultPresentation = \"relatedproductlist.html.twig\" %}
{% if product.getProperty(\"presentationRelatedProducts\") is not empty and
product.getProperty(\"presentationRelatedProducts\") == \"carusel\" %}
{% set defaultPresentation = \"relatedproductcarusel.html.twig\" %}
{% endif %}
{% set defaultPresentation = \"relatedproductcarusel.html.twig\" %}
{% set defaultPresentation = \"newRelatedProductCarusel.html.twig\" %}
<div class=\"product-related-products\" style=\"clear:both;\"><div class=\"clear\"></div></div>
<div class=\"upsell-products\" style=\"margin-top:40px;\">
{% include ('Shop/includes/' ~ defaultPresentation) %}
</div>
{% endif %}
<!-- ******* PRODUCTOS RELACIONADOS START ************************ -->
", "Shop/includes/relatedproducts.html.twig", "/var/www/html/templates/Shop/includes/relatedproducts.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 2, "if" => 3, "include" => 13);
static $filters = array("length" => 3);
static $functions = array("app_product_related_products" => 2);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'include'],
['length'],
['app_product_related_products']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}