var/cache/dev/twig/c9/c93b349d0d3bc61c3bbec3b29a85b4d9.php line 50

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/product_teaser.html.twig */
  14. class __TwigTemplate_3618da456f6aac5395c846a54fe03c7b 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/product_teaser.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/product_teaser.html.twig"));
  35.         // line 1
  36.         $context["productImg"] = 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.'1$this->source); })()), "getFirstImageAsset", [], "any"falsefalsetrue1);
  37.         // line 2
  38.         if ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'2$this->source); })())) {
  39.             // line 3
  40.             echo "    ";
  41.             $context["linkDetail"] = $this->extensions['App\Twig\Extension\ProductExtension']->generateLink($this->sandbox->ensureToStringAllowed((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'3$this->source); })()), 3$this->source), ["document" => (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'3$this->source); })()), "prefix" => (isset($context["prefix"]) || array_key_exists("prefix"$context) ? $context["prefix"] : (function () { throw new RuntimeError('Variable "prefix" does not exist.'3$this->source); })())], []);
  42.         }
  43.         // line 5
  44.         $context["defaultPrice"] = $this->extensions['App\Twig\Extension\ProductExtension']->getDefaultPrice($this->sandbox->ensureToStringAllowed((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'5$this->source); })()), 5$this->source));
  45.         // line 7
  46.         echo "<style>
  47.     .card-img-top {
  48.         position: absolute;
  49.         top: -50px;
  50.         left: 50%;
  51.         margin-left: -50px;
  52.         width: 100px !important;
  53.         height: 100px;
  54.         transition: transform 0.3s ease;
  55.     }
  56.     .card:hover .card-img-top {
  57.         transform: scale(1.2);
  58.     }
  59.     .card {
  60.         font-family: \"Roboto\";
  61.         text-transform: lowercase;
  62.         margin-top: 30px;
  63.         padding-top: 30px;
  64.         box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
  65.         height: 170px;
  66.     }
  67.     .card a {
  68.         color: inherit;
  69.     }
  70.     .card-title {
  71.         display: block;
  72.         font-weight: 600;
  73.     }
  74.     .card-title:first-letter {
  75.         text-transform: uppercase;
  76.     }
  77.     .card:hover .card-title {
  78.         color: #106eea;
  79.     }
  80.     @media (max-width: 991px) {
  81.         .col-md-3,
  82.         .col-6 {
  83.             flex: 0 0 50%;
  84.             max-width: 50%;
  85.         }
  86.         .card {
  87.             height: 250px;
  88.             padding-top: 10px;
  89.         }
  90.     }
  91.     @media (min-width: 768px) and (max-width: 991px) {
  92.         .col-md-3,
  93.         .col-6 {
  94.             width: 100%;
  95.             flex: 0 0 50%;
  96.             max-width: 50%;
  97.         }
  98.         .card {
  99.             height: 250px;
  100.             width: 200px;
  101.             padding-top: 10px;
  102.             margin: 10px 100px 10px 90px;
  103.         }
  104.     }
  105.     @media (min-width: 991px) {
  106.         .card {
  107.             height: 250px;
  108.         }
  109.     }
  110. </style>
  111. <div class=\"col-6 col-sm-6 col-md-3 mt-5\">
  112.     <div class=\"card\">
  113.         <a href=\"";
  114.         // line 86
  115.         (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'86$this->source); })())) ? (print ("#")) : (print (twig_escape_filter($this->env, (isset($context["linkDetail"]) || array_key_exists("linkDetail"$context) ? $context["linkDetail"] : (function () { throw new RuntimeError('Variable "linkDetail" does not exist.'86$this->source); })()), "html"nulltrue))));
  116.         echo "\" class=\"px-3\">
  117.             <img class=\"card-img-top\" src=\"";
  118.         // line 87
  119.         (((isset($context["productImg"]) || array_key_exists("productImg"$context) ? $context["productImg"] : (function () { throw new RuntimeError('Variable "productImg" does not exist.'87$this->source); })())) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["productImg"]) || array_key_exists("productImg"$context) ? $context["productImg"] : (function () { throw new RuntimeError('Variable "productImg" does not exist.'87$this->source); })()), "thumbnail", ["ProductImages"], "method"falsefalsetrue87), "html"nulltrue))) : (print ("")));
  120.         echo "\" alt=\"Card image cap\">
  121.             <div class=\"card-block text-center mt-5\">
  122.                 <span class=\"card-title fs-6\">";
  123.         // line 89
  124.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'89$this->source); })()), "getName", [], "method"falsefalsetrue89), 89$this->source), "html"nulltrue);
  125.         echo "</span>
  126.                 ";
  127.         // line 94
  128.         echo "            </div>
  129.         </a>
  130.     </div>
  131. </div>
  132. ";
  133.         
  134.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  135.         
  136.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  137.     }
  138.     /**
  139.      * @codeCoverageIgnore
  140.      */
  141.     public function getTemplateName()
  142.     {
  143.         return "Shop/product_teaser.html.twig";
  144.     }
  145.     /**
  146.      * @codeCoverageIgnore
  147.      */
  148.     public function isTraitable()
  149.     {
  150.         return false;
  151.     }
  152.     /**
  153.      * @codeCoverageIgnore
  154.      */
  155.     public function getDebugInfo()
  156.     {
  157.         return array (  149 => 94,  145 => 89,  140 => 87,  136 => 86,  55 => 7,  53 => 5,  49 => 3,  47 => 2,  45 => 1,);
  158.     }
  159.     public function getSourceContext()
  160.     {
  161.         return new Source("{% set productImg = product.getFirstImageAsset %}
  162. {% if not editmode %}
  163.     {% set linkDetail = app_product_generate_link(product, { 'document' : document, 'prefix': prefix } , {}) %}
  164. {% endif %}
  165. {% set defaultPrice = app_product_default_price(product) %}
  166. {#{% set defaultPriceWithDiscount = app_product_default_price_with_discount(product,userIdSage) %}#}
  167. <style>
  168.     .card-img-top {
  169.         position: absolute;
  170.         top: -50px;
  171.         left: 50%;
  172.         margin-left: -50px;
  173.         width: 100px !important;
  174.         height: 100px;
  175.         transition: transform 0.3s ease;
  176.     }
  177.     .card:hover .card-img-top {
  178.         transform: scale(1.2);
  179.     }
  180.     .card {
  181.         font-family: \"Roboto\";
  182.         text-transform: lowercase;
  183.         margin-top: 30px;
  184.         padding-top: 30px;
  185.         box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
  186.         height: 170px;
  187.     }
  188.     .card a {
  189.         color: inherit;
  190.     }
  191.     .card-title {
  192.         display: block;
  193.         font-weight: 600;
  194.     }
  195.     .card-title:first-letter {
  196.         text-transform: uppercase;
  197.     }
  198.     .card:hover .card-title {
  199.         color: #106eea;
  200.     }
  201.     @media (max-width: 991px) {
  202.         .col-md-3,
  203.         .col-6 {
  204.             flex: 0 0 50%;
  205.             max-width: 50%;
  206.         }
  207.         .card {
  208.             height: 250px;
  209.             padding-top: 10px;
  210.         }
  211.     }
  212.     @media (min-width: 768px) and (max-width: 991px) {
  213.         .col-md-3,
  214.         .col-6 {
  215.             width: 100%;
  216.             flex: 0 0 50%;
  217.             max-width: 50%;
  218.         }
  219.         .card {
  220.             height: 250px;
  221.             width: 200px;
  222.             padding-top: 10px;
  223.             margin: 10px 100px 10px 90px;
  224.         }
  225.     }
  226.     @media (min-width: 991px) {
  227.         .card {
  228.             height: 250px;
  229.         }
  230.     }
  231. </style>
  232. <div class=\"col-6 col-sm-6 col-md-3 mt-5\">
  233.     <div class=\"card\">
  234.         <a href=\"{{ editmode ? '#':linkDetail }}\" class=\"px-3\">
  235.             <img class=\"card-img-top\" src=\"{{ (productImg) ? productImg.thumbnail('ProductImages') : '' }}\" alt=\"Card image cap\">
  236.             <div class=\"card-block text-center mt-5\">
  237.                 <span class=\"card-title fs-6\">{{ product.getName() }}</span>
  238.                 {# if product have propspeed brand hide price #}
  239. {#                {% if is_authenticated or product.marca != 15663 %}#}
  240. {#                    <p class=\"card-position card-price fs-6\">{{ app_helper_price_format_spain(defaultPrice) }}€</p>#}
  241. {#                {% endif %}#}
  242.             </div>
  243.         </a>
  244.     </div>
  245. </div>
  246. ""Shop/product_teaser.html.twig""/var/www/html/templates/Shop/product_teaser.html.twig");
  247.     }
  248.     
  249.     public function checkSecurity()
  250.     {
  251.         static $tags = array("set" => 1"if" => 2);
  252.         static $filters = array("escape" => 86);
  253.         static $functions = array("app_product_generate_link" => 3"app_product_default_price" => 5);
  254.         try {
  255.             $this->sandbox->checkSecurity(
  256.                 ['set''if'],
  257.                 ['escape'],
  258.                 ['app_product_generate_link''app_product_default_price']
  259.             );
  260.         } catch (SecurityError $e) {
  261.             $e->setSourceContext($this->source);
  262.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  263.                 $e->setTemplateLine($tags[$e->getTagName()]);
  264.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  265.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  266.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  267.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  268.             }
  269.             throw $e;
  270.         }
  271.     }
  272. }