<?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/Cart/summary.html.twig */
class __TwigTemplate_888a311e5a0e41994c3cd8dc9eac6e64ac3b30493749c2b5c431f79ea91a9f6e extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'banner' => [$this, 'block_banner'],
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@SyliusShop/layout.html.twig";
}
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/Cart/summary.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/Cart/summary.html.twig"));
// line 8
$this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 8, $this->source); })()), [0 => "@SyliusShop/Form/theme.html.twig"], true);
// line 10
$macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusUi/Macro/messages.html.twig", "@SyliusShop/Cart/summary.html.twig", 10)->unwrap();
// line 1
$this->parent = $this->loadTemplate("@SyliusShop/layout.html.twig", "@SyliusShop/Cart/summary.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 4
public function block_banner($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(), "block", "banner"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "banner"));
// line 5
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("odiseo_sylius_banner_plugin_shop_partial_banner", ["template" => "@SyliusShop/Banner/banner1.html.twig"]));
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 13
public function block_title($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(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
// line 14
echo "\t";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.votrepanier"), "html", null, true);
echo "
\t|
\t";
// line 16
$this->displayParentBlock("title", $context, $blocks);
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 19
public function block_content($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(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 20
echo " ";
$this->displayBlock('breadcrumb', $context, $blocks);
// line 27
echo "
<div class=\"cart\">
<h1 class=\"page__title\">
<span class=\"page__tagline\">
";
// line 33
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.boutiqueenligne"), "html", null, true);
echo "
</span>
";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.votrepanier"), "html", null, true);
echo "
</h1>
\t ";
// line 38
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render([0 => "sylius.shop.checkout.address.steps", 1 => "sylius.shop.checkout.steps"], $context);
echo "
";
// line 40
$this->loadTemplate("@SyliusShop/_flashes.html.twig", "@SyliusShop/Cart/summary.html.twig", 40)->display($context);
// line 41
echo "
";
// line 44
if ( !twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 44, $this->source); })()), "empty", [], "any", false, false, false, 44)) {
// line 45
echo "
";
// line 48
if ((isset($context["fidelium_his_activate"]) || array_key_exists("fidelium_his_activate", $context) ? $context["fidelium_his_activate"] : (function () { throw new RuntimeError('Variable "fidelium_his_activate" does not exist.', 48, $this->source); })())) {
// line 49
echo " <div id=\"fidelium_cart\">
";
// line 52
if ((array_key_exists("is_logged_in", $context) && !(isset($context["is_logged_in"]) || array_key_exists("is_logged_in", $context) ? $context["is_logged_in"] : (function () { throw new RuntimeError('Variable "is_logged_in" does not exist.', 52, $this->source); })()))) {
// line 53
echo " <form class=\"message info\" id=\"fideliumform\">
<div>
<i class=\"fas fa-info-circle\"></i>";
// line 55
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.seconnecterfidelium2"), "html", null, true);
echo "</div>
<a href=\"";
// line 56
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_login");
echo "?destination=cart\" class=\"button button--tertiary button--small\" >";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.seconnecter"), "html", null, true);
echo "</a>
</form>
";
} elseif (( // line 59
array_key_exists("fideliumCard", $context) && (isset($context["fideliumCard"]) || array_key_exists("fideliumCard", $context) ? $context["fideliumCard"] : (function () { throw new RuntimeError('Variable "fideliumCard" does not exist.', 59, $this->source); })()))) {
// line 60
echo " <form class=\"message info\" id=\"fideliumform\">
<div>
<i class=\"fas fa-info-circle\"></i>
";
// line 63
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.cumulfidelium", ["%points%" => twig_get_attribute($this->env, $this->source, (isset($context["fideliumCard"]) || array_key_exists("fideliumCard", $context) ? $context["fideliumCard"] : (function () { throw new RuntimeError('Variable "fideliumCard" does not exist.', 63, $this->source); })()), "nPoints", [], "any", false, false, false, 63)]);
echo "
</div>
<div class=\"cart__form-fidelium\">
<select name=\"fideliumpoints\" id=\"fideliumpoints\" class=\"tiny-select cart__select-fidelium\">
<option value=\"\">";
// line 67
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.selectionnermontant"), "html", null, true);
echo "</option>
";
// line 68
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["listBoxFidelium"]) || array_key_exists("listBoxFidelium", $context) ? $context["listBoxFidelium"] : (function () { throw new RuntimeError('Variable "listBoxFidelium" does not exist.', 68, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["option"]) {
// line 69
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["option"], "points", [], "any", false, false, false, 69) < twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 69, $this->source); })()), "getTotalWithOutAdjustments", [], "method", false, false, false, 69))) {
// line 70
echo " <option value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["option"], "points", [], "any", false, false, false, 70), "html", null, true);
echo "\"
";
// line 72
if ((twig_get_attribute($this->env, $this->source, $context["option"], "points", [], "any", false, false, false, 72) == (isset($context["orderpoint"]) || array_key_exists("orderpoint", $context) ? $context["orderpoint"] : (function () { throw new RuntimeError('Variable "orderpoint" does not exist.', 72, $this->source); })()))) {
echo " SELECTED ";
}
echo " >
";
// line 74
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.pointsutilises", ["%points%" => twig_get_attribute($this->env, $this->source, $context["option"], "points", [], "any", false, false, false, 74)]), "html", null, true);
echo "
(-";
// line 75
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["option"], "label", [], "any", false, false, false, 75), "html", null, true);
echo ")
</option>
";
}
// line 78
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['option'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 79
echo " </select>
<input type=\"submit\" value=\"";
// line 80
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.cart.valider"), "html", null, true);
echo "\" class=\"button button--tertiary button--small\"/>
</div>
</form>
<!-- le user n'est pas connecté-->
";
} else {
// line 87
echo "
<!-- le user est connecté mais n'a pas activé sa carte-->
<form class=\"message info\" id=\"fideliumform\">
<div>
<i class=\"fas fa-info-circle\"></i>
";
// line 92
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.veuillezactiverfidelium"), "html", null, true);
echo "
</div>
<a href=\"";
// line 94
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fidelium_register");
echo "?destination=cart\" class=\"button button--tertiary button--small\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.activerfidelium"), "html", null, true);
echo "</a>
</form>
";
}
// line 97
echo " </div>
";
}
// line 99
echo "
<div class=\"ui stackable grid\">
<div class=\"wide column cart__products\">
<div>
";
// line 103
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 103, $this->source); })()), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_cart_save"), "attr" => ["class" => "ui loadable form", "novalidate" => "novalidate", "id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 103, $this->source); })()), "vars", [], "any", false, false, false, 103), "id", [], "any", false, false, false, 103)]]);
echo "
";
// line 104
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 104, $this->source); })()), 'errors');
echo "
<input type=\"hidden\" name=\"_method\" value=\"PATCH\"/>
<input type=\"hidden\" id=\"fidelium\" name=\"fidelium\" value=\"\"/>
<input type=\"hidden\" id=\"fideliumupdate\" name=\"fideliumupdate\" value=\"\"/>
";
// line 108
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 108, $this->source); })()), "_token", [], "any", false, false, false, 108), 'row');
echo "
";
// line 109
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 109, $this->source); })()), 'form_end', ["render_rest" => false]);
echo "
";
// line 111
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.cart.summary.items", ["cart" => (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 111, $this->source); })()), "form" => (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 111, $this->source); })())]);
echo "
<table id=\"sylius-cart-items\" ";
// line 113
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("cart-items");
echo " class=\"ui very basic celled table\">
<thead>
<tr>
<th class=\"cart__table-delete\" width=\"25\" style=\"padding: 0 10px !important\"></th>
<th >";
// line 117
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.cart.produits"), "html", null, true);
echo "</th>
<th class=\"center aligned\">";
// line 118
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.cart.prixttc"), "html", null, true);
echo "</th>
<th class=\"center aligned cart__table-qty\">";
// line 119
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.qty"), "html", null, true);
echo "</th>
<th class=\"right aligned\">";
// line 120
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.cart.soustotal"), "html", null, true);
echo "</th>
</tr>
</thead>
<tbody>
";
// line 125
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 125, $this->source); })()), "items", [], "any", false, false, false, 125));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["key"] => $context["item"]) {
// line 126
echo "
";
// line 127
$this->loadTemplate("@SyliusShop/Cart/Summary/_item.html.twig", "@SyliusShop/Cart/summary.html.twig", 127)->display(twig_array_merge($context, ["item" => $context["item"], "form" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 127, $this->source); })()), "items", [], "any", false, false, false, 127), $context["key"], [], "array", false, false, false, 127), "main_form" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 127, $this->source); })()), "vars", [], "any", false, false, false, 127), "id", [], "any", false, false, false, 127), "loop_index" => twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 127)]));
// line 128
echo "
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 130
echo " </tbody>
</table>
<div class=\"ui hidden divider\"></div>
";
// line 135
echo " </div>
</div>
</div>
<div class=\"cart__columns\">
<div class=\"cart-promotion\">
";
// line 142
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "promotionCoupon", [], "any", true, true, false, 142)) {
// line 143
echo " <h4 class=\"dark-header\"><i class=\"fas fa-certificate\"></i>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.codepromotitre"), "html", null, true);
echo "</h4>
<div class=\"cart-promotion__content\">
<p class=\"cart-promotion__text\">";
// line 145
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.codepromotexte"), "html", null, true);
echo "</p>
";
// line 147
$context["main_form"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 147, $this->source); })()), "vars", [], "any", false, false, false, 147), "id", [], "any", false, false, false, 147);
// line 148
echo " <div id=\"sylius-coupon\" ";
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("cart-promotion-coupon");
echo ">
<div class=\"cart-promotion__form\">
";
// line 150
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 150, $this->source); })()), "promotionCoupon", [], "any", false, false, false, 150), 'widget', $this->env->getFilter('sylius_merge_recursive')->getCallable()($this->env->getFunction('sylius_test_form_attribute')->getCallable()("cart-promotion-coupon-input"), ["attr" => ["form" => (isset($context["main_form"]) || array_key_exists("main_form", $context) ? $context["main_form"] : (function () { throw new RuntimeError('Variable "main_form" does not exist.', 150, $this->source); })()), "placeholder" => ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.enter_your_code") . "...")]]));
echo "
<button type=\"submit\" id=\"sylius-save\" ";
// line 151
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("apply-coupon-button");
echo " class=\"button button--secondary button--medium\" form=\"";
echo twig_escape_filter($this->env, (isset($context["main_form"]) || array_key_exists("main_form", $context) ? $context["main_form"] : (function () { throw new RuntimeError('Variable "main_form" does not exist.', 151, $this->source); })()), "html", null, true);
echo "\">
";
// line 152
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.apply_coupon"), "html", null, true);
echo "</button>
</div>
<br>
";
// line 155
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 155, $this->source); })()), "promotionCoupon", [], "any", false, false, false, 155), 'errors');
echo "
</div>
</div>
";
}
// line 160
echo " </div>
";
// line 162
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.cart.summary", ["cart" => (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 162, $this->source); })())]);
echo "
</div>
<br />
<div class=\"field\">
<div class=\"ui toggle\">
<input type=\"checkbox\" id=\"cgv-checkbox\" name=\"cgv-checkbox\">
<label for=\"cgv-checkbox\">
J'accepte les <a href=\"";
// line 172
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sylius_cms_plugin_shop_page_show", ["slug" => "conditions-generales-de-vente"]);
echo "\" target=\"_blank\" style=\"text-decoration: underline;\">conditions générales de vente</a> du site
</label>
<br>
<div class=\"ui red pointing label sylius-validation-error\" id=\"cgv-checkbox-error\" style=\"display: none;\">
Veuillez valider les CGV pour continuer.
</div>
</div>
</div>
<div class=\"cart__buttons-actions\">
<a href=\"";
// line 182
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_shop_product_search");
echo "\" class=\"button button--outline\">
<i class=\"fas fa-arrow-left\"></i>
";
// line 184
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.poursuivre"), "html", null, true);
echo "</a>
<a href=\"";
// line 186
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_checkout_start");
echo "\" class=\"button button--secondary\" id=\"confirm-command-btn\">
<i class=\"check icon\"></i>
";
// line 188
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.checkout"), "html", null, true);
echo "</a>
</div>
";
// line 191
if ((isset($context["fidelium_his_activate"]) || array_key_exists("fidelium_his_activate", $context) ? $context["fidelium_his_activate"] : (function () { throw new RuntimeError('Variable "fidelium_his_activate" does not exist.', 191, $this->source); })())) {
// line 192
echo " <div class=\"fideliumtxt inline-content-shadow\">
<div>
<h3 class=\"margin-bottom-0 font-primary\"><strong>";
// line 194
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.gagnerfidelium");
echo " </strong></h3>
<i class=\"text-small\">";
// line 195
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.demanderfidelium"), "html", null, true);
echo "</i>
</div>
<div>";
// line 197
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.cumulerfidelium");
echo "</div>
";
// line 200
if ((array_key_exists("is_logged_in", $context) && !(isset($context["is_logged_in"]) || array_key_exists("is_logged_in", $context) ? $context["is_logged_in"] : (function () { throw new RuntimeError('Variable "is_logged_in" does not exist.', 200, $this->source); })()))) {
// line 201
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_login");
echo "?destination=cart\" class=\"button button--outline\">
";
// line 202
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.seconnecter"), "html", null, true);
echo "
</a>
";
} elseif (( // line 205
array_key_exists("fideliumCard", $context) && ((isset($context["fideliumCard"]) || array_key_exists("fideliumCard", $context) ? $context["fideliumCard"] : (function () { throw new RuntimeError('Variable "fideliumCard" does not exist.', 205, $this->source); })()) == false))) {
// line 206
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fidelium_register");
echo "?destination=cart\" class=\"button button--outline\">
";
// line 207
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.fidelium.activerfidelium"), "html", null, true);
echo "
</a>
";
}
// line 210
echo "
</div>
";
}
// line 214
echo "
<div id=\"notre-histoire-bottom\" class=\"citation\">
<div class=\"container\">
<p>« ";
// line 217
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.textfooter.commandez"), "html", null, true);
echo " »</p>
<a class=\"button button--secondary button--medium\" href=\"";
// line 218
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_shop_product_search");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.textfooter.decouvrez"), "html", null, true);
echo "</a>
</div>
</div>
";
} else {
// line 223
echo " ";
echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.your_cart_is_empty"], 223, $context, $this->getSourceContext());
echo "
";
}
// line 225
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 20
public function block_breadcrumb($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(), "block", "breadcrumb"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
// line 21
echo " <div class=\"ui breadcrumb\">
<a href=\"";
// line 22
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_homepage");
echo "\" class=\"section\"><i class=\"fas fa-home\"></i><strong>Mons Fromages</strong></a>
<div class=\"divider\"> / </div>
<a href=\"";
// line 24
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_account_dashboard");
echo "\" class=\"section\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.votrepanier"), "html", null, true);
echo "</a>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 229
public function block_javascripts($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(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 230
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script type=\"text/javascript\">
\$('#fideliumform').on('submit', function(e) {
e.preventDefault();
\$('#fidelium').val(\$('#fideliumpoints').val());
\$('#fideliumupdate').val(\"1\");
\$('#sylius_cart').submit();
});
\$('.sylius-quantity input').on('change', function() {
\$('#sylius_cart').submit();
});
\$('.line.trash form').on('submit', function(e) {
e.preventDefault();
var form = this;
\$('.ui.modal.cart') .modal({
closable : false,
onApprove : function() {
form.submit();
}
}).modal('show');
return false;
});
\$('#confirm-command-btn').click((e) => {
if (!\$('#cgv-checkbox').is(':checked')) {
e.preventDefault();
\$('#cgv-checkbox-error').show();
}
})
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Cart/summary.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 623 => 230, 613 => 229, 598 => 24, 593 => 22, 590 => 21, 580 => 20, 569 => 225, 563 => 223, 553 => 218, 549 => 217, 544 => 214, 538 => 210, 532 => 207, 527 => 206, 525 => 205, 519 => 202, 514 => 201, 512 => 200, 506 => 197, 501 => 195, 497 => 194, 493 => 192, 491 => 191, 485 => 188, 480 => 186, 475 => 184, 470 => 182, 457 => 172, 444 => 162, 440 => 160, 432 => 155, 426 => 152, 420 => 151, 416 => 150, 410 => 148, 408 => 147, 403 => 145, 397 => 143, 395 => 142, 386 => 135, 380 => 130, 365 => 128, 363 => 127, 360 => 126, 343 => 125, 335 => 120, 331 => 119, 327 => 118, 323 => 117, 316 => 113, 311 => 111, 306 => 109, 302 => 108, 295 => 104, 291 => 103, 285 => 99, 281 => 97, 273 => 94, 268 => 92, 261 => 87, 251 => 80, 248 => 79, 242 => 78, 236 => 75, 232 => 74, 225 => 72, 219 => 70, 216 => 69, 212 => 68, 208 => 67, 201 => 63, 196 => 60, 194 => 59, 186 => 56, 182 => 55, 178 => 53, 176 => 52, 171 => 49, 169 => 48, 164 => 45, 162 => 44, 157 => 41, 155 => 40, 150 => 38, 144 => 35, 139 => 33, 131 => 27, 128 => 20, 118 => 19, 106 => 16, 100 => 14, 90 => 13, 77 => 5, 67 => 4, 56 => 1, 54 => 10, 52 => 8, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@SyliusShop/layout.html.twig' %}
{% block banner %}
{{ render(url('odiseo_sylius_banner_plugin_shop_partial_banner', {'template': '@SyliusShop/Banner/banner1.html.twig'})) }}
{% endblock %}
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
{% import '@SyliusUi/Macro/messages.html.twig' as messages %}
{% block title %}
\t{{ 'sylius.ui.votrepanier'|trans }}
\t|
\t{{ parent() }}
{% endblock %}
{% block content %}
{% block breadcrumb %}
<div class=\"ui breadcrumb\">
<a href=\"{{ path('sylius_shop_homepage') }}\" class=\"section\"><i class=\"fas fa-home\"></i><strong>Mons Fromages</strong></a>
<div class=\"divider\"> / </div>
<a href=\"{{ path('sylius_shop_account_dashboard') }}\" class=\"section\">{{ 'sylius.ui.votrepanier'|trans }}</a>
</div>
{% endblock %}
<div class=\"cart\">
<h1 class=\"page__title\">
<span class=\"page__tagline\">
{{ \"sylius.ui.boutiqueenligne\"|trans }}
</span>
{{ \"sylius.ui.votrepanier\"|trans }}
</h1>
\t {{ sylius_template_event(['sylius.shop.checkout.address.steps', 'sylius.shop.checkout.steps'], _context) }}
{% include '@SyliusShop/_flashes.html.twig' %}
{% if not cart.empty %}
{% if fidelium_his_activate %}
<div id=\"fidelium_cart\">
{% if is_logged_in is defined and not is_logged_in %}
<form class=\"message info\" id=\"fideliumform\">
<div>
<i class=\"fas fa-info-circle\"></i>{{ 'sylius.ui.seconnecterfidelium2'|trans }}</div>
<a href=\"{{ path('sylius_shop_login') }}?destination=cart\" class=\"button button--tertiary button--small\" >{{ \"sylius.ui.seconnecter\"|trans }}</a>
</form>
{% elseif fideliumCard is defined and fideliumCard %}
<form class=\"message info\" id=\"fideliumform\">
<div>
<i class=\"fas fa-info-circle\"></i>
{{ 'sylius.fidelium.cumulfidelium'|trans({'%points%': fideliumCard.nPoints}) |raw }}
</div>
<div class=\"cart__form-fidelium\">
<select name=\"fideliumpoints\" id=\"fideliumpoints\" class=\"tiny-select cart__select-fidelium\">
<option value=\"\">{{ \"sylius.fidelium.selectionnermontant\"|trans }}</option>
{% for option in listBoxFidelium %}
{% if option.points < cart.getTotalWithOutAdjustments() %}
<option value=\"{{ option.points }}\"
{% if option.points == orderpoint %} SELECTED {% endif %} >
{{ 'sylius.fidelium.pointsutilises'|trans({'%points%': option.points}) }}
(-{{ option.label }})
</option>
{% endif %}
{% endfor %}
</select>
<input type=\"submit\" value=\"{{ 'sylius.cart.valider'|trans }}\" class=\"button button--tertiary button--small\"/>
</div>
</form>
<!-- le user n'est pas connecté-->
{% else %}
<!-- le user est connecté mais n'a pas activé sa carte-->
<form class=\"message info\" id=\"fideliumform\">
<div>
<i class=\"fas fa-info-circle\"></i>
{{ 'sylius.ui.veuillezactiverfidelium'|trans }}
</div>
<a href=\"{{ path('fidelium_register') }}?destination=cart\" class=\"button button--tertiary button--small\">{{ 'sylius.fidelium.activerfidelium'|trans }}</a>
</form>
{% endif %}
</div>
{% endif %}
<div class=\"ui stackable grid\">
<div class=\"wide column cart__products\">
<div>
{{ form_start(form, {'action': path('sylius_shop_cart_save'), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
{{ form_errors(form) }}
<input type=\"hidden\" name=\"_method\" value=\"PATCH\"/>
<input type=\"hidden\" id=\"fidelium\" name=\"fidelium\" value=\"\"/>
<input type=\"hidden\" id=\"fideliumupdate\" name=\"fideliumupdate\" value=\"\"/>
{{ form_row(form._token) }}
{{ form_end(form, {'render_rest': false}) }}
{{ sylius_template_event('sylius.shop.cart.summary.items', {'cart': cart, 'form': form}) }}
<table id=\"sylius-cart-items\" {{ sylius_test_html_attribute('cart-items') }} class=\"ui very basic celled table\">
<thead>
<tr>
<th class=\"cart__table-delete\" width=\"25\" style=\"padding: 0 10px !important\"></th>
<th >{{ 'sylius.cart.produits'|trans }}</th>
<th class=\"center aligned\">{{ 'sylius.cart.prixttc'|trans }}</th>
<th class=\"center aligned cart__table-qty\">{{ 'sylius.ui.qty'|trans }}</th>
<th class=\"right aligned\">{{ 'sylius.cart.soustotal'|trans }}</th>
</tr>
</thead>
<tbody>
{% for key, item in cart.items %}
{% include '@SyliusShop/Cart/Summary/_item.html.twig' with { 'item': item, 'form': form.items[key], 'main_form': form.vars.id, 'loop_index': loop.index} %}
{% endfor %}
</tbody>
</table>
<div class=\"ui hidden divider\"></div>
{# include '@SyliusShop/Cart/Summary/_update.html.twig' with {'main_form': form.vars.id} #}
</div>
</div>
</div>
<div class=\"cart__columns\">
<div class=\"cart-promotion\">
{% if form.promotionCoupon is defined %}
<h4 class=\"dark-header\"><i class=\"fas fa-certificate\"></i>{{ 'sylius.ui.codepromotitre'|trans }}</h4>
<div class=\"cart-promotion__content\">
<p class=\"cart-promotion__text\">{{ 'sylius.ui.codepromotexte'|trans }}</p>
{% set main_form = form.vars.id %}
<div id=\"sylius-coupon\" {{ sylius_test_html_attribute('cart-promotion-coupon') }}>
<div class=\"cart-promotion__form\">
{{ form_widget(form.promotionCoupon, sylius_test_form_attribute('cart-promotion-coupon-input')|sylius_merge_recursive({'attr': {'form': main_form, 'placeholder': 'sylius.ui.enter_your_code'|trans~'...'}})) }}
<button type=\"submit\" id=\"sylius-save\" {{ sylius_test_html_attribute('apply-coupon-button') }} class=\"button button--secondary button--medium\" form=\"{{ main_form }}\">
{{ 'sylius.ui.apply_coupon'|trans }}</button>
</div>
<br>
{{ form_errors(form.promotionCoupon) }}
</div>
</div>
{% endif %}
</div>
{{ sylius_template_event('sylius.shop.cart.summary', {'cart': cart}) }}
</div>
<br />
<div class=\"field\">
<div class=\"ui toggle\">
<input type=\"checkbox\" id=\"cgv-checkbox\" name=\"cgv-checkbox\">
<label for=\"cgv-checkbox\">
J'accepte les <a href=\"{{ path('bitbag_sylius_cms_plugin_shop_page_show', {slug: 'conditions-generales-de-vente'}) }}\" target=\"_blank\" style=\"text-decoration: underline;\">conditions générales de vente</a> du site
</label>
<br>
<div class=\"ui red pointing label sylius-validation-error\" id=\"cgv-checkbox-error\" style=\"display: none;\">
Veuillez valider les CGV pour continuer.
</div>
</div>
</div>
<div class=\"cart__buttons-actions\">
<a href=\"{{ path('app_shop_product_search') }}\" class=\"button button--outline\">
<i class=\"fas fa-arrow-left\"></i>
{{ 'sylius.ui.poursuivre'|trans }}</a>
<a href=\"{{ path('sylius_shop_checkout_start') }}\" class=\"button button--secondary\" id=\"confirm-command-btn\">
<i class=\"check icon\"></i>
{{ 'sylius.ui.checkout'|trans}}</a>
</div>
{% if fidelium_his_activate %}
<div class=\"fideliumtxt inline-content-shadow\">
<div>
<h3 class=\"margin-bottom-0 font-primary\"><strong>{{ 'sylius.fidelium.gagnerfidelium'|trans|raw }} </strong></h3>
<i class=\"text-small\">{{ 'sylius.fidelium.demanderfidelium'|trans }}</i>
</div>
<div>{{ 'sylius.fidelium.cumulerfidelium'|trans|raw }}</div>
{% if is_logged_in is defined and not is_logged_in %}
<a href=\"{{ path('sylius_shop_login') }}?destination=cart\" class=\"button button--outline\">
{{ \"sylius.ui.seconnecter\"|trans }}
</a>
{% elseif fideliumCard is defined and fideliumCard == false %}
<a href=\"{{ path('fidelium_register') }}?destination=cart\" class=\"button button--outline\">
{{ 'sylius.fidelium.activerfidelium'|trans }}
</a>
{% endif %}
</div>
{% endif %}
<div id=\"notre-histoire-bottom\" class=\"citation\">
<div class=\"container\">
<p>« {{ 'sylius.textfooter.commandez'|trans }} »</p>
<a class=\"button button--secondary button--medium\" href=\"{{ path('app_shop_product_search') }}\">{{ 'sylius.textfooter.decouvrez'|trans }}</a>
</div>
</div>
{% else %}
{{ messages.info('sylius.ui.your_cart_is_empty') }}
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script type=\"text/javascript\">
\$('#fideliumform').on('submit', function(e) {
e.preventDefault();
\$('#fidelium').val(\$('#fideliumpoints').val());
\$('#fideliumupdate').val(\"1\");
\$('#sylius_cart').submit();
});
\$('.sylius-quantity input').on('change', function() {
\$('#sylius_cart').submit();
});
\$('.line.trash form').on('submit', function(e) {
e.preventDefault();
var form = this;
\$('.ui.modal.cart') .modal({
closable : false,
onApprove : function() {
form.submit();
}
}).modal('show');
return false;
});
\$('#confirm-command-btn').click((e) => {
if (!\$('#cgv-checkbox').is(':checked')) {
e.preventDefault();
\$('#cgv-checkbox-error').show();
}
})
</script>
{% endblock %}
", "@SyliusShop/Cart/summary.html.twig", "/home/mons/site/www/templates/bundles/SyliusShopBundle/Cart/summary.html.twig");
}
}