var/cache/dev/twig/b7/b7b54c738bab7c6e0471c7a709f4f82025dff94056196aa1f08d12f90c14e3d7.php line 97

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig */
  14. class __TwigTemplate_d1b6a8b83e52a505cc082def736a493d8da53910195987f6c468c6acd9484c0d extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"));
  33.         // line 1
  34.         $context["product"] = twig_get_attribute($this->env$this->sourcetwig_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.'1$this->source); })()), "variant", [], "any"falsefalsefalse1), "product", [], "any"falsefalsefalse1);
  35.         // line 2
  36.         echo "
  37. ";
  38.         // line 3
  39.         $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.'3$this->source); })()), [=> "@SyliusShop/Form/theme.html.twig"], true);
  40.         // line 4
  41.         $macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"4)->unwrap();
  42.         // line 5
  43.         echo "
  44. ";
  45.         // line 7
  46.         $context["configurator"] = false;
  47.         // line 8
  48.         echo "
  49. ";
  50.         // line 9
  51.         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.'9$this->source); })()), "isBundle", [], "any"falsefalsefalse9) && 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.'9$this->source); })()), "productBundle", [], "any"falsefalsefalse9))) {
  52.             // line 10
  53.             echo "    ";
  54.             $context['_parent'] = $context;
  55.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'10$this->source); })()), "productBundle", [], "any"falsefalsefalse10), "productBundleItems", [], "any"falsefalsefalse10));
  56.             foreach ($context['_seq'] as $context["_key"] => $context["productBundleItem"]) {
  57.                 // line 11
  58.                 echo "        ";
  59.                 if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["productBundleItem"], "productVariant", [], "any"falsefalsefalse11), "model", [], "any"falsefalsefalse11)) {
  60.                     // line 12
  61.                     echo "            ";
  62.                     $context["configurator"] = true;
  63.                     // line 13
  64.                     echo "        ";
  65.                 }
  66.                 // line 14
  67.                 echo "    ";
  68.             }
  69.             $_parent $context['_parent'];
  70.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productBundleItem'], $context['_parent'], $context['loop']);
  71.             $context array_intersect_key($context$_parent) + $_parent;
  72.         }
  73.         // line 17
  74.         echo "
  75. ";
  76.         // line 18
  77.         if ($this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'18$this->source); })()), "variants", [], "any"falsefalsefalse18), "first", [], "any"falsefalsefalse18))) {
  78.             // line 19
  79.             echo "
  80.     <div id=\"availability-notifier\" ";
  81.             // line 20
  82.             if ($this->env->getFunction('sylius_inventory_is_available')->getCallable()(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'20$this->source); })()), "variants", [], "any"falsefalsefalse20), "first", [], "any"falsefalsefalse20))) {
  83.                 echo " class=\"d-none\" ";
  84.             }
  85.             echo " >
  86.         ";
  87.             // line 21
  88.             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->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'21$this->source); })()), "variants", [], "any"falsefalsefalse21), "first", [], "any"falsefalsefalse21), "id", [], "any"falsefalsefalse21), "template" => "@SyliusShop/Product/Show/_availability_notifier.html.twig"]));
  89.             echo "
  90.     </div>
  91.     ";
  92.             // line 24
  93.             echo $this->env->getRuntime('Sonata\BlockBundle\Templating\Helper\BlockHelper')->renderEvent("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.'24$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.'24$this->source); })())]);
  94.             echo "
  95.     ";
  96.             // line 26
  97.             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.'26$this->source); })()), 'form_start', ["action" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("bitbag_sulius_product_bundle_shop_ajax_cart_add_product_bundle", ["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.'26$this->source); })()), "id", [], "any"falsefalsefalse26)]), "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.'26$this->source); })()), "id", [], "any"falsefalsefalse26), "data-js-add-to-cart" => "form""class" => "product-bundle-adding-to-cart ui loadable form""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.'26$this->source); })()), "getRedirectRoute", [=> "summary"], "method"falsefalsefalse26))]]);
  98.             echo "
  99.     ";
  100.             // line 28
  101.             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.'28$this->source); })()), 'errors');
  102.             echo "
  103.     <!-- error message -->
  104.     <div class=\"alert alert-danger d-none\" data-js-add-to-cart=\"error\"
  105.          id=\"sylius-cart-validation-error\" ";
  106.             // line 32
  107.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("cart-validation-error");
  108.             echo "></div>
  109.     <!-- product bundle details -->
  110.     <div class=\"ui segment\" id=\"sylius-product-selecting-variant\">
  111.         <div class=\"ui red label bottom hidden sylius-validation-error\" id=\"sylius-cart-validation-error\"></div>
  112.         <div class=\"py-3\">
  113.             <h2 class=\"title-ss-regular color-purple-s mb-3\">";
  114.             // line 38
  115.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("bitbag_sylius_product_bundle.ui.products_in_bundle"), "html"nulltrue);
  116.             echo "</h2>
  117.             ";
  118.             // line 39
  119.             $context['_parent'] = $context;
  120.             $context['_seq'] = twig_ensure_traversable(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.'39$this->source); })()), "productBundleItems", [], "any"falsefalsefalse39));
  121.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  122.                 // line 40
  123.                 echo "                ";
  124.                 $context["data"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse40), "data", [], "any"falsefalsefalse40);
  125.                 // line 41
  126.                 echo "                <div class=\"product-bundle-item icon-has-check pb-2\" data-itemId=\"";
  127.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'41$this->source); })()), "productBundleItem", [], "any"falsefalsefalse41), "id", [], "any"falsefalsefalse41), "html"nulltrue);
  128.                 echo "\" data-variantId=\"";
  129.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'41$this->source); })()), "productVariant", [], "any"falsefalsefalse41), "id", [], "any"falsefalsefalse41), "html"nulltrue);
  130.                 echo "\" data-variantName=\"";
  131.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'41$this->source); })()), "productVariant", [], "any"falsefalsefalse41), "product", [], "any"falsefalsefalse41), "name", [], "any"falsefalsefalse41), "html"nulltrue);
  132.                 echo "\">
  133.                     <h3 class=\"font-seize mb-0\">";
  134.                 // line 42
  135.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'42$this->source); })()), "quantity", [], "any"falsefalsefalse42), "html"nulltrue);
  136.                 echo " x ";
  137.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["data"]) || array_key_exists("data"$context) ? $context["data"] : (function () { throw new RuntimeError('Variable "data" does not exist.'42$this->source); })()), "productVariant", [], "any"falsefalsefalse42), "name", [], "any"falsefalsefalse42), "html"nulltrue);
  138.                 echo "</h3>
  139.                     ";
  140.                 // line 44
  141.                 if (twig_get_attribute($this->env$this->source$context["item"], "productVariant", [], "any"truetruefalse44)) {
  142.                     // line 45
  143.                     echo "                        ";
  144.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source$context["item"], "productVariant", [], "any"falsefalsefalse45), 'row');
  145.                     echo "
  146.                     ";
  147.                 }
  148.                 // line 47
  149.                 echo "                </div>
  150.             ";
  151.             }
  152.             $_parent $context['_parent'];
  153.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  154.             $context array_intersect_key($context$_parent) + $_parent;
  155.             // line 49
  156.             echo "        </div>
  157.     </div>
  158.     <!-- end product bundle details -->
  159.     <!-- configurator -->
  160.     ";
  161.             // line 54
  162.             if ((isset($context["configurator"]) || array_key_exists("configurator"$context) ? $context["configurator"] : (function () { throw new RuntimeError('Variable "configurator" does not exist.'54$this->source); })())) {
  163.                 // line 55
  164.                 echo "        ";
  165.                 $this->loadTemplate("@SyliusShop/Product/Show/Configurator/_configurator.html.twig""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"55)->display($context);
  166.                 // line 56
  167.                 echo "    ";
  168.             }
  169.             // line 57
  170.             echo "    <!-- end configurator -->
  171.     <!-- quantity -->
  172.     <div class=\"art-qte px-0 fiche-art-qty\">
  173.             <div class=\"contenu-qte-art qte-article-fiche\">
  174.             <div class=\"qte-panier sylius-quantity d-flex no-gutters align-items-center\">
  175.                 <a role=\"button\" class=\"qte-moins-art col-auto\" title=\"";
  176.             // line 63
  177.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.decrease_quantity"), "html"nulltrue);
  178.             echo "\"><img src=\"";
  179.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/moins.svg"), "html"nulltrue);
  180.             echo "\" class=\"d-block\" alt=\"-\"></a>
  181.                 <div class=\"d-flex no-gutters col align-items-center px-2 bg-white\">
  182.                     <div class=\"col-auto mb-0 label-qte\">";
  183.             // line 65
  184.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.quantity"), "html"nulltrue);
  185.             echo " :</div>
  186.                     <div class=\"col form-group-nomarg pl-1\"> ";
  187.             // line 66
  188.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->sourcetwig_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.'66$this->source); })()), "cartItem", [], "any"falsefalsefalse66), "quantity", [], "any"falsefalsefalse66), 'row');
  189.             echo "</div>
  190.                 </div>
  191.                 <a role=\"button\" class=\"qte-plus-art  col-auto\"  title=\"";
  192.             // line 68
  193.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.increase_quantity"), "html"nulltrue);
  194.             echo "\"><img src=\"";
  195.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/plus.svg"), "html"nulltrue);
  196.             echo "\" class=\"d-block\" alt=\"+\"></a>
  197.             </div>
  198.         </div>
  199.     </div>
  200.     <!-- end quantity -->
  201.     <!-- price -->
  202.     <div class=\"col-sm pl-2 pt-2 pt-sm-0 art-price\">
  203.         <div class=\"prix-art-panier text-sm-right text-left pt-sm-0 pt-3\">
  204.             ";
  205.             // line 76
  206.             $this->loadTemplate("@SyliusShop/Product/Show/_priceWidget.html.twig""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"76)->display($context);
  207.             // line 77
  208.             echo "        </div>
  209.     </div>
  210.     <!-- end price -->
  211.     <!-- configurator -->
  212.     ";
  213.             // line 82
  214.             if ((isset($context["configurator"]) || array_key_exists("configurator"$context) ? $context["configurator"] : (function () { throw new RuntimeError('Variable "configurator" does not exist.'82$this->source); })())) {
  215.                 // line 83
  216.                 echo "        ";
  217.                 $this->loadTemplate("@SyliusShop/Product/Show/Configurator/_wrap_configurator.html.twig""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"83)->display($context);
  218.                 // line 84
  219.                 echo "    ";
  220.             }
  221.             // line 85
  222.             echo "    <!-- end configurator -->
  223.     ";
  224.             // line 87
  225.             echo $this->env->getRuntime('Sonata\BlockBundle\Templating\Helper\BlockHelper')->renderEvent("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.'87$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.'87$this->source); })())]);
  226.             echo "
  227.     <div class=\"widgets-not-valid\" style=\"visibility: hidden;\">
  228.         ";
  229.             // line 89
  230.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.configurator.error.widgets_not_valid"), "html"nulltrue);
  231.             echo "
  232.     </div>
  233.     <!-- add to cart button -->
  234.     <div ";
  235.             // line 92
  236.             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.'92$this->source); })()) == true))) {
  237.                 echo "class=\"btn-panier-content mt-2 pt-3 pb-2 d-none\"";
  238.             } else {
  239.                 echo "class=\"btn-panier-content mt-2 pt-3 pb-2\"";
  240.             }
  241.             echo ">
  242.         <button type=\"submit\" id=\"add-to-cart-btn\" class=\"btn-panier btn-add-panier transition-bgcolor d-none\" ";
  243.             // line 93
  244.             echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("add-to-cart-button");
  245.             echo "><i class=\"cart icon\"></i> ";
  246.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.add_to_cart"), "html"nulltrue);
  247.             echo "</button>
  248.     </div>
  249.     <!-- end add to cart button -->
  250.     ";
  251.             // line 96
  252.             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.'96$this->source); })()), "_token", [], "any"falsefalsefalse96), 'row');
  253.             echo "
  254.     ";
  255.             // line 97
  256.             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.'97$this->source); })()), 'form_end', ["render_rest" => false]);
  257.             echo "
  258.     <!-- shipping info -->
  259.     <div class=\"etat-article text-left  pt-2 pb-1\">
  260.         <div class=\"py-1\">";
  261.             // line 101
  262.             $context["missingAmountFranco"] = $this->extensions['App\Twig\Extensions\FrancoPort\CalculateMissingFrancoPortExtension']->getMissingFrancoPortInCart();
  263.             // line 102
  264.             echo "            ";
  265.             if ((isset($context["missingAmountFranco"]) || array_key_exists("missingAmountFranco"$context) ? $context["missingAmountFranco"] : (function () { throw new RuntimeError('Variable "missingAmountFranco" does not exist.'102$this->source); })())) {
  266.                 // line 103
  267.                 echo "                ";
  268.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.cart.missing_x_for_franco"), "html"nulltrue);
  269.                 echo " <span class=\"color-pink-s\">";
  270.                 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.'103$this->source); })())], 103$context$this->getSourceContext());
  271.                 echo "</span> ";
  272.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.cart.before_free_shipping"), "html"nulltrue);
  273.                 echo "
  274.             ";
  275.             }
  276.             // line 105
  277.             echo "        </div>
  278.         ";
  279.             // line 106
  280.             if (twig_get_attribute($this->env$this->sourcetwig_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.'106$this->source); })()), "channel", [], "any"falsefalsefalse106), "displayDeliveryDate", [], "any"falsefalsefalse106)) {
  281.                 // line 107
  282.                 echo "            ";
  283.                 $context["deliveryDate"] = $this->extensions['App\Twig\Extensions\ShippingDelay\CalculateShippingDelayExtension']->getDeliveryDate(null);
  284.                 echo "  ";
  285.                 // line 108
  286.                 echo "            ";
  287.                 $context["dispatchDateEstimated"] = $this->extensions['App\Twig\Extensions\ShippingDelay\CalculateShippingDelayExtension']->getDispatchDateWithMargin(null);
  288.                 echo "  ";
  289.                 // line 109
  290.                 echo "            ";
  291.                 $context["deliveryDateEstimated"] = $this->extensions['App\Twig\Extensions\ShippingDelay\CalculateShippingDelayExtension']->getDeliveryDateWithMargin(null);
  292.                 echo "  ";
  293.                 // line 110
  294.                 echo "
  295.             ";
  296.                 // line 111
  297.                 if ( !(null === (isset($context["deliveryDate"]) || array_key_exists("deliveryDate"$context) ? $context["deliveryDate"] : (function () { throw new RuntimeError('Variable "deliveryDate" does not exist.'111$this->source); })()))) {
  298.                     // line 112
  299.                     echo "                <div class=\"py-1\">";
  300.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.by_ordering_today"), "html"nulltrue);
  301.                     echo ", ";
  302.                     echo twig_escape_filter($this->envtwig_lower_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.shipping.date_estimated")), "html"nulltrue);
  303.                     echo "<span class=\"color-pink-s\">";
  304.                     echo twig_escape_filter($this->envtwig_date_format_filter($this->env, (isset($context["deliveryDate"]) || array_key_exists("deliveryDate"$context) ? $context["deliveryDate"] : (function () { throw new RuntimeError('Variable "deliveryDate" does not exist.'112$this->source); })()), "d/m/Y"), "html"nulltrue);
  305.                     echo " </span></div>
  306.             ";
  307.                 }
  308.                 // line 114
  309.                 echo "        ";
  310.             }
  311.             // line 115
  312.             echo "    </div>
  313.     <!-- end shipping info -->
  314.     <!-- steps of shipping -->
  315. ";
  316.             // line 119
  317.             if (twig_get_attribute($this->env$this->sourcetwig_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.'119$this->source); })()), "channel", [], "any"falsefalsefalse119), "displayDeliveryDate", [], "any"falsefalsefalse119)) {
  318.                 // line 120
  319.                 echo "    <div class=\"step-shipping pt-2 pb-4\">
  320.         <div class=\"row no-gutters\">
  321.             <div class=\"col\">
  322.                 <div class=\"text-center\">
  323.                     <div class=\"position-relative has-after-step\"><img src=\"";
  324.                 // line 124
  325.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/step_livr1.svg"), "html"nulltrue);
  326.                 echo "\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
  327.                     <div class=\"font-italic px-2 font-step\">
  328.                         ";
  329.                 // line 126
  330.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->envtwig_date_format_filter($this->env"now""m/d/Y"), "medium""medium""dd MMMM"null"gregorian""fr"), "html"nulltrue);
  331.                 echo "
  332.                         <span class=\"d-block line-height-normal\">";
  333.                 // line 127
  334.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.passed_order"), "html"nulltrue);
  335.                 echo "</span>
  336.                     </div>
  337.                 </div>
  338.             </div>
  339.             <div class=\"col\">
  340.                 <div class=\"text-center\">
  341.                     <div class=\"position-relative has-after-step\"><img src=\"";
  342.                 // line 134
  343.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/step_livr2.svg"), "html"nulltrue);
  344.                 echo "\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
  345.                     <div class=\"font-italic px-2 font-step\">
  346.                         ";
  347.                 // line 136
  348.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["dispatchDateEstimated"]) || array_key_exists("dispatchDateEstimated"$context) ? $context["dispatchDateEstimated"] : (function () { throw new RuntimeError('Variable "dispatchDateEstimated" does not exist.'136$this->source); })()), "before", [], "array"falsefalsefalse136), "m/d/Y"), "medium""medium""dd MMMM"null"gregorian""fr"), "html"nulltrue);
  349.                 echo " -
  350.                         ";
  351.                 // line 137
  352.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["dispatchDateEstimated"]) || array_key_exists("dispatchDateEstimated"$context) ? $context["dispatchDateEstimated"] : (function () { throw new RuntimeError('Variable "dispatchDateEstimated" does not exist.'137$this->source); })()), "after", [], "array"falsefalsefalse137), "m/d/Y"), "medium""medium""dd MMMM"null"gregorian""fr"), "html"nulltrue);
  353.                 echo "
  354.                         <span class=\"d-block line-height-normal\">";
  355.                 // line 138
  356.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.order_sent"), "html"nulltrue);
  357.                 echo "</span>
  358.                     </div>
  359.                 </div>
  360.             </div>
  361.             <div class=\"col\">
  362.                 <div class=\"text-center\">
  363.                     <div class=\"position-relative\"><img src=\"";
  364.                 // line 144
  365.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/step_livr3.svg"), "html"nulltrue);
  366.                 echo "\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
  367.                     <div class=\"font-italic px-2 font-step\">
  368.                         ";
  369.                 // line 146
  370.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->envtwig_date_format_filter($this->envtwig_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.'146$this->source); })()), "before", [], "array"falsefalsefalse146), "m/d/Y"), "medium""medium""dd MMMM"null"gregorian""fr"), "html"nulltrue);
  371.                 echo " -
  372.                         ";
  373.                 // line 147
  374.                 echo twig_escape_filter($this->env$this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->envtwig_date_format_filter($this->envtwig_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.'147$this->source); })()), "after", [], "array"falsefalsefalse147), "m/d/Y"), "medium""medium""dd MMMM"null"gregorian""fr"), "html"nulltrue);
  375.                 echo "
  376.                         <span class=\"d-block line-height-normal\">";
  377.                 // line 148
  378.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.delivered"), "html"nulltrue);
  379.                 echo " !</span>
  380.                     </div>
  381.                 </div>
  382.             </div>
  383.         </div>
  384.     </div>
  385. ";
  386.             }
  387.             // line 155
  388.             echo "    <!-- end steps of shipping -->
  389.     <!-- begin error modal -->
  390.     ";
  391.             // line 158
  392.             $this->loadTemplate("@SyliusShop/Product/Show/_popupQuantityError.html.twig""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig"158)->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.'158$this->source); })())]));
  393.             // line 159
  394.             echo "    <!-- end error modal -->
  395. ";
  396.         }
  397.         
  398.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  399.         
  400.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  401.     }
  402.     public function getTemplateName()
  403.     {
  404.         return "@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig";
  405.     }
  406.     public function isTraitable()
  407.     {
  408.         return false;
  409.     }
  410.     public function getDebugInfo()
  411.     {
  412.         return array (  417 => 159,  415 => 158,  410 => 155,  400 => 148,  396 => 147,  392 => 146,  387 => 144,  378 => 138,  374 => 137,  370 => 136,  365 => 134,  355 => 127,  351 => 126,  346 => 124,  340 => 120,  338 => 119,  332 => 115,  329 => 114,  319 => 112,  317 => 111,  314 => 110,  310 => 109,  306 => 108,  302 => 107,  300 => 106,  297 => 105,  287 => 103,  284 => 102,  282 => 101,  275 => 97,  271 => 96,  263 => 93,  255 => 92,  249 => 89,  244 => 87,  240 => 85,  237 => 84,  234 => 83,  232 => 82,  225 => 77,  223 => 76,  210 => 68,  205 => 66,  201 => 65,  194 => 63,  186 => 57,  183 => 56,  180 => 55,  178 => 54,  171 => 49,  164 => 47,  158 => 45,  156 => 44,  149 => 42,  140 => 41,  137 => 40,  133 => 39,  129 => 38,  120 => 32,  113 => 28,  108 => 26,  103 => 24,  97 => 21,  91 => 20,  88 => 19,  86 => 18,  83 => 17,  76 => 14,  73 => 13,  70 => 12,  67 => 11,  62 => 10,  60 => 9,  57 => 8,  55 => 7,  52 => 5,  50 => 4,  48 => 3,  45 => 2,  43 => 1,);
  413.     }
  414.     public function getSourceContext()
  415.     {
  416.         return new Source("{% set product = order_item.variant.product %}
  417. {% form_theme form '@SyliusShop/Form/theme.html.twig' %}
  418. {% import \"@SyliusShop/Common/Macro/money.html.twig\" as money %}
  419. {# INIT CONFIGURATOR #}
  420. {% set configurator = false %}
  421. {% if product.isBundle and product.productBundle %}
  422.     {% for productBundleItem in product.productBundle.productBundleItems %}
  423.         {% if productBundleItem.productVariant.model %}
  424.             {% set configurator = true %}
  425.         {% endif %}
  426.     {% endfor %}
  427. {% endif %}
  428. {# END CONFIGURATOR #}
  429. {% if sylius_inventory_is_available(product.variants.first) %}
  430.     <div id=\"availability-notifier\" {% if sylius_inventory_is_available(product.variants.first) %} class=\"d-none\" {% endif %} >
  431.         {{ render(path('app_shop_partial_availability_notifier_create', { 'productVariantId' : product.variants.first.id, 'template' : '@SyliusShop/Product/Show/_availability_notifier.html.twig' })) }}
  432.     </div>
  433.     {{ sonata_block_render_event('sylius.shop.product.show.before_add_to_cart', {'product': product, 'order_item': order_item}) }}
  434.     {{ form_start(form, {'action': path('bitbag_sulius_product_bundle_shop_ajax_cart_add_product_bundle', {'productId': product.id}), 'attr': {'id': 'sylius-product-adding-to-cart', 'data-product-id': product.id, 'data-js-add-to-cart': 'form', 'class': 'product-bundle-adding-to-cart ui loadable form', 'novalidate': 'novalidate', 'data-redirect': path(configuration.getRedirectRoute('summary'))}}) }}
  435.     {{ form_errors(form) }}
  436.     <!-- error message -->
  437.     <div class=\"alert alert-danger d-none\" data-js-add-to-cart=\"error\"
  438.          id=\"sylius-cart-validation-error\" {{ sylius_test_html_attribute('cart-validation-error') }}></div>
  439.     <!-- product bundle details -->
  440.     <div class=\"ui segment\" id=\"sylius-product-selecting-variant\">
  441.         <div class=\"ui red label bottom hidden sylius-validation-error\" id=\"sylius-cart-validation-error\"></div>
  442.         <div class=\"py-3\">
  443.             <h2 class=\"title-ss-regular color-purple-s mb-3\">{{ 'bitbag_sylius_product_bundle.ui.products_in_bundle'|trans }}</h2>
  444.             {% for item in form.productBundleItems %}
  445.                 {% set data = item.vars.data %}
  446.                 <div class=\"product-bundle-item icon-has-check pb-2\" data-itemId=\"{{ data.productBundleItem.id }}\" data-variantId=\"{{ data.productVariant.id }}\" data-variantName=\"{{ data.productVariant.product.name }}\">
  447.                     <h3 class=\"font-seize mb-0\">{{ data.quantity }} x {{ data.productVariant.name }}</h3>
  448.                     {% if item.productVariant is defined %}
  449.                         {{ form_row(item.productVariant) }}
  450.                     {% endif %}
  451.                 </div>
  452.             {% endfor %}
  453.         </div>
  454.     </div>
  455.     <!-- end product bundle details -->
  456.     <!-- configurator -->
  457.     {% if configurator %}
  458.         {% include '@SyliusShop/Product/Show/Configurator/_configurator.html.twig' %}
  459.     {% endif %}
  460.     <!-- end configurator -->
  461.     <!-- quantity -->
  462.     <div class=\"art-qte px-0 fiche-art-qty\">
  463.             <div class=\"contenu-qte-art qte-article-fiche\">
  464.             <div class=\"qte-panier sylius-quantity d-flex no-gutters align-items-center\">
  465.                 <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>
  466.                 <div class=\"d-flex no-gutters col align-items-center px-2 bg-white\">
  467.                     <div class=\"col-auto mb-0 label-qte\">{{ 'sylius.ui.quantity' |trans }} :</div>
  468.                     <div class=\"col form-group-nomarg pl-1\"> {{ form_row(form.cartItem.quantity) }}</div>
  469.                 </div>
  470.                 <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>
  471.             </div>
  472.         </div>
  473.     </div>
  474.     <!-- end quantity -->
  475.     <!-- price -->
  476.     <div class=\"col-sm pl-2 pt-2 pt-sm-0 art-price\">
  477.         <div class=\"prix-art-panier text-sm-right text-left pt-sm-0 pt-3\">
  478.             {% include '@SyliusShop/Product/Show/_priceWidget.html.twig' %}
  479.         </div>
  480.     </div>
  481.     <!-- end price -->
  482.     <!-- configurator -->
  483.     {% if configurator %}
  484.         {% include '@SyliusShop/Product/Show/Configurator/_wrap_configurator.html.twig' %}
  485.     {% endif %}
  486.     <!-- end configurator -->
  487.     {{ sonata_block_render_event('sylius.shop.product.show.add_to_cart_form', {'product': product, 'order_item': order_item}) }}
  488.     <div class=\"widgets-not-valid\" style=\"visibility: hidden;\">
  489.         {{ \"app.configurator.error.widgets_not_valid\"|trans }}
  490.     </div>
  491.     <!-- add to cart button -->
  492.     <div {% if configurator is defined and configurator == true %}class=\"btn-panier-content mt-2 pt-3 pb-2 d-none\"{% else %}class=\"btn-panier-content mt-2 pt-3 pb-2\"{% endif %}>
  493.         <button type=\"submit\" id=\"add-to-cart-btn\" class=\"btn-panier btn-add-panier transition-bgcolor d-none\" {{ sylius_test_html_attribute('add-to-cart-button') }}><i class=\"cart icon\"></i> {{ 'sylius.ui.add_to_cart'|trans }}</button>
  494.     </div>
  495.     <!-- end add to cart button -->
  496.     {{ form_row(form._token) }}
  497.     {{ form_end(form, {'render_rest': false}) }}
  498.     <!-- shipping info -->
  499.     <div class=\"etat-article text-left  pt-2 pb-1\">
  500.         <div class=\"py-1\">{% set missingAmountFranco = app_get_missing_franco_port() %}
  501.             {% if missingAmountFranco %}
  502.                 {{'app.cart.missing_x_for_franco'|trans}} <span class=\"color-pink-s\">{{ money.convertAndFormat(missingAmountFranco) }}</span> {{'app.cart.before_free_shipping'|trans}}
  503.             {% endif %}
  504.         </div>
  505.         {% if sylius.channel.displayDeliveryDate %}
  506.             {% set deliveryDate = app_get_delivery_date(null)  %}  {# estimation date de livraison #}
  507.             {% set dispatchDateEstimated = app_get_dispatch_date_with_margin(null)  %}  {# estimation fourchette date d'envoi #}
  508.             {% set deliveryDateEstimated = app_get_delivery_date_with_margin(null)  %}  {# estimation fourchette date de livraison #}
  509.             {% if deliveryDate is not null %}
  510.                 <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>
  511.             {% endif %}
  512.         {% endif %}
  513.     </div>
  514.     <!-- end shipping info -->
  515.     <!-- steps of shipping -->
  516. {% if sylius.channel.displayDeliveryDate %}
  517.     <div class=\"step-shipping pt-2 pb-4\">
  518.         <div class=\"row no-gutters\">
  519.             <div class=\"col\">
  520.                 <div class=\"text-center\">
  521.                     <div class=\"position-relative has-after-step\"><img src=\"{{asset('images/step_livr1.svg')}}\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
  522.                     <div class=\"font-italic px-2 font-step\">
  523.                         {{ \"now\"|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
  524.                         <span class=\"d-block line-height-normal\">{{'app.product.passed_order'|trans}}</span>
  525.                     </div>
  526.                 </div>
  527.             </div>
  528.             <div class=\"col\">
  529.                 <div class=\"text-center\">
  530.                     <div class=\"position-relative has-after-step\"><img src=\"{{asset('images/step_livr2.svg')}}\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
  531.                     <div class=\"font-italic px-2 font-step\">
  532.                         {{ dispatchDateEstimated['before']|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }} -
  533.                         {{ dispatchDateEstimated['after']|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
  534.                         <span class=\"d-block line-height-normal\">{{'app.product.order_sent'|trans}}</span>
  535.                     </div>
  536.                 </div>
  537.             </div>
  538.             <div class=\"col\">
  539.                 <div class=\"text-center\">
  540.                     <div class=\"position-relative\"><img src=\"{{asset('images/step_livr3.svg')}}\" alt=\"\" class=\"position-relative z_index_m2\"/></div>
  541.                     <div class=\"font-italic px-2 font-step\">
  542.                         {{ deliveryDateEstimated['before']|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }} -
  543.                         {{ deliveryDateEstimated['after']|date(\"m/d/Y\")|format_datetime(locale='fr',pattern=\"dd MMMM\") }}
  544.                         <span class=\"d-block line-height-normal\">{{'app.product.delivered'|trans}} !</span>
  545.                     </div>
  546.                 </div>
  547.             </div>
  548.         </div>
  549.     </div>
  550. {% endif %}
  551.     <!-- end steps of shipping -->
  552.     <!-- begin error modal -->
  553.     {% include '@SyliusShop/Product/Show/_popupQuantityError.html.twig' with {'item': order_item} %}
  554.     <!-- end error modal -->
  555. {% endif %}
  556. ""@BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig""/home/chouettemauve/preprod/sylius/themes/BootstrapTheme/templates/bundles/BitBagSyliusProductBundlePlugin/Shop/Product/_addProductBundleToCart.html.twig");
  557.     }
  558. }