<?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;
/* Block/cart.twig */
class __TwigTemplate_8c2d59d5a080c1a0a3a33df9b922f022 extends \Eccube\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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/cart.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/cart.twig"));
// line 11
$context["Carts"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_all_carts();
// line 12
$context["totalPrice"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_price();
// line 13
$context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
// line 14
echo "<div class=\"ec-cartNaviWrap\">
<div class=\"ec-cartNavi\">
<i class=\"ec-cartNavi__icon fas fa-shopping-cart\">
<span class=\"ec-cartNavi__badge\">";
// line 17
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 17, $this->source); })())), "html", null, true);
echo "</span>
</i>
<div class=\"ec-cartNavi__label\">
<div class=\"ec-cartNavi__price\">";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter((isset($context["totalPrice"]) || array_key_exists("totalPrice", $context) ? $context["totalPrice"] : (function () { throw new RuntimeError('Variable "totalPrice" does not exist.', 20, $this->source); })())), "html", null, true);
echo "</div>
</div>
</div>
";
// line 23
if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 23, $this->source); })()) > 0)) {
// line 24
echo " <div class=\"ec-cartNaviIsset\">
";
// line 25
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Carts"]) || array_key_exists("Carts", $context) ? $context["Carts"] : (function () { throw new RuntimeError('Variable "Carts" does not exist.', 25, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Cart"]) {
// line 26
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Cart"], "CartItems", [], "any", false, false, false, 26));
foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
// line 27
echo " ";
$context["ProductClass"] = twig_get_attribute($this->env, $this->source, $context["CartItem"], "ProductClass", [], "any", false, false, false, 27);
// line 28
echo " ";
$context["Product"] = twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 28, $this->source); })()), "Product", [], "any", false, false, false, 28);
// line 29
echo " <div class=\"ec-cartNaviIsset__cart\">
<div class=\"ec-cartNaviIsset__cartImage\">
<img src=\"";
// line 31
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(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.', 31, $this->source); })()), "MainListImage", [], "any", false, false, false, 31)), "save_image"), "html", null, true);
echo "\" alt=\"";
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.', 31, $this->source); })()), "name", [], "any", false, false, false, 31), "html", null, true);
echo "\">
</div>
<div class=\"ec-cartNaviIsset__cartContent\">
<div class=\"ec-cartNaviIsset__cartContentTitle\">";
// line 34
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.', 34, $this->source); })()), "name", [], "any", false, false, false, 34), "html", null, true);
echo "
<div class=\"ec-font-size-1\">
";
// line 36
if ((twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 36, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 36) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 36, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 36), "id", [], "any", false, false, false, 36))) {
// line 37
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 37, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 37), "ClassName", [], "any", false, false, false, 37), "name", [], "any", false, false, false, 37), "html", null, true);
echo ":";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 37, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 37), "html", null, true);
echo "
";
}
// line 39
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 39, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 39) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 39, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 39), "id", [], "any", false, false, false, 39))) {
// line 40
echo " <br>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 40, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 40), "ClassName", [], "any", false, false, false, 40), "name", [], "any", false, false, false, 40), "html", null, true);
echo ":";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 40, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 40), "html", null, true);
echo "
";
}
// line 42
echo " </div>
</div>
<div class=\"ec-cartNaviIsset__cartContentPrice\">
";
// line 45
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["CartItem"], "price", [], "any", false, false, false, 45)), "html", null, true);
echo "
<div class=\"ec-cartNaviIsset__cartContentTax\">";
// line 46
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</div>
</div>
<div class=\"ec-cartNaviIsset__cartContentNumber\">";
// line 48
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["CartItem"], "quantity", [], "any", false, false, false, 48)), "html", null, true);
echo "</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 52
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Cart'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 53
echo " <div class=\"ec-cartNaviIsset__action\">
<a class=\"ec-blockBtn--action\" href=\"";
// line 54
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
<a class=\"ec-blockBtn ec-cartNavi--cancel\">";
// line 55
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("キャンセル"), "html", null, true);
echo "</a>
</div>
</div>
";
} else {
// line 59
echo " <div class=\"ec-cartNaviNull\">
<div class=\"ec-cartNaviNull__message\">
<p>";
// line 61
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在カート内に商品はございません。"), "html", null, true);
echo "</p>
</div>
</div>
";
}
// line 65
echo "</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/cart.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 183 => 65, 176 => 61, 172 => 59, 165 => 55, 159 => 54, 156 => 53, 150 => 52, 138 => 48, 133 => 46, 129 => 45, 124 => 42, 116 => 40, 113 => 39, 105 => 37, 103 => 36, 98 => 34, 90 => 31, 86 => 29, 83 => 28, 80 => 27, 75 => 26, 71 => 25, 68 => 24, 66 => 23, 60 => 20, 54 => 17, 49 => 14, 47 => 13, 45 => 12, 43 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Carts = get_all_carts() %}
{% set totalPrice = get_carts_total_price() %}
{% set totalQuantity = get_carts_total_quantity() %}
<div class=\"ec-cartNaviWrap\">
<div class=\"ec-cartNavi\">
<i class=\"ec-cartNavi__icon fas fa-shopping-cart\">
<span class=\"ec-cartNavi__badge\">{{ totalQuantity|number_format }}</span>
</i>
<div class=\"ec-cartNavi__label\">
<div class=\"ec-cartNavi__price\">{{ totalPrice|price }}</div>
</div>
</div>
{% if totalQuantity > 0 %}
<div class=\"ec-cartNaviIsset\">
{% for Cart in Carts %}
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<div class=\"ec-cartNaviIsset__cart\">
<div class=\"ec-cartNaviIsset__cartImage\">
<img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\">
</div>
<div class=\"ec-cartNaviIsset__cartContent\">
<div class=\"ec-cartNaviIsset__cartContentTitle\">{{ Product.name }}
<div class=\"ec-font-size-1\">
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
{% endif %}
{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
<br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
{% endif %}
</div>
</div>
<div class=\"ec-cartNaviIsset__cartContentPrice\">
{{ CartItem.price|price }}
<div class=\"ec-cartNaviIsset__cartContentTax\">{{ '税込'|trans }}</div>
</div>
<div class=\"ec-cartNaviIsset__cartContentNumber\">{{ '数量'|trans }} {{ CartItem.quantity|number_format }}</div>
</div>
</div>
{% endfor %}
{% endfor %}
<div class=\"ec-cartNaviIsset__action\">
<a class=\"ec-blockBtn--action\" href=\"{{ url('cart') }}\">{{ 'カートへ進む'|trans }}</a>
<a class=\"ec-blockBtn ec-cartNavi--cancel\">{{ 'キャンセル'|trans }}</a>
</div>
</div>
{% else %}
<div class=\"ec-cartNaviNull\">
<div class=\"ec-cartNaviNull__message\">
<p>{{ '現在カート内に商品はございません。'|trans }}</p>
</div>
</div>
{% endif %}
</div>
", "Block/cart.twig", "/home/zen2022/tpscoco.com/public_html/src/Eccube/Resource/template/default/Block/cart.twig");
}
}