<?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/Box/_content.html.twig */
class __TwigTemplate_2fb57ea9c02b09c7a461ae14929696766937929383a9d8f9fb5566d852f57ec7 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/Box/_content.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/Box/_content.html.twig"));
// line 1
$macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig", "@SyliusShop/Product/Box/_content.html.twig", 1)->unwrap();
// line 2
echo "
<div class=\" swiper-slide\" ";
// line 3
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product");
echo ">
<div class=\"ui fluid card Product_Box_content\">
<div class=\"Product_Box_content--content\">
<a href=\"";
// line 6
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", false, false, false, 6), "_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.', 6, $this->source); })()), "translation", [], "any", false, false, false, 6), "locale", [], "any", false, false, false, 6)]), "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.', 6, $this->source); })()), "name", [], "any", false, false, false, 6));
echo ">
<div class=\"Product_Box_content--image\">
";
// line 8
$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); })())]));
// line 9
echo " </div>
</a>
</div>
<div class=\"Product_Box_content--content\" ";
// line 12
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-content");
echo ">
<div class=\"card__content\">
<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 ">
<div class=\"Product_Box_content--name\">";
// line 15
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.', 15, $this->source); })()), "name", [], "any", false, false, false, 15), "html", null, true);
echo "</div>
</a>
<div class=\"Product_Box_content--description\">";
// line 17
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", false, false, false, 17))), "truncate", [0 => 240, 1 => "...", 2 => false], "method", false, false, false, 17);
echo "</div>
<a href=\"";
// line 18
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", false, false, false, 18), "_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.', 18, $this->source); })()), "translation", [], "any", false, false, false, 18), "locale", [], "any", false, false, false, 18)]), "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.', 18, $this->source); })()), "name", [], "any", false, false, false, 18));
echo ">
<img src=\"";
// line 19
echo twig_escape_filter($this->env, $this->extensions['App\Twig\ThemeExtension']->getPath("arrow-right.svg"), "html", null, true);
echo "\">
";
// line 21
echo " Lire plus
</a>
";
// line 23
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.', 23, $this->source); })()), "enabledVariants", [], "any", false, false, false, 23), "empty", [], "method", false, false, false, 23)) {
// line 24
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.', 24, $this->source); })()))], 24, $context, $this->getSourceContext());
echo " HT</div>
";
}
// line 26
echo " </div>
<div class=\"buttonCount buttonCountSearch\">
";
// line 28
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", false, false, false, 28)]));
echo "
</div>
</div>
</div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Box/_content.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% import \"@SyliusShop/Common/Macro/money.html.twig\" as money %}
<div class=\" swiper-slide\" {{ sylius_test_html_attribute('product') }}>
<div class=\"ui fluid card Product_Box_content\">
<div class=\"Product_Box_content--content\">
<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>
<div class=\"Product_Box_content--content\" {{ sylius_test_html_attribute('product-content') }}>
<div class=\"card__content\">
<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--name\">{{ product.name }}</div>
</a>
<div class=\"Product_Box_content--description\">{{product.shortDescription|striptags|u.truncate(240, '...', false)|raw}}</div>
<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>
<div class=\"buttonCount buttonCountSearch\">
{{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
</div>
</div>
</div>
</div>
", "@SyliusShop/Product/Box/_content.html.twig", "/var/www/html/templates/bundles/SyliusShopBundle/Product/Box/_content.html.twig");
}
}