var/cache/dev/twig/04/04da4da55492c917e6b6236f61144eb0.php line 53

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* @Ecommerce/Main/cart.html.twig */
  15. class __TwigTemplate_f80828fe90a3d26f07bcfaa66c36cfc2 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'page_banner' => [$this'block_page_banner'],
  25.             'content' => [$this'block_content'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "standard_tpl.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Ecommerce/Main/cart.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Ecommerce/Main/cart.html.twig"));
  40.         // line 3
  41.         $context["page_title_alt"] = "Cart";
  42.         // line 1
  43.         $this->parent $this->loadTemplate("standard_tpl.html.twig""@Ecommerce/Main/cart.html.twig"1);
  44.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 5
  51.     public function block_page_banner($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_banner"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_banner"));
  58.         // line 0
  59.         yield "minimal";
  60.         
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  62.         
  63.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  64.         return; yield '';
  65.     }
  66.     // line 7
  67.     public function block_content($context, array $blocks = [])
  68.     {
  69.         $macros $this->macros;
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  72.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  73.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  74.         yield "   
  75.    
  76.     <!-- Cart -->
  77.     <section class=\"cart-wrapper\" data-controller=\"cart\" data-url=\"";
  78.         // line 10
  79.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_cart_json");
  80.         yield "\">
  81.         <div class=\"container\">
  82.             ";
  83.         // line 12
  84.         if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source, (isset($context["cart"]) || array_key_exists("cart"$context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.'12$this->source); })()), "items", [], "any"falsefalsefalse12)) > 0)) {
  85.             // line 13
  86.             yield "            <form action=\"";
  87.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_cart_update");
  88.             yield "\" method=\"post\" class=\"cart-form\">
  89.                 <div class=\"row justify-content-center\">
  90.                     <div class=\"col-lg-9\">
  91.                         <h2 class=\"checkout-form-title text-center\">Shopping Cart</h2>
  92.                         <div class=\"shopping-table-wrapper\">
  93.                             <table>
  94.                                 <thead>
  95.                                     <tr>
  96.                                         <th>Product</th>
  97.                                         <th class=\"text-center\">Quantity</th>
  98.                                         <th class=\"text-right\">Total</th>
  99.                                     </tr>
  100.                                 </thead>
  101.                                 <tbody data-cart-target=\"cartContent\">
  102.                                     ";
  103.             // line 27
  104.             $context['_parent'] = $context;
  105.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["cart"]) || array_key_exists("cart"$context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.'27$this->source); })()), "items", [], "any"falsefalsefalse27));
  106.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  107.                 // line 28
  108.                 yield "                                    <tr class=\"cart-item\" data-product-id=\"";
  109.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "id", [], "any"falsefalsefalse28), "html"nulltrue);
  110.                 yield "\" data-product-price=\"";
  111.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "price", [], "any"falsefalsefalse28), "html"nulltrue);
  112.                 yield "\">
  113.                                         <td class=\"order-card-details\">
  114.                                             <div class=\"d-flex align-items-center order-card\">
  115.                                                 <img src=\"";
  116.                 // line 31
  117.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Boab\CmsBundle\Twig\Extension\MediaExtension']->generateMediaUrl(CoreExtension::getAttribute($this->env$this->source$context["item"], "image", [], "any"falsefalsefalse31)), "html"nulltrue);
  118.                 yield "\" class=\"img-fluid\" alt=\"";
  119.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "name", [], "any"falsefalsefalse31), "html"nulltrue);
  120.                 yield "\">
  121.                                                 <div class=\"order-card-content d-md-block\">
  122.                                                     <h3 class=\"order-card-title\">";
  123.                 // line 33
  124.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "name", [], "any"falsefalsefalse33), "html"nulltrue);
  125.                 yield "</h3>
  126.                                                     <p>";
  127.                 // line 34
  128.                 yield $this->extensions['Boab\CmsBundle\Twig\Extension\BoabCmsExtension']->formatNumber(CoreExtension::getAttribute($this->env$this->source$context["item"], "price", [], "any"falsefalsefalse34));
  129.                 yield "</p>
  130.                                                 </div>
  131.                                             </div>
  132.                                         </td>
  133.                                         <td class=\"text-center\">
  134.                                             <div class=\"input-group fast-cart-group quantity-controls\">
  135.                                                 <button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#decrement\" data-index=\"";
  136.                 // line 40
  137.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "id", [], "any"falsefalsefalse40), "html"nulltrue);
  138.                 yield "\">-</button>
  139.                                                 <input type=\"text\" name=\"products[";
  140.                 // line 41
  141.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "id", [], "any"falsefalsefalse41), "html"nulltrue);
  142.                 yield "][qty]\" data-cart-target=\"quantity\" class=\"form-control checkout-form-input\" type=\"number\" aria-label=\"Example text with button addon\" value=\"";
  143.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "qty", [], "any"falsefalsefalse41), "html"nulltrue);
  144.                 yield "\">
  145.                                                 <button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#increment\" data-index=\"";
  146.                 // line 42
  147.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "id", [], "any"falsefalsefalse42), "html"nulltrue);
  148.                 yield "\">+</button>
  149.                                             </div>
  150.                                             <a href=\"#\" class=\"btn-cart-remove\"  data-action=\"click->cart#removeItem\" data-index=\"";
  151.                 // line 44
  152.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["item"], "id", [], "any"falsefalsefalse44), "html"nulltrue);
  153.                 yield "\">Remove</a>
  154.                                         </td>
  155.                                         <td class=\"text-right\" data-cart-target=\"total\">";
  156.                 // line 46
  157.                 yield $this->extensions['Boab\CmsBundle\Twig\Extension\BoabCmsExtension']->formatNumber(CoreExtension::getAttribute($this->env$this->source$context["item"], "getAmount", [], "method"falsefalsefalse46));
  158.                 yield "</td>
  159.                                     </tr>
  160.                                     ";
  161.             }
  162.             $_parent $context['_parent'];
  163.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  164.             $context array_intersect_key($context$_parent) + $_parent;
  165.             // line 49
  166.             yield "                                </tbody>
  167.                             </table>
  168.                         </div>
  169.                         <div class=\"order-summary-wrapper\">
  170.                             <div class=\"d-flex justify-content-between mt-3\">
  171.                                 <div>
  172.                                     <p class=\"text-right\">Shipping & taxes calculated at checkout</p>
  173.                                 </div>
  174.                                 <div class=\"subtotal\">
  175.                                     <span class=\"subtotal-label\">Subtotal: </span>
  176.                                     <span data-cart-target=\"subtotalAmount\">";
  177.             // line 59
  178.             yield $this->extensions['Boab\CmsBundle\Twig\Extension\BoabCmsExtension']->formatNumber((isset($context["sub_total"]) || array_key_exists("sub_total"$context) ? $context["sub_total"] : (function () { throw new RuntimeError('Variable "sub_total" does not exist.'59$this->source); })()));
  179.             yield "</span>
  180.                                 </div>
  181.                             </div>
  182.                             
  183.                             
  184.                             <p>All charges are billed in USD. While the content of your cart is currently displayed in , the checkout will use USD at the most current exchange rate.</p>
  185.                             <p>
  186.                                 <input style=\"float:none; vertical-align: middle;\" type=\"checkbox\" class=\"agree_terms_conditions\" />
  187.                                 <label style=\"display:inline; float:none\" for=\"agree\">
  188.                                     I agree with the <a href=\"#\">terms and conditions</a>
  189.                                 </label>
  190.                             </p>
  191.                             <div class=\"d-flex justify-content-end mt-4 checkout-btn-list align-items-center\">
  192.                                 <!-- <button type=\"submit\" class=\"btn btn-teritary-fast\">Update Cart</button> -->
  193.                                     <div class=\"col-md-3\">
  194.                                         <a href=\"";
  195.             // line 74
  196.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_checkout");
  197.             yield "\" class=\"btn btn-teritary-fast btn-cart-checkout\">
  198.                                             <span class=\"text\">Check Out</span>
  199.                                         </a>
  200.                                     </div>
  201.                             </div>
  202.                         </div>
  203.                     </div>
  204.                 </div>
  205.             </form>
  206.             ";
  207.         } else {
  208.             // line 84
  209.             yield "            <div class=\"cart-empty-container row justify-content-center\">
  210.                 <div class=\"col-md-5\">
  211.                     <div class=\"cart-empty-content text-center\">
  212.                         <h2>Your cart is currently empty.</h2>
  213.                         <p>Before proceed to checkout you must add some products 
  214.                         to your shopping cart. You will find a lot of interesting products 
  215.                         on our Website.
  216.                         </p>
  217.                         <a href=\"";
  218.             // line 92
  219.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("product_list");
  220.             yield "\" class=\"btn btn-teritary-fast\"><span class=\"text\">Go to shopping</span></a>
  221.                     </div>
  222.                 </div>
  223.             </div>
  224.             ";
  225.         }
  226.         // line 97
  227.         yield "            <div class=\"spinner-wrapper\" data-cart-target=\"spinner\">
  228.                 <div class=\"spinner\"></div>
  229.                 <span>Loading...</span>
  230.             </div>
  231.         </div>
  232.     </section>
  233.     <!-- Cart -->
  234. ";
  235.         
  236.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  237.         
  238.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  239.         return; yield '';
  240.     }
  241.     /**
  242.      * @codeCoverageIgnore
  243.      */
  244.     public function getTemplateName()
  245.     {
  246.         return "@Ecommerce/Main/cart.html.twig";
  247.     }
  248.     /**
  249.      * @codeCoverageIgnore
  250.      */
  251.     public function isTraitable()
  252.     {
  253.         return false;
  254.     }
  255.     /**
  256.      * @codeCoverageIgnore
  257.      */
  258.     public function getDebugInfo()
  259.     {
  260.         return array (  246 => 97,  238 => 92,  228 => 84,  215 => 74,  197 => 59,  185 => 49,  176 => 46,  171 => 44,  166 => 42,  160 => 41,  156 => 40,  147 => 34,  143 => 33,  136 => 31,  127 => 28,  123 => 27,  105 => 13,  103 => 12,  98 => 10,  84 => 7,  73 => 0,  63 => 5,  52 => 1,  50 => 3,  37 => 1,);
  261.     }
  262.     public function getSourceContext()
  263.     {
  264.         return new Source("{% extends \"standard_tpl.html.twig\" %}
  265. {% set page_title_alt = \"Cart\" %}
  266. {% block page_banner 'minimal' %}
  267. {% block  content %}   
  268.    
  269.     <!-- Cart -->
  270.     <section class=\"cart-wrapper\" data-controller=\"cart\" data-url=\"{{ path('shopping_cart_json') }}\">
  271.         <div class=\"container\">
  272.             {% if cart.items|length > 0 %}
  273.             <form action=\"{{ path('shopping_cart_update') }}\" method=\"post\" class=\"cart-form\">
  274.                 <div class=\"row justify-content-center\">
  275.                     <div class=\"col-lg-9\">
  276.                         <h2 class=\"checkout-form-title text-center\">Shopping Cart</h2>
  277.                         <div class=\"shopping-table-wrapper\">
  278.                             <table>
  279.                                 <thead>
  280.                                     <tr>
  281.                                         <th>Product</th>
  282.                                         <th class=\"text-center\">Quantity</th>
  283.                                         <th class=\"text-right\">Total</th>
  284.                                     </tr>
  285.                                 </thead>
  286.                                 <tbody data-cart-target=\"cartContent\">
  287.                                     {% for item in cart.items %}
  288.                                     <tr class=\"cart-item\" data-product-id=\"{{ item.id }}\" data-product-price=\"{{ item.price }}\">
  289.                                         <td class=\"order-card-details\">
  290.                                             <div class=\"d-flex align-items-center order-card\">
  291.                                                 <img src=\"{{ item.image|media_url }}\" class=\"img-fluid\" alt=\"{{ item.name }}\">
  292.                                                 <div class=\"order-card-content d-md-block\">
  293.                                                     <h3 class=\"order-card-title\">{{ item.name }}</h3>
  294.                                                     <p>{{ currency(item.price) }}</p>
  295.                                                 </div>
  296.                                             </div>
  297.                                         </td>
  298.                                         <td class=\"text-center\">
  299.                                             <div class=\"input-group fast-cart-group quantity-controls\">
  300.                                                 <button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#decrement\" data-index=\"{{ item.id }}\">-</button>
  301.                                                 <input type=\"text\" name=\"products[{{item.id}}][qty]\" data-cart-target=\"quantity\" class=\"form-control checkout-form-input\" type=\"number\" aria-label=\"Example text with button addon\" value=\"{{ item.qty }}\">
  302.                                                 <button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#increment\" data-index=\"{{ item.id }}\">+</button>
  303.                                             </div>
  304.                                             <a href=\"#\" class=\"btn-cart-remove\"  data-action=\"click->cart#removeItem\" data-index=\"{{ item.id }}\">Remove</a>
  305.                                         </td>
  306.                                         <td class=\"text-right\" data-cart-target=\"total\">{{ currency(item.getAmount()) }}</td>
  307.                                     </tr>
  308.                                     {% endfor %}
  309.                                 </tbody>
  310.                             </table>
  311.                         </div>
  312.                         <div class=\"order-summary-wrapper\">
  313.                             <div class=\"d-flex justify-content-between mt-3\">
  314.                                 <div>
  315.                                     <p class=\"text-right\">Shipping & taxes calculated at checkout</p>
  316.                                 </div>
  317.                                 <div class=\"subtotal\">
  318.                                     <span class=\"subtotal-label\">Subtotal: </span>
  319.                                     <span data-cart-target=\"subtotalAmount\">{{ currency(sub_total) }}</span>
  320.                                 </div>
  321.                             </div>
  322.                             
  323.                             
  324.                             <p>All charges are billed in USD. While the content of your cart is currently displayed in , the checkout will use USD at the most current exchange rate.</p>
  325.                             <p>
  326.                                 <input style=\"float:none; vertical-align: middle;\" type=\"checkbox\" class=\"agree_terms_conditions\" />
  327.                                 <label style=\"display:inline; float:none\" for=\"agree\">
  328.                                     I agree with the <a href=\"#\">terms and conditions</a>
  329.                                 </label>
  330.                             </p>
  331.                             <div class=\"d-flex justify-content-end mt-4 checkout-btn-list align-items-center\">
  332.                                 <!-- <button type=\"submit\" class=\"btn btn-teritary-fast\">Update Cart</button> -->
  333.                                     <div class=\"col-md-3\">
  334.                                         <a href=\"{{ path('shopping_checkout') }}\" class=\"btn btn-teritary-fast btn-cart-checkout\">
  335.                                             <span class=\"text\">Check Out</span>
  336.                                         </a>
  337.                                     </div>
  338.                             </div>
  339.                         </div>
  340.                     </div>
  341.                 </div>
  342.             </form>
  343.             {% else %}
  344.             <div class=\"cart-empty-container row justify-content-center\">
  345.                 <div class=\"col-md-5\">
  346.                     <div class=\"cart-empty-content text-center\">
  347.                         <h2>Your cart is currently empty.</h2>
  348.                         <p>Before proceed to checkout you must add some products 
  349.                         to your shopping cart. You will find a lot of interesting products 
  350.                         on our Website.
  351.                         </p>
  352.                         <a href=\"{{ path('product_list') }}\" class=\"btn btn-teritary-fast\"><span class=\"text\">Go to shopping</span></a>
  353.                     </div>
  354.                 </div>
  355.             </div>
  356.             {% endif %}
  357.             <div class=\"spinner-wrapper\" data-cart-target=\"spinner\">
  358.                 <div class=\"spinner\"></div>
  359.                 <span>Loading...</span>
  360.             </div>
  361.         </div>
  362.     </section>
  363.     <!-- Cart -->
  364. {% endblock %}""@Ecommerce/Main/cart.html.twig""/home/u835281259/domains/konashznaturals.com/siteFiles/templates/bundles/EcommerceBundle/Main/cart.html.twig");
  365.     }
  366. }