<?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/Show/_addToCart.html.twig */
class __TwigTemplate_1da300c787ca79a1fa63ea25f3ea5d54251e458f21409ffdfd8301c5865eb618 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/Show/_addToCart.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/Show/_addToCart.html.twig"));
// line 1
$macros["icons"] = $this->macros["icons"] = $this->loadTemplate("@SyliusShop/Common/Macro/icons.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 1)->unwrap();
// line 2
echo "
";
// line 3
$context["block"] = $this->extensions['App\Twig\Extensions\Cms\BlockExtension']->getBlock("texteperso_article", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sylius"]) || array_key_exists("sylius", $context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.', 3, $this->source); })()), "channel", [], "any", false, false, false, 3), "code", [], "any", false, false, false, 3));
// line 4
echo "
";
// line 5
$macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 5)->unwrap();
// line 6
echo "
";
// line 7
$context["product"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 7, $this->source); })()), "variant", [], "any", false, false, false, 7), "product", [], "any", false, false, false, 7);
// line 8
echo "
";
// line 9
$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.', 9, $this->source); })()), [0 => "@SyliusShop/Form/theme.html.twig"], true);
// line 10
echo "
";
// line 12
$context["configurator"] = false;
// line 13
$context["configuratorSimple"] = false;
// line 14
echo "
";
// line 15
if ((twig_length_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); })()), "variants", [], "any", false, false, false, 15)) > 0)) {
// line 16
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(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.', 16, $this->source); })()), "variants", [], "any", false, false, false, 16));
foreach ($context['_seq'] as $context["_key"] => $context["variant"]) {
// line 17
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["variant"], "model", [], "any", false, false, false, 17)) {
// line 18
echo " ";
$context["configurator"] = true;
// line 19
echo " ";
if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["variant"], "model", [], "any", false, false, false, 19), "advanced", [], "any", false, false, false, 19)) {
// line 20
echo " ";
$context["configuratorSimple"] = true;
// line 21
echo " ";
}
// line 22
echo " ";
}
// line 23
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['variant'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 25
echo "
<div id=\"availability-notifier\" ";
// line 26
if ($this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env, $this->source, (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 26, $this->source); })()), "variant", [], "any", false, false, false, 26))) {
echo " class=\"d-none\" ";
}
echo " >
";
// line 27
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_shop_partial_availability_notifier_create", ["productVariantId" => twig_get_attribute($this->env, $this->source, 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.', 27, $this->source); })()), "variants", [], "any", false, false, false, 27), "first", [], "any", false, false, false, 27), "id", [], "any", false, false, false, 27), "template" => "@SyliusShop/Product/Show/_availability_notifier.html.twig"]));
echo "
</div>
";
// line 30
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.', 30, $this->source); })()), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_ajax_cart_add_item", ["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.', 30, $this->source); })()), "id", [], "any", false, false, false, 30)]), "attr" => ["id" => "sylius-product-adding-to-cart", "data-product-id" => 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.', 30, $this->source); })()), "id", [], "any", false, false, false, 30), "data-js-add-to-cart" => "form", "class" => "loadable", "novalidate" => "novalidate", "data-redirect" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, (isset($context["configuration"]) || array_key_exists("configuration", $context) ? $context["configuration"] : (function () { throw new RuntimeError('Variable "configuration" does not exist.', 30, $this->source); })()), "getRedirectRoute", [0 => "summary"], "method", false, false, false, 30))]]);
echo "
";
// line 31
$this->loadTemplate("@SyliusShop/Product/Show/_seeNumericalOrPhysicalVersion.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 31)->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.', 31, $this->source); })())]));
// line 32
echo " ";
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.', 32, $this->source); })()), 'errors');
echo "
<!-- error message -->
<div class=\"alert alert-danger d-none\" data-js-add-to-cart=\"error\"
id=\"sylius-cart-validation-error\" ";
// line 36
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("cart-validation-error");
echo "></div>
<!-- select variant -->
<div id=\"sylius-product-selecting-variant\" ";
// line 39
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("product-selecting-variant");
echo ">
<div id=\"first_div\"></div>
";
// line 42
if ( !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.', 42, $this->source); })()), "simple", [], "any", false, false, false, 42)) {
// line 43
echo " <div class=\"caractistique-article pt-md-2 pt-3\">
";
// line 44
$this->loadTemplate("@SyliusShop/Product/Show/_options.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 44)->display($context);
// line 45
echo " </div>
";
}
// line 47
echo " ";
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.before_add_to_cart", ["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 47, $this->source); })()), "order_item" => (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 47, $this->source); })())]);
echo "
</div>
<!-- end select variant -->
<div class=\"etat-article d-none\">
<div id=\"enStock\"
class=\"etatbit-art color-vert ";
// line 54
if ( !$this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env, $this->source, (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 54, $this->source); })()), "variant", [], "any", false, false, false, 54))) {
echo " d-none ";
}
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.en_stock"), "html", null, true);
echo "</div>
<div id=\"horsStock\"
class=\"etatbit-art text-danger ";
// line 56
if ($this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env, $this->source, (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 56, $this->source); })()), "variant", [], "any", false, false, false, 56))) {
echo " d-none ";
}
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.en_rupture"), "html", null, true);
echo "</div>
</div>
<!-- configurator -->
";
// line 60
if ((isset($context["configurator"]) || array_key_exists("configurator", $context) ? $context["configurator"] : (function () { throw new RuntimeError('Variable "configurator" does not exist.', 60, $this->source); })())) {
// line 61
echo " ";
$this->loadTemplate("@SyliusShop/Product/Show/Configurator/_configurator.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 61)->display($context);
}
// line 63
echo "<!-- end configurator -->
<!-- quantity / price -->
<div class=\"py-2 row no-gutters align-items-center mobile-column-reverse-save\">
<!-- price -->
<div class=\"pl-3 pt-2 pt-sm-0 art-price\">
<div class=\"prix-art-panier text-sm-right text-left pt-sm-0 pt-3\">
";
// line 70
$this->loadTemplate("@SyliusShop/Product/Show/_priceWidget.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 70)->display($context);
// line 71
echo " </div>
</div>
<!-- quantity -->
<div class=\"quantity-container\">
<div class=\"d-block d-md-none font-seize col-12\">";
// line 75
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.quantity"), "html", null, true);
echo " :</div>
<div class=\"col-sm-auto\">
<div class=\"art-qte px-0 fiche-art-qty\">
<div class=\"contenu-qte-art qte-article-fiche\">
<div class=\"qte-panier sylius-quantity d-flex no-gutters align-items-center\">
<a role=\"button\" class=\"qte-moins-art col-auto\" title=\"";
// line 80
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.decrease_quantity"), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/moins.svg"), "html", null, true);
echo "\" class=\"d-block\" alt=\"-\"></a>
<div class=\"d-flex no-gutters col align-items-center px-2 bg-white\">
<div class=\"col-auto mb-0 label-qte\">";
// line 82
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.quantity"), "html", null, true);
echo " :</div>
<div class=\"col form-group-nomarg pl-1\">";
// line 83
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 83, $this->source); })()), "cartItem", [], "any", false, false, false, 83), "quantity", [], "any", false, false, false, 83), 'row', $this->env->getFunction('sylius_test_form_attribute')->getCallable()("quantity"));
echo "</div>
</div>
<a role=\"button\" class=\"qte-plus-art col-auto\" title=\"";
// line 85
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.increase_quantity"), "html", null, true);
echo "\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/plus.svg"), "html", null, true);
echo "\" class=\"d-block\" alt=\"+\"></a>
";
// line 86
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.show.add_to_cart_form", ["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 86, $this->source); })()), "order_item" => (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 86, $this->source); })())]);
echo "
</div>
</div>
</div>
</div>
</div>
<!-- end quantity -->
<!-- configurator -->
";
// line 96
if ((isset($context["configurator"]) || array_key_exists("configurator", $context) ? $context["configurator"] : (function () { throw new RuntimeError('Variable "configurator" does not exist.', 96, $this->source); })())) {
// line 97
echo " ";
$this->loadTemplate("@SyliusShop/Product/Show/Configurator/_wrap_configurator.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 97)->display($context);
// line 98
echo " ";
}
// line 99
echo " <!-- end configurator -->
<!-- messages infos -->
<div class=\"widgets-not-valid\" style=\"visibility: hidden;\">
";
// line 103
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.configurator.error.widgets_not_valid"), "html", null, true);
echo "
</div>
</div>
<!-- end quantity / price -->
<!-- messages infos -->
<div class=\"widgets-not-valid\" style=\"visibility: hidden;\">
";
// line 110
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.configurator.error.widgets_not_valid"), "html", null, true);
echo "
</div>
<div id=\"choose-your-option-info-msg\" class=\"add-to-cart-error-msg d-none\">
";
// line 113
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.ui.choose_your_option_before_adding_to_cart"), "html", null, true);
echo "
</div>
<div id=\"step-by-step-info-msg\" class=\"color-pink-s font-weight-bold font-12\" style=\"display: none;\">";
// line 115
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.fill_option_before_adding_to_cart"), "html", null, true);
echo "</div>
<!-- end messages infos -->
";
// line 118
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.', 118, $this->source); })()), "_token", [], "any", false, false, false, 118), 'row');
echo "
<!-- add to cart button -->
";
// line 122
echo "<div ";
if ((((array_key_exists("configurator", $context) && ((isset($context["configurator"]) || array_key_exists("configurator", $context) ? $context["configurator"] : (function () { throw new RuntimeError('Variable "configurator" does not exist.', 122, $this->source); })()) == true)) && !(isset($context["configuratorSimple"]) || array_key_exists("configuratorSimple", $context) ? $context["configuratorSimple"] : (function () { throw new RuntimeError('Variable "configuratorSimple" does not exist.', 122, $this->source); })())) && !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 122, $this->source); })()), "variant", [], "any", false, false, false, 122), "model", [], "any", false, false, false, 122)))) {
echo "class=\"btn-panier-content pt-2 pb-2 d-none\"";
} else {
echo "class=\"btn-panier-content pt-2 pb-2\"";
}
echo ">
<button type=\"submit\" id=\"add-to-cart-btn\" class=\"btn-panier btn-add-panier transition-bgcolor\" ";
// line 123
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("add-to-cart-button");
echo "> <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.add_to_cart"), "html", null, true);
echo "</span></button>
</div>
<!-- end add to cart button -->
";
// line 126
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.', 126, $this->source); })()), 'form_end', ["render_rest" => false]);
echo "
";
// line 128
echo "
<!-- shipping info -->
<div class=\"etat-article text-left pt-2 pb-1\">
<div class=\"py-1\">
";
// line 133
$context["missingAmountFranco"] = $this->extensions['App\Twig\Extensions\FrancoPort\CalculateMissingFrancoPortExtension']->getMissingFrancoPortInCart();
// line 134
echo " ";
if ((isset($context["missingAmountFranco"]) || array_key_exists("missingAmountFranco", $context) ? $context["missingAmountFranco"] : (function () { throw new RuntimeError('Variable "missingAmountFranco" does not exist.', 134, $this->source); })())) {
// line 135
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.cart.missing_x_for_franco"), "html", null, true);
echo " <span class=\"color-pink-s\">";
echo twig_call_macro($macros["money"], "macro_convertAndFormat", [(isset($context["missingAmountFranco"]) || array_key_exists("missingAmountFranco", $context) ? $context["missingAmountFranco"] : (function () { throw new RuntimeError('Variable "missingAmountFranco" does not exist.', 135, $this->source); })())], 135, $context, $this->getSourceContext());
echo "</span> ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.cart.before_free_shipping"), "html", null, true);
echo "
";
}
// line 137
echo " </div>
";
// line 138
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sylius"]) || array_key_exists("sylius", $context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.', 138, $this->source); })()), "channel", [], "any", false, false, false, 138), "displayDeliveryDate", [], "any", false, false, false, 138)) {
// line 140
echo " ";
$context["date"] = null;
// line 141
echo " ";
$context["deliveryDate"] = $this->extensions['App\Twig\Extensions\ShippingDelay\CalculateShippingDelayExtension']->getDeliveryDate(null, (isset($context["date"]) || array_key_exists("date", $context) ? $context["date"] : (function () { throw new RuntimeError('Variable "date" does not exist.', 141, $this->source); })()));
echo " ";
// line 142
echo "
";
// line 143
$context["dispatchDateEstimated"] = $this->extensions['App\Twig\Extensions\ShippingDelay\CalculateShippingDelayExtension']->getDispatchDate((isset($context["date"]) || array_key_exists("date", $context) ? $context["date"] : (function () { throw new RuntimeError('Variable "date" does not exist.', 143, $this->source); })()));
echo " ";
// line 144
echo " ";
$context["deliveryDateEstimated"] = $this->extensions['App\Twig\Extensions\ShippingDelay\CalculateShippingDelayExtension']->getDeliveryDateWithMargin(null, (isset($context["date"]) || array_key_exists("date", $context) ? $context["date"] : (function () { throw new RuntimeError('Variable "date" does not exist.', 144, $this->source); })()));
echo " ";
// line 145
echo "
";
// line 146
if ( !(null === (isset($context["deliveryDate"]) || array_key_exists("deliveryDate", $context) ? $context["deliveryDate"] : (function () { throw new RuntimeError('Variable "deliveryDate" does not exist.', 146, $this->source); })()))) {
// line 147
echo " <div class=\"py-1\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.by_ordering_today"), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.shipping.date_estimated")), "html", null, true);
echo "<span class=\"color-pink-s\">";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, (isset($context["deliveryDate"]) || array_key_exists("deliveryDate", $context) ? $context["deliveryDate"] : (function () { throw new RuntimeError('Variable "deliveryDate" does not exist.', 147, $this->source); })()), "d/m/Y"), "html", null, true);
echo " </span></div>
";
}
// line 149
echo " ";
}
// line 150
echo "</div>
<!-- end shipping info -->
<!-- steps of shipping -->
";
// line 154
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["sylius"]) || array_key_exists("sylius", $context) ? $context["sylius"] : (function () { throw new RuntimeError('Variable "sylius" does not exist.', 154, $this->source); })()), "channel", [], "any", false, false, false, 154), "displayDeliveryDate", [], "any", false, false, false, 154)) {
// line 155
echo " <div class=\"step-shipping pt-2 pb-4\">
<div class=\"row no-gutters\">
<div class=\"col\">
<div class=\"text-center\">
<div class=\"position-relative has-after-step\"><img src=\"";
// line 159
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/step_livr1.svg"), "html", null, true);
echo "\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
<div class=\"font-italic px-2 font-step\">
";
// line 161
if (array_key_exists("date", $context)) {
// line 162
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_date_format_filter($this->env, (isset($context["date"]) || array_key_exists("date", $context) ? $context["date"] : (function () { throw new RuntimeError('Variable "date" does not exist.', 162, $this->source); })()), "m/d/Y"), "medium", "medium", "dd MMMM", null, "gregorian", "fr"), "html", null, true);
echo "
";
} else {
// line 164
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_date_format_filter($this->env, "now", "m/d/Y"), "medium", "medium", "dd MMMM", null, "gregorian", "fr"), "html", null, true);
echo "
";
}
// line 166
echo " <span class=\"d-block line-height-normal\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.passed_order"), "html", null, true);
echo "</span>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"text-center\">
<div class=\"position-relative has-after-step\"><img src=\"";
// line 173
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/step_livr2.svg"), "html", null, true);
echo "\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
<div class=\"font-italic px-2 font-step\">
";
// line 175
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_date_format_filter($this->env, (isset($context["dispatchDateEstimated"]) || array_key_exists("dispatchDateEstimated", $context) ? $context["dispatchDateEstimated"] : (function () { throw new RuntimeError('Variable "dispatchDateEstimated" does not exist.', 175, $this->source); })()), "m/d/Y"), "medium", "medium", "dd MMMM", null, "gregorian", "fr"), "html", null, true);
echo "
<span class=\"d-block line-height-normal\">";
// line 176
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.order_sent"), "html", null, true);
echo "</span>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"text-center\">
<div class=\"position-relative\"><img src=\"";
// line 182
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/step_livr3.svg"), "html", null, true);
echo "\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
<div class=\"font-italic px-2 font-step\">
";
// line 184
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["deliveryDateEstimated"]) || array_key_exists("deliveryDateEstimated", $context) ? $context["deliveryDateEstimated"] : (function () { throw new RuntimeError('Variable "deliveryDateEstimated" does not exist.', 184, $this->source); })()), "before", [], "array", false, false, false, 184), "m/d/Y"), "medium", "medium", "dd MMMM", null, "gregorian", "fr"), "html", null, true);
echo " -
";
// line 185
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["deliveryDateEstimated"]) || array_key_exists("deliveryDateEstimated", $context) ? $context["deliveryDateEstimated"] : (function () { throw new RuntimeError('Variable "deliveryDateEstimated" does not exist.', 185, $this->source); })()), "after", [], "array", false, false, false, 185), "m/d/Y"), "medium", "medium", "dd MMMM", null, "gregorian", "fr"), "html", null, true);
echo "
<span class=\"d-block line-height-normal\">";
// line 186
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.delivered"), "html", null, true);
echo " !</span>
</div>
</div>
</div>
</div>
</div>
";
}
// line 193
echo "<!-- end steps of shipping -->
<!-- add to cart modal -->
<div class=\"modal fade\" id=\"addToCartModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addToCartModal\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<p class=\"modal-title\" id=\"exampleModalLongTitle\">";
// line 200
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.addCart"), "html", null, true);
echo "</p>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\">
<div class=\"modal-product-name\">";
// line 206
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.', 206, $this->source); })()), "code", [], "any", false, false, false, 206), "html", null, true);
echo " <br> ";
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.', 206, $this->source); })()), "name", [], "any", false, false, false, 206), "html", null, true);
echo "</div>
</div>
<div class=\"modal-footer row mx-n1\">
<div class=\"col-sm-6 col-12 mb-2 mx-0 px-1\"><button type=\"button\" class=\"btn-link bg-orange\" data-dismiss=\"modal\">";
// line 209
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.continue_my_purchases"), "html", null, true);
echo "</button></div>
<div class=\"col-sm-6 col-12 mb-2 mx-0 px-1\"><a href=\"";
// line 210
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_cart_summary");
echo "\" type=\"button\" class=\"btn-link opacity_hover\" title=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.proceed_to_payment"), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.proceed_to_payment"), "html", null, true);
echo "</a></div>
</div>
</div>
</div>
</div>
<!-- end add to cart modal -->
<!-- begin error modal -->
";
// line 218
$this->loadTemplate("@SyliusShop/Product/Show/_popupQuantityError.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 218)->display(twig_array_merge($context, ["item" => (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 218, $this->source); })())]));
// line 219
$this->loadTemplate("@SyliusShop/Product/Show/_popupAddToCartErrorModal.html.twig", "@SyliusShop/Product/Show/_addToCart.html.twig", 219)->display(twig_array_merge($context, ["item" => (isset($context["order_item"]) || array_key_exists("order_item", $context) ? $context["order_item"] : (function () { throw new RuntimeError('Variable "order_item" does not exist.', 219, $this->source); })())]));
// line 220
echo "<!-- end error modal -->";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/_addToCart.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 520 => 220, 518 => 219, 516 => 218, 501 => 210, 497 => 209, 489 => 206, 480 => 200, 471 => 193, 461 => 186, 457 => 185, 453 => 184, 448 => 182, 439 => 176, 435 => 175, 430 => 173, 419 => 166, 413 => 164, 407 => 162, 405 => 161, 400 => 159, 394 => 155, 392 => 154, 386 => 150, 383 => 149, 373 => 147, 371 => 146, 368 => 145, 364 => 144, 361 => 143, 358 => 142, 354 => 141, 351 => 140, 349 => 138, 346 => 137, 336 => 135, 333 => 134, 331 => 133, 324 => 128, 320 => 126, 312 => 123, 303 => 122, 297 => 118, 291 => 115, 286 => 113, 280 => 110, 270 => 103, 264 => 99, 261 => 98, 258 => 97, 256 => 96, 243 => 86, 237 => 85, 232 => 83, 228 => 82, 221 => 80, 213 => 75, 207 => 71, 205 => 70, 196 => 63, 192 => 61, 190 => 60, 179 => 56, 170 => 54, 159 => 47, 155 => 45, 153 => 44, 150 => 43, 148 => 42, 142 => 39, 136 => 36, 128 => 32, 126 => 31, 122 => 30, 116 => 27, 110 => 26, 107 => 25, 100 => 23, 97 => 22, 94 => 21, 91 => 20, 88 => 19, 85 => 18, 82 => 17, 77 => 16, 75 => 15, 72 => 14, 70 => 13, 68 => 12, 65 => 10, 63 => 9, 60 => 8, 58 => 7, 55 => 6, 53 => 5, 50 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% import \"@SyliusShop/Common/Macro/icons.html.twig\" as icons %}
{% set block = app_get_blocks('texteperso_article', sylius.channel.code ) %}
{% import \"@SyliusShop/Common/Macro/money.html.twig\" as money %}
{% set product = order_item.variant.product %}
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
{# INIT CONFIGURATOR #}
{% set configurator = false %}
{% set configuratorSimple = false %}
{% if product.variants|length > 0 %}
{% for variant in product.variants %}
{% if variant.model %}
{% set configurator = true %}
{% if not variant.model.advanced %}
{% set configuratorSimple = true %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
<div id=\"availability-notifier\" {% if sylius_inventory_is_available(order_item.variant) %} class=\"d-none\" {% endif %} >
{{ render(path('app_shop_partial_availability_notifier_create', { 'productVariantId' : product.variants.first.id, 'template' : '@SyliusShop/Product/Show/_availability_notifier.html.twig' })) }}
</div>
{{ form_start(form, {'action': path('sylius_shop_ajax_cart_add_item', {'productId': product.id}), 'attr': {'id': 'sylius-product-adding-to-cart', 'data-product-id': product.id, 'data-js-add-to-cart': 'form', 'class': 'loadable', 'novalidate': 'novalidate', 'data-redirect': path(configuration.getRedirectRoute('summary'))}}) }}
{% include '@SyliusShop/Product/Show/_seeNumericalOrPhysicalVersion.html.twig' with {product: product} %}
{{ form_errors(form) }}
<!-- error message -->
<div class=\"alert alert-danger d-none\" data-js-add-to-cart=\"error\"
id=\"sylius-cart-validation-error\" {{ sylius_test_html_attribute('cart-validation-error') }}></div>
<!-- select variant -->
<div id=\"sylius-product-selecting-variant\" {{ sylius_test_html_attribute('product-selecting-variant') }}>
<div id=\"first_div\"></div>
{% if not product.simple %}
<div class=\"caractistique-article pt-md-2 pt-3\">
{% include '@SyliusShop/Product/Show/_options.html.twig' %}
</div>
{% endif %}
{{ sylius_template_event('sylius.shop.product.show.before_add_to_cart', {'product': product, 'order_item': order_item}) }}
</div>
<!-- end select variant -->
<div class=\"etat-article d-none\">
<div id=\"enStock\"
class=\"etatbit-art color-vert {% if not sylius_inventory_is_available(order_item.variant) %} d-none {% endif %}\">{{ 'app.product.en_stock' | trans }}</div>
<div id=\"horsStock\"
class=\"etatbit-art text-danger {% if sylius_inventory_is_available(order_item.variant) %} d-none {% endif %}\">{{ 'app.product.en_rupture' | trans }}</div>
</div>
<!-- configurator -->
{% if configurator %}
{% include '@SyliusShop/Product/Show/Configurator/_configurator.html.twig' %}
{% endif %}
<!-- end configurator -->
<!-- quantity / price -->
<div class=\"py-2 row no-gutters align-items-center mobile-column-reverse-save\">
<!-- price -->
<div class=\"pl-3 pt-2 pt-sm-0 art-price\">
<div class=\"prix-art-panier text-sm-right text-left pt-sm-0 pt-3\">
{% include '@SyliusShop/Product/Show/_priceWidget.html.twig' %}
</div>
</div>
<!-- quantity -->
<div class=\"quantity-container\">
<div class=\"d-block d-md-none font-seize col-12\">{{ 'sylius.ui.quantity' |trans }} :</div>
<div class=\"col-sm-auto\">
<div class=\"art-qte px-0 fiche-art-qty\">
<div class=\"contenu-qte-art qte-article-fiche\">
<div class=\"qte-panier sylius-quantity d-flex no-gutters align-items-center\">
<a role=\"button\" class=\"qte-moins-art col-auto\" title=\"{{'app.product.decrease_quantity'|trans}}\"><img src=\"{{asset('images/moins.svg')}}\" class=\"d-block\" alt=\"-\"></a>
<div class=\"d-flex no-gutters col align-items-center px-2 bg-white\">
<div class=\"col-auto mb-0 label-qte\">{{ 'sylius.ui.quantity' |trans }} :</div>
<div class=\"col form-group-nomarg pl-1\">{{ form_row(form.cartItem.quantity, sylius_test_form_attribute('quantity')) }}</div>
</div>
<a role=\"button\" class=\"qte-plus-art col-auto\" title=\"{{'app.product.increase_quantity'|trans}}\"><img src=\"{{asset('images/plus.svg')}}\" class=\"d-block\" alt=\"+\"></a>
{{ sylius_template_event('sylius.shop.product.show.add_to_cart_form', {'product': product, 'order_item': order_item}) }}
</div>
</div>
</div>
</div>
</div>
<!-- end quantity -->
<!-- configurator -->
{% if configurator %}
{% include '@SyliusShop/Product/Show/Configurator/_wrap_configurator.html.twig' %}
{% endif %}
<!-- end configurator -->
<!-- messages infos -->
<div class=\"widgets-not-valid\" style=\"visibility: hidden;\">
{{ \"app.configurator.error.widgets_not_valid\"|trans }}
</div>
</div>
<!-- end quantity / price -->
<!-- messages infos -->
<div class=\"widgets-not-valid\" style=\"visibility: hidden;\">
{{ \"app.configurator.error.widgets_not_valid\"|trans }}
</div>
<div id=\"choose-your-option-info-msg\" class=\"add-to-cart-error-msg d-none\">
{{ \"app.ui.choose_your_option_before_adding_to_cart\"|trans }}
</div>
<div id=\"step-by-step-info-msg\" class=\"color-pink-s font-weight-bold font-12\" style=\"display: none;\">{{ \"app.product.fill_option_before_adding_to_cart\"|trans }}</div>
<!-- end messages infos -->
{{ form_row(form._token) }}
<!-- add to cart button -->
{# <div {% if configurator is defined and configurator == true %}class=\"btn-panier-content pt-2 pb-2 d-none\"{% else %}class=\"btn-panier-content pt-2 pb-2\"{% endif %}>#}
<div {% if configurator is defined and configurator == true and not configuratorSimple and order_item.variant.model is not null %}class=\"btn-panier-content pt-2 pb-2 d-none\"{% else %}class=\"btn-panier-content pt-2 pb-2\"{% endif %}>
<button type=\"submit\" id=\"add-to-cart-btn\" class=\"btn-panier btn-add-panier transition-bgcolor\" {{ sylius_test_html_attribute('add-to-cart-button') }}> <span>{{ 'sylius.ui.add_to_cart' |trans }}</span></button>
</div>
<!-- end add to cart button -->
{{ form_end(form, {'render_rest': false}) }}
{#{% endif %}#}
<!-- shipping info -->
<div class=\"etat-article text-left pt-2 pb-1\">
<div class=\"py-1\">
{% set missingAmountFranco = app_get_missing_franco_port() %}
{% if missingAmountFranco %}
{{'app.cart.missing_x_for_franco'|trans}} <span class=\"color-pink-s\">{{ money.convertAndFormat(missingAmountFranco) }}</span> {{'app.cart.before_free_shipping'|trans}}
{% endif %}
</div>
{% if sylius.channel.displayDeliveryDate %}
{# {% set date = date('2026-01-21 10:00:00') %}#}
{% set date = null %}
{% set deliveryDate = app_get_delivery_date(null, date) %} {# estimation date de livraison #}
{% set dispatchDateEstimated = app_get_dispatch_date(date) %} {# date d'envoi #}
{% set deliveryDateEstimated = app_get_delivery_date_with_margin(null, date) %} {# estimation fourchette date de livraison #}
{% if deliveryDate is not null %}
<div class=\"py-1\">{{'app.product.by_ordering_today'|trans}}, {{'app.shipping.date_estimated'|trans|lower }}<span class=\"color-pink-s\">{{ deliveryDate|date(\"d/m/Y\") }} </span></div>
{% endif %}
{% endif %}
</div>
<!-- end shipping info -->
<!-- steps of shipping -->
{% if sylius.channel.displayDeliveryDate %}
<div class=\"step-shipping pt-2 pb-4\">
<div class=\"row no-gutters\">
<div class=\"col\">
<div class=\"text-center\">
<div class=\"position-relative has-after-step\"><img src=\"{{asset('images/step_livr1.svg')}}\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
<div class=\"font-italic px-2 font-step\">
{% if date is defined %}
{{ date|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
{% else %}
{{ \"now\"|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
{% endif %}
<span class=\"d-block line-height-normal\">{{'app.product.passed_order'|trans}}</span>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"text-center\">
<div class=\"position-relative has-after-step\"><img src=\"{{asset('images/step_livr2.svg')}}\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
<div class=\"font-italic px-2 font-step\">
{{ dispatchDateEstimated|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
<span class=\"d-block line-height-normal\">{{'app.product.order_sent'|trans}}</span>
</div>
</div>
</div>
<div class=\"col\">
<div class=\"text-center\">
<div class=\"position-relative\"><img src=\"{{asset('images/step_livr3.svg')}}\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
<div class=\"font-italic px-2 font-step\">
{{ deliveryDateEstimated['before']|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }} -
{{ deliveryDateEstimated['after']|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
<span class=\"d-block line-height-normal\">{{'app.product.delivered'|trans}} !</span>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<!-- end steps of shipping -->
<!-- add to cart modal -->
<div class=\"modal fade\" id=\"addToCartModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"addToCartModal\" aria-hidden=\"true\">
<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<p class=\"modal-title\" id=\"exampleModalLongTitle\">{{'app.product.addCart'|trans}}</p>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\">
<div class=\"modal-product-name\">{{ product.code }} <br> {{ product.name }}</div>
</div>
<div class=\"modal-footer row mx-n1\">
<div class=\"col-sm-6 col-12 mb-2 mx-0 px-1\"><button type=\"button\" class=\"btn-link bg-orange\" data-dismiss=\"modal\">{{'app.product.continue_my_purchases'|trans}}</button></div>
<div class=\"col-sm-6 col-12 mb-2 mx-0 px-1\"><a href=\"{{ path('sylius_shop_cart_summary') }}\" type=\"button\" class=\"btn-link opacity_hover\" title=\"{{'app.product.proceed_to_payment'|trans}}\">{{'app.product.proceed_to_payment'|trans}}</a></div>
</div>
</div>
</div>
</div>
<!-- end add to cart modal -->
<!-- begin error modal -->
{% include '@SyliusShop/Product/Show/_popupQuantityError.html.twig' with {'item': order_item} %}
{% include '@SyliusShop/Product/Show/_popupAddToCartErrorModal.html.twig' with {'item': order_item} %}
<!-- end error modal -->", "@SyliusShop/Product/Show/_addToCart.html.twig", "/home/chouettemauve/preprod/sylius/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_addToCart.html.twig");
}
}