<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
/* @Ecommerce/Main/cart.html.twig */
class __TwigTemplate_f80828fe90a3d26f07bcfaa66c36cfc2 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_banner' => [$this, 'block_page_banner'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "standard_tpl.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Ecommerce/Main/cart.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Ecommerce/Main/cart.html.twig"));
// line 3
$context["page_title_alt"] = "Cart";
// line 1
$this->parent = $this->loadTemplate("standard_tpl.html.twig", "@Ecommerce/Main/cart.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
public function block_page_banner($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_banner"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_banner"));
// line 0
yield "minimal";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 7
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
yield "
<!-- Cart -->
<section class=\"cart-wrapper\" data-controller=\"cart\" data-url=\"";
// line 10
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_cart_json");
yield "\">
<div class=\"container\">
";
// line 12
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", false, false, false, 12)) > 0)) {
// line 13
yield " <form action=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_cart_update");
yield "\" method=\"post\" class=\"cart-form\">
<div class=\"row justify-content-center\">
<div class=\"col-lg-9\">
<h2 class=\"checkout-form-title text-center\">Shopping Cart</h2>
<div class=\"shopping-table-wrapper\">
<table>
<thead>
<tr>
<th>Product</th>
<th class=\"text-center\">Quantity</th>
<th class=\"text-right\">Total</th>
</tr>
</thead>
<tbody data-cart-target=\"cartContent\">
";
// line 27
$context['_parent'] = $context;
$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", false, false, false, 27));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 28
yield " <tr class=\"cart-item\" data-product-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 28), "html", null, true);
yield "\" data-product-price=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "price", [], "any", false, false, false, 28), "html", null, true);
yield "\">
<td class=\"order-card-details\">
<div class=\"d-flex align-items-center order-card\">
<img src=\"";
// line 31
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", false, false, false, 31)), "html", null, true);
yield "\" class=\"img-fluid\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 31), "html", null, true);
yield "\">
<div class=\"order-card-content d-md-block\">
<h3 class=\"order-card-title\">";
// line 33
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 33), "html", null, true);
yield "</h3>
<p>";
// line 34
yield $this->extensions['Boab\CmsBundle\Twig\Extension\BoabCmsExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "price", [], "any", false, false, false, 34));
yield "</p>
</div>
</div>
</td>
<td class=\"text-center\">
<div class=\"input-group fast-cart-group quantity-controls\">
<button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#decrement\" data-index=\"";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 40), "html", null, true);
yield "\">-</button>
<input type=\"text\" name=\"products[";
// line 41
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 41), "html", null, true);
yield "][qty]\" data-cart-target=\"quantity\" class=\"form-control checkout-form-input\" type=\"number\" aria-label=\"Example text with button addon\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "qty", [], "any", false, false, false, 41), "html", null, true);
yield "\">
<button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#increment\" data-index=\"";
// line 42
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 42), "html", null, true);
yield "\">+</button>
</div>
<a href=\"#\" class=\"btn-cart-remove\" data-action=\"click->cart#removeItem\" data-index=\"";
// line 44
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 44), "html", null, true);
yield "\">Remove</a>
</td>
<td class=\"text-right\" data-cart-target=\"total\">";
// line 46
yield $this->extensions['Boab\CmsBundle\Twig\Extension\BoabCmsExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "getAmount", [], "method", false, false, false, 46));
yield "</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 49
yield " </tbody>
</table>
</div>
<div class=\"order-summary-wrapper\">
<div class=\"d-flex justify-content-between mt-3\">
<div>
<p class=\"text-right\">Shipping & taxes calculated at checkout</p>
</div>
<div class=\"subtotal\">
<span class=\"subtotal-label\">Subtotal: </span>
<span data-cart-target=\"subtotalAmount\">";
// line 59
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); })()));
yield "</span>
</div>
</div>
<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>
<p>
<input style=\"float:none; vertical-align: middle;\" type=\"checkbox\" class=\"agree_terms_conditions\" />
<label style=\"display:inline; float:none\" for=\"agree\">
I agree with the <a href=\"#\">terms and conditions</a>
</label>
</p>
<div class=\"d-flex justify-content-end mt-4 checkout-btn-list align-items-center\">
<!-- <button type=\"submit\" class=\"btn btn-teritary-fast\">Update Cart</button> -->
<div class=\"col-md-3\">
<a href=\"";
// line 74
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("shopping_checkout");
yield "\" class=\"btn btn-teritary-fast btn-cart-checkout\">
<span class=\"text\">Check Out</span>
</a>
</div>
</div>
</div>
</div>
</div>
</form>
";
} else {
// line 84
yield " <div class=\"cart-empty-container row justify-content-center\">
<div class=\"col-md-5\">
<div class=\"cart-empty-content text-center\">
<h2>Your cart is currently empty.</h2>
<p>Before proceed to checkout you must add some products
to your shopping cart. You will find a lot of interesting products
on our Website.
</p>
<a href=\"";
// line 92
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("product_list");
yield "\" class=\"btn btn-teritary-fast\"><span class=\"text\">Go to shopping</span></a>
</div>
</div>
</div>
";
}
// line 97
yield " <div class=\"spinner-wrapper\" data-cart-target=\"spinner\">
<div class=\"spinner\"></div>
<span>Loading...</span>
</div>
</div>
</section>
<!-- Cart -->
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "@Ecommerce/Main/cart.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends \"standard_tpl.html.twig\" %}
{% set page_title_alt = \"Cart\" %}
{% block page_banner 'minimal' %}
{% block content %}
<!-- Cart -->
<section class=\"cart-wrapper\" data-controller=\"cart\" data-url=\"{{ path('shopping_cart_json') }}\">
<div class=\"container\">
{% if cart.items|length > 0 %}
<form action=\"{{ path('shopping_cart_update') }}\" method=\"post\" class=\"cart-form\">
<div class=\"row justify-content-center\">
<div class=\"col-lg-9\">
<h2 class=\"checkout-form-title text-center\">Shopping Cart</h2>
<div class=\"shopping-table-wrapper\">
<table>
<thead>
<tr>
<th>Product</th>
<th class=\"text-center\">Quantity</th>
<th class=\"text-right\">Total</th>
</tr>
</thead>
<tbody data-cart-target=\"cartContent\">
{% for item in cart.items %}
<tr class=\"cart-item\" data-product-id=\"{{ item.id }}\" data-product-price=\"{{ item.price }}\">
<td class=\"order-card-details\">
<div class=\"d-flex align-items-center order-card\">
<img src=\"{{ item.image|media_url }}\" class=\"img-fluid\" alt=\"{{ item.name }}\">
<div class=\"order-card-content d-md-block\">
<h3 class=\"order-card-title\">{{ item.name }}</h3>
<p>{{ currency(item.price) }}</p>
</div>
</div>
</td>
<td class=\"text-center\">
<div class=\"input-group fast-cart-group quantity-controls\">
<button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#decrement\" data-index=\"{{ item.id }}\">-</button>
<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 }}\">
<button class=\"btn btn-outline-secondary\" type=\"button\" data-action=\"cart#increment\" data-index=\"{{ item.id }}\">+</button>
</div>
<a href=\"#\" class=\"btn-cart-remove\" data-action=\"click->cart#removeItem\" data-index=\"{{ item.id }}\">Remove</a>
</td>
<td class=\"text-right\" data-cart-target=\"total\">{{ currency(item.getAmount()) }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class=\"order-summary-wrapper\">
<div class=\"d-flex justify-content-between mt-3\">
<div>
<p class=\"text-right\">Shipping & taxes calculated at checkout</p>
</div>
<div class=\"subtotal\">
<span class=\"subtotal-label\">Subtotal: </span>
<span data-cart-target=\"subtotalAmount\">{{ currency(sub_total) }}</span>
</div>
</div>
<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>
<p>
<input style=\"float:none; vertical-align: middle;\" type=\"checkbox\" class=\"agree_terms_conditions\" />
<label style=\"display:inline; float:none\" for=\"agree\">
I agree with the <a href=\"#\">terms and conditions</a>
</label>
</p>
<div class=\"d-flex justify-content-end mt-4 checkout-btn-list align-items-center\">
<!-- <button type=\"submit\" class=\"btn btn-teritary-fast\">Update Cart</button> -->
<div class=\"col-md-3\">
<a href=\"{{ path('shopping_checkout') }}\" class=\"btn btn-teritary-fast btn-cart-checkout\">
<span class=\"text\">Check Out</span>
</a>
</div>
</div>
</div>
</div>
</div>
</form>
{% else %}
<div class=\"cart-empty-container row justify-content-center\">
<div class=\"col-md-5\">
<div class=\"cart-empty-content text-center\">
<h2>Your cart is currently empty.</h2>
<p>Before proceed to checkout you must add some products
to your shopping cart. You will find a lot of interesting products
on our Website.
</p>
<a href=\"{{ path('product_list') }}\" class=\"btn btn-teritary-fast\"><span class=\"text\">Go to shopping</span></a>
</div>
</div>
</div>
{% endif %}
<div class=\"spinner-wrapper\" data-cart-target=\"spinner\">
<div class=\"spinner\"></div>
<span>Loading...</span>
</div>
</div>
</section>
<!-- Cart -->
{% endblock %}", "@Ecommerce/Main/cart.html.twig", "/home/u835281259/domains/konashznaturals.com/siteFiles/templates/bundles/EcommerceBundle/Main/cart.html.twig");
}
}