var/cache/dev/twig/2d/2dc032d3cb6404e0bb7baacb40dc66fcf2f42b26c683a92118c849538151319c.php line 116

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. /* @SyliusShop/Product/Box/_content.html.twig */
  14. class __TwigTemplate_2fb57ea9c02b09c7a461ae14929696766937929383a9d8f9fb5566d852f57ec7 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.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Box/_content.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SyliusShop/Product/Box/_content.html.twig"));
  33.         // line 1
  34.         $macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig""@SyliusShop/Product/Box/_content.html.twig"1)->unwrap();
  35.         // line 2
  36.         echo "
  37. <div class=\" swiper-slide\" ";
  38.         // line 3
  39.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product");
  40.         echo ">
  41.     <div class=\"ui fluid card  Product_Box_content\">
  42.         <div class=\"Product_Box_content--content\">
  43.             <a href=\"";
  44.         // line 6
  45.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_show", ["slug" => 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.'6$this->source); })()), "slug", [], "any"falsefalsefalse6), "_locale" => twig_get_attribute($this->env$this->sourcetwig_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.'6$this->source); })()), "translation", [], "any"falsefalsefalse6), "locale", [], "any"falsefalsefalse6)]), "html"nulltrue);
  46.         echo "\" ";
  47.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-name"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.'6$this->source); })()), "name", [], "any"falsefalsefalse6));
  48.         echo ">
  49.                 <div class=\"Product_Box_content--image\">
  50.                     ";
  51.         // line 8
  52.         $this->loadTemplate("@SyliusShop/Product/_mainImage.html.twig""@SyliusShop/Product/Box/_content.html.twig"8)->display(twig_array_merge($context, ["product" => (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'8$this->source); })())]));
  53.         // line 9
  54.         echo "                </div>
  55.             </a>
  56.         </div>
  57.         <div class=\"Product_Box_content--content\" ";
  58.         // line 12
  59.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-content");
  60.         echo ">
  61.             <div class=\"card__content\">
  62.                 <a href=\"";
  63.         // line 14
  64.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_show", ["slug" => 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.'14$this->source); })()), "slug", [], "any"falsefalsefalse14), "_locale" => twig_get_attribute($this->env$this->sourcetwig_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.'14$this->source); })()), "translation", [], "any"falsefalsefalse14), "locale", [], "any"falsefalsefalse14)]), "html"nulltrue);
  65.         echo "\" ";
  66.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-name"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.'14$this->source); })()), "name", [], "any"falsefalsefalse14));
  67.         echo ">
  68.                     <div class=\"Product_Box_content--name\">";
  69.         // line 15
  70.         echo twig_escape_filter($this->envtwig_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.'15$this->source); })()), "name", [], "any"falsefalsefalse15), "html"nulltrue);
  71.         echo "</div>
  72.                 </a>
  73.                 <div class=\"Product_Box_content--description\">";
  74.         // line 17
  75.         echo twig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_striptags(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.'17$this->source); })()), "shortDescription", [], "any"falsefalsefalse17))), "truncate", [=> 240=> "..."=> false], "method"falsefalsefalse17);
  76.         echo "</div>
  77.                 <a href=\"";
  78.         // line 18
  79.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_show", ["slug" => 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.'18$this->source); })()), "slug", [], "any"falsefalsefalse18), "_locale" => twig_get_attribute($this->env$this->sourcetwig_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.'18$this->source); })()), "translation", [], "any"falsefalsefalse18), "locale", [], "any"falsefalsefalse18)]), "html"nulltrue);
  80.         echo "\" ";
  81.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-name"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.'18$this->source); })()), "name", [], "any"falsefalsefalse18));
  82.         echo ">
  83.                     <img src=\"";
  84.         // line 19
  85.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ThemeExtension']->getPath("arrow-right.svg"), "html"nulltrue);
  86.         echo "\">
  87.                     ";
  88.         // line 21
  89.         echo "                    Lire plus
  90.                 </a>
  91.                 ";
  92.         // line 23
  93.         if ( !twig_get_attribute($this->env$this->sourcetwig_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.'23$this->source); })()), "enabledVariants", [], "any"falsefalsefalse23), "empty", [], "method"falsefalsefalse23)) {
  94.             // line 24
  95.             echo "                    <div class=\"sylius-product-price\" ";
  96.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-price");
  97.             echo ">";
  98.             echo twig_call_macro($macros["money"], "macro_calculatePrice", [$this->env->getFilter('sylius_resolve_variant')->getCallable()((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'24$this->source); })()))], 24$context$this->getSourceContext());
  99.             echo " HT</div>
  100.                 ";
  101.         }
  102.         // line 26
  103.         echo "            </div>
  104.             <div class=\"buttonCount buttonCountSearch\">
  105.                 ";
  106.         // line 28
  107.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_cart_add_item", ["template" => "@SyliusShop/Product/Show/_addToCart.html.twig""productId" => 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.'28$this->source); })()), "id", [], "any"falsefalsefalse28)]));
  108.         echo "
  109.             </div>
  110.         </div>
  111.     </div>
  112. </div>
  113. ";
  114.         
  115.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  116.         
  117.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  118.     }
  119.     public function getTemplateName()
  120.     {
  121.         return "@SyliusShop/Product/Box/_content.html.twig";
  122.     }
  123.     public function isTraitable()
  124.     {
  125.         return false;
  126.     }
  127.     public function getDebugInfo()
  128.     {
  129.         return array (  116 => 28,  112 => 26,  104 => 24,  102 => 23,  98 => 21,  94 => 19,  88 => 18,  84 => 17,  79 => 15,  73 => 14,  68 => 12,  63 => 9,  61 => 8,  54 => 6,  48 => 3,  45 => 2,  43 => 1,);
  130.     }
  131.     public function getSourceContext()
  132.     {
  133.         return new Source("{% import \"@SyliusShop/Common/Macro/money.html.twig\" as money %}
  134. <div class=\" swiper-slide\" {{ sylius_test_html_attribute('product') }}>
  135.     <div class=\"ui fluid card  Product_Box_content\">
  136.         <div class=\"Product_Box_content--content\">
  137.             <a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
  138.                 <div class=\"Product_Box_content--image\">
  139.                     {% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product} %}
  140.                 </div>
  141.             </a>
  142.         </div>
  143.         <div class=\"Product_Box_content--content\" {{ sylius_test_html_attribute('product-content') }}>
  144.             <div class=\"card__content\">
  145.                 <a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
  146.                     <div class=\"Product_Box_content--name\">{{ product.name }}</div>
  147.                 </a>
  148.                 <div class=\"Product_Box_content--description\">{{product.shortDescription|striptags|u.truncate(240, '...', false)|raw}}</div>
  149.                 <a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
  150.                     <img src=\"{{ theme('arrow-right.svg') }}\">
  151.                     {# {{ 'sylius.ui.view_more'|trans }} #}
  152.                     Lire plus
  153.                 </a>
  154.                 {% if not product.enabledVariants.empty() %}
  155.                     <div class=\"sylius-product-price\" {{ sylius_test_html_attribute('product-price') }}>{{ money.calculatePrice(product|sylius_resolve_variant) }} HT</div>
  156.                 {% endif %}
  157.             </div>
  158.             <div class=\"buttonCount buttonCountSearch\">
  159.                 {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  160.             </div>
  161.         </div>
  162.     </div>
  163. </div>
  164. ""@SyliusShop/Product/Box/_content.html.twig""/var/www/html/templates/bundles/SyliusShopBundle/Product/Box/_content.html.twig");
  165.     }
  166. }