<?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;
/* @SyliusShop/Product/_itemProduct.html.twig */
class __TwigTemplate_8bbe7f8324ff018f2e64d0b65391e7a0e1b44eb7bf99834ec471055eb0461176 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/_itemProduct.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/_itemProduct.html.twig"));
// line 1
$macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig", "@SyliusShop/Product/_itemProduct.html.twig", 1)->unwrap();
// line 2
echo "
<div class=\"ui fluid card Product_Box_content itemProductList\" ";
// line 3
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product");
echo ">
<a href=\"";
// line 4
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", false, false, false, 4), "_locale" => twig_get_attribute($this->env, $this->source, 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); })()), "translation", [], "any", false, false, false, 4), "locale", [], "any", false, false, false, 4)]), "html", null, true);
echo "\" ";
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", false, false, false, 4));
echo ">
<div class=\"Product_Box_content--image\">
";
// line 6
$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); })())]));
// line 7
echo " </div>
</a>
<div class=\"Product_Box_content--content content\" ";
// line 9
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-content");
echo ">
<div>
<a href=\"";
// line 11
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", false, false, false, 11), "_locale" => twig_get_attribute($this->env, $this->source, 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); })()), "translation", [], "any", false, false, false, 11), "locale", [], "any", false, false, false, 11)]), "html", null, true);
echo "\" ";
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", false, false, false, 11));
echo ">
<div class=\"Product_Box_content--content--name\">";
// line 12
echo twig_escape_filter($this->env, 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.', 12, $this->source); })()), "name", [], "any", false, false, false, 12), "html", null, true);
echo "</div>
</a>
<a href=\"";
// line 14
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", false, false, false, 14), "_locale" => twig_get_attribute($this->env, $this->source, 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); })()), "translation", [], "any", false, false, false, 14), "locale", [], "any", false, false, false, 14)]), "html", null, true);
echo "\" ";
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", false, false, false, 14));
echo ">
<img src=\"";
// line 15
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ThemeExtension']->getPath("arrow-right.svg"), "html", null, true);
echo "\">
";
// line 16
echo "Lire plus
</a>
";
// line 18
if ( !twig_get_attribute($this->env, $this->source, 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); })()), "enabledVariants", [], "any", false, false, false, 18), "empty", [], "method", false, false, false, 18)) {
// line 19
echo " <div class=\"sylius-product-price\" ";
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-price");
echo ">";
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());
echo " HT</div>
";
}
// line 21
echo " </div>
";
// line 22
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", false, false, false, 22)]));
echo "
</div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/_itemProduct.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% import \"@SyliusShop/Common/Macro/money.html.twig\" as money %}
<div class=\"ui fluid card Product_Box_content itemProductList\" {{ sylius_test_html_attribute('product') }}>
<a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
<div class=\"Product_Box_content--image\">
{% include '@SyliusShop/Product/_mainImage.html.twig' with {'product': product} %}
</div>
</a>
<div class=\"Product_Box_content--content content\" {{ sylius_test_html_attribute('product-content') }}>
<div>
<a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
<div class=\"Product_Box_content--content--name\">{{ product.name }}</div>
</a>
<a href=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\" {{ sylius_test_html_attribute('product-name', product.name) }}>
<img src=\"{{ theme('arrow-right.svg') }}\">
{# {{ 'sylius.ui.view_more'|trans }} #}Lire plus
</a>
{% if not product.enabledVariants.empty() %}
<div class=\"sylius-product-price\" {{ sylius_test_html_attribute('product-price') }}>{{ money.calculatePrice(product|sylius_resolve_variant) }} HT</div>
{% endif %}
</div>
{{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
</div>
</div>
", "@SyliusShop/Product/_itemProduct.html.twig", "/var/www/html/templates/bundles/SyliusShopBundle/Product/_itemProduct.html.twig");
}
}