var/cache/dev/twig/aa/aa306baa8c8026a662a113e8f5d5491327c6d0bd4fd10777d64056165571d29c.php line 33

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/_itemProduct.html.twig */
  14. class __TwigTemplate_8bbe7f8324ff018f2e64d0b65391e7a0e1b44eb7bf99834ec471055eb0461176 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/_itemProduct.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/_itemProduct.html.twig"));
  33.         // line 1
  34.         $macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig""@SyliusShop/Product/_itemProduct.html.twig"1)->unwrap();
  35.         // line 2
  36.         echo "
  37. <div class=\"ui fluid card Product_Box_content itemProductList\" ";
  38.         // line 3
  39.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product");
  40.         echo ">
  41.     <a href=\"";
  42.         // line 4
  43.         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.'4$this->source); })()), "slug", [], "any"falsefalsefalse4), "_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.'4$this->source); })()), "translation", [], "any"falsefalsefalse4), "locale", [], "any"falsefalsefalse4)]), "html"nulltrue);
  44.         echo "\" ";
  45.         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.'4$this->source); })()), "name", [], "any"falsefalsefalse4));
  46.         echo ">
  47.         <div class=\"Product_Box_content--image\">
  48.             ";
  49.         // line 6
  50.         $this->loadTemplate("@SyliusShop/Product/_mainImage.html.twig""@SyliusShop/Product/_itemProduct.html.twig"6)->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.'6$this->source); })())]));
  51.         // line 7
  52.         echo "        </div>
  53.     </a>
  54.     <div class=\"Product_Box_content--content content\" ";
  55.         // line 9
  56.         echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-content");
  57.         echo ">
  58.         <div>
  59.             <a href=\"";
  60.         // line 11
  61.         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.'11$this->source); })()), "slug", [], "any"falsefalsefalse11), "_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.'11$this->source); })()), "translation", [], "any"falsefalsefalse11), "locale", [], "any"falsefalsefalse11)]), "html"nulltrue);
  62.         echo "\" ";
  63.         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.'11$this->source); })()), "name", [], "any"falsefalsefalse11));
  64.         echo ">
  65.                 <div class=\"Product_Box_content--content--name\">";
  66.         // line 12
  67.         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.'12$this->source); })()), "name", [], "any"falsefalsefalse12), "html"nulltrue);
  68.         echo "</div>
  69.             </a>
  70.             <a href=\"";
  71.         // line 14
  72.         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);
  73.         echo "\" ";
  74.         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));
  75.         echo ">
  76.                 <img src=\"";
  77.         // line 15
  78.         echo twig_escape_filter($this->env$this->extensions['App\Twig\ThemeExtension']->getPath("arrow-right.svg"), "html"nulltrue);
  79.         echo "\">
  80.                 ";
  81.         // line 16
  82.         echo "Lire plus
  83.             </a>
  84.             ";
  85.         // line 18
  86.         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.'18$this->source); })()), "enabledVariants", [], "any"falsefalsefalse18), "empty", [], "method"falsefalsefalse18)) {
  87.             // line 19
  88.             echo "                <div class=\"sylius-product-price\" ";
  89.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-price");
  90.             echo ">";
  91.             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.'19$this->source); })()))], 19$context$this->getSourceContext());
  92.             echo " HT</div>
  93.             ";
  94.         }
  95.         // line 21
  96.         echo "        </div>
  97.         ";
  98.         // line 22
  99.         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.'22$this->source); })()), "id", [], "any"falsefalsefalse22)]));
  100.         echo "
  101.     </div>
  102. </div>
  103. ";
  104.         
  105.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  106.         
  107.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  108.     }
  109.     public function getTemplateName()
  110.     {
  111.         return "@SyliusShop/Product/_itemProduct.html.twig";
  112.     }
  113.     public function isTraitable()
  114.     {
  115.         return false;
  116.     }
  117.     public function getDebugInfo()
  118.     {
  119.         return array (  108 => 22,  105 => 21,  97 => 19,  95 => 18,  91 => 16,  87 => 15,  81 => 14,  76 => 12,  70 => 11,  65 => 9,  61 => 7,  59 => 6,  52 => 4,  48 => 3,  45 => 2,  43 => 1,);
  120.     }
  121.     public function getSourceContext()
  122.     {
  123.         return new Source("{% import \"@SyliusShop/Common/Macro/money.html.twig\" as money %}
  124. <div class=\"ui fluid card Product_Box_content itemProductList\" {{ sylius_test_html_attribute('product') }}>
  125.     <a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
  126.         <div class=\"Product_Box_content--image\">
  127.             {% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product} %}
  128.         </div>
  129.     </a>
  130.     <div class=\"Product_Box_content--content content\" {{ sylius_test_html_attribute('product-content') }}>
  131.         <div>
  132.             <a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
  133.                 <div class=\"Product_Box_content--content--name\">{{ product.name }}</div>
  134.             </a>
  135.             <a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
  136.                 <img src=\"{{ theme('arrow-right.svg') }}\">
  137.                 {# {{ 'sylius.ui.view_more'|trans }} #}Lire plus
  138.             </a>
  139.             {% if not product.enabledVariants.empty() %}
  140.                 <div class=\"sylius-product-price\" {{ sylius_test_html_attribute('product-price') }}>{{ money.calculatePrice(product|sylius_resolve_variant) }} HT</div>
  141.             {% endif %}
  142.         </div>
  143.         {{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
  144.     </div>
  145. </div>
  146. ""@SyliusShop/Product/_itemProduct.html.twig""/var/www/html/templates/bundles/SyliusShopBundle/Product/_itemProduct.html.twig");
  147.     }
  148. }