<?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;
/* Cart/index.twig */
class __TwigTemplate_72920ea1705c475fda3e545ea29cb59c extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.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", "Cart/index.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Cart/index.twig"));
// line 13
$context["body_class"] = "cart_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Cart/index.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 15
public function block_main($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", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 16
echo "
<div class=\"ec-role\">
<div class=\"order-navi\">
<div class=\"ec-pageHeader\">
<h1>";
// line 20
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カゴの商品"), "html", null, true);
echo "</h1>
</div>
<div class=\"ec-cartRole__progress\">
<ul class=\"ec-progress\">
";
// line 24
$context["step"] = 1;
// line 25
echo " <li class=\"ec-progress__item is-complete\">
<div class=\"ec-progress__number\">";
// line 26
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 26, $this->source); })()), 26, $this->source), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 26, $this->source); })()) + 1);
// line 27
echo " </div>
<div class=\"ec-progress__label\">";
// line 28
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品一覧"), "html", null, true);
echo "
</div>
</li>
";
// line 31
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER") == false)) {
// line 32
echo " <li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 33
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 33, $this->source); })()), 33, $this->source), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 33, $this->source); })()) + 1);
// line 34
echo " </div>
<div class=\"ec-progress__label\">";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お客様情報"), "html", null, true);
echo "
</div>
</li>
";
}
// line 39
echo " <li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 40
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 40, $this->source); })()), 40, $this->source), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 40, $this->source); })()) + 1);
// line 41
echo " </div>
<div class=\"ec-progress__label\">";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご注文手続き"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 46
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 46, $this->source); })()), 46, $this->source), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 46, $this->source); })()) + 1);
// line 47
echo " </div>
<div class=\"ec-progress__label\">";
// line 48
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご注文内容確認"), "html", null, true);
echo "
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">";
// line 52
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 52, $this->source); })()), 52, $this->source), "html", null, true);
$context["step"] = ((isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 52, $this->source); })()) + 1);
// line 53
echo " </div>
<div class=\"ec-progress__label\">";
// line 54
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("完了"), "html", null, true);
echo "
</div>
</li>
</ul>
</div>
</div>
</div>
<div class=\"ec-cartRole order-content\">
<div class=\"content-order\">
";
// line 63
$context["productStr"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 63, $this->source); })()), "session", [], "any", false, false, true, 63), "flashbag", [], "any", false, false, true, 63), "get", [0 => "eccube.front.request.product"], "method", false, false, true, 63);
// line 64
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 64, $this->source); })()), "session", [], "any", false, false, true, 64), "flashbag", [], "any", false, false, true, 64), "get", [0 => "eccube.front.request.error"], "method", false, false, true, 64));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 65
echo " ";
$context["idx"] = twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, true, 65);
// line 66
echo " <p class=\"cart-error__block\">
";
// line 67
if (twig_get_attribute($this->env, $this->source, ($context["productStr"] ?? null), (isset($context["idx"]) || array_key_exists("idx", $context) ? $context["idx"] : (function () { throw new RuntimeError('Variable "idx" does not exist.', 67, $this->source); })()), [], "array", true, true, true, 67)) {
// line 68
echo " ";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed($context["error"], 68, $this->source), ["%product%" => twig_get_attribute($this->env, $this->source, (isset($context["productStr"]) || array_key_exists("productStr", $context) ? $context["productStr"] : (function () { throw new RuntimeError('Variable "productStr" does not exist.', 68, $this->source); })()), (isset($context["idx"]) || array_key_exists("idx", $context) ? $context["idx"] : (function () { throw new RuntimeError('Variable "idx" does not exist.', 68, $this->source); })()), [], "array", false, false, true, 68)]), "html", null, true));
echo "
";
} else {
// line 70
echo " ";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed($context["error"], 70, $this->source)), "html", null, true));
echo "
";
}
// line 72
echo " </p>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['error'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 74, $this->source); })()), "session", [], "any", false, false, true, 74), "flashbag", [], "any", false, false, true, 74), "get", [0 => "eccube.front.cart.error"], "method", false, false, true, 74));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 75
echo " <p class=\"cart-error__block\">";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed($context["error"], 75, $this->source)), "html", null, true));
echo "</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['error'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 77
echo " ";
if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 77, $this->source); })()) > 0)) {
// line 78
echo " <p class=\"total-price\">";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品の合計金額は「<span class=\"price-number\">%price%</span>」です。", ["%price%" => $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed((isset($context["totalPrice"]) || array_key_exists("totalPrice", $context) ? $context["totalPrice"] : (function () { throw new RuntimeError('Variable "totalPrice" does not exist.', 78, $this->source); })()), 78, $this->source))]);
echo "</p>
";
// line 79
if ((twig_length_filter($this->env, (isset($context["Carts"]) || array_key_exists("Carts", $context) ? $context["Carts"] : (function () { throw new RuntimeError('Variable "Carts" does not exist.', 79, $this->source); })())) > 1)) {
// line 80
echo " <p class=\"cart-error\">";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("同時購入できない商品がカートに含まれています。"), "html", null, true));
echo "</p>
";
}
// line 82
echo "
<form name=\"form\" id=\"form_cart\" method=\"post\" action=\"";
// line 83
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">
";
// line 85
$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.', 85, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["CartIndex"] => $context["Cart"]) {
// line 86
echo " ";
$context["cartKey"] = twig_get_attribute($this->env, $this->source, $context["Cart"], "cart_key", [], "any", false, false, true, 86);
// line 87
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 87, $this->source); })()), "session", [], "any", false, false, true, 87), "flashbag", [], "any", false, false, true, 87), "get", [0 => (("eccube.front.cart." . (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 87, $this->source); })())) . ".request.error")], "method", false, false, true, 87));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 88
echo " <p class=\"cart-error__block\">";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed($context["error"], 88, $this->source)), "html", null, true));
echo "</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['error'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 90
echo "
<div class=\"content-detail\">
<ul class=\"detail-order__list\">
";
// line 93
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Cart"], "CartItems", [], "any", false, false, true, 93));
foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
// line 94
echo " ";
$context["ProductClass"] = twig_get_attribute($this->env, $this->source, $context["CartItem"], "ProductClass", [], "any", false, false, true, 94);
// line 95
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.', 95, $this->source); })()), "Product", [], "any", false, false, true, 95);
// line 96
echo " <li class=\"detail-order__item\">
<a class=\"button-circle btn-destructive\" href=\"";
// line 97
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart_handle_item", ["operation" => "remove", "productClassId" => 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.', 97, $this->source); })()), "id", [], "any", false, false, true, 97)]), "html", null, true);
echo "\" ";
echo $this->extensions['Eccube\Twig\Extension\CsrfExtension']->getCsrfTokenForAnchor();
echo " data-method=\"put\" data-message=\"カートから商品を削除してもよろしいですか?\">
<img src=\"";
// line 98
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross.svg"), "html", null, true);
echo "\" alt=\"delete\">
</a>
<div class=\"order-item__item\">
<div class=\"order-item__img\">
<a target=\"_blank\" href=\"";
// line 102
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["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.', 102, $this->source); })()), "id", [], "any", false, false, true, 102)]), "html", null, true);
echo "\">
<img src=\"";
// line 103
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(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.', 103, $this->source); })()), "MainListImage", [], "any", false, false, true, 103), 103, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 103, $this->source); })()), "name", [], "any", false, false, true, 103), 103, $this->source), "html", null, true);
echo "\"/>
</a>
</div>
<dl class=\"order-item__detail\">
<dt>
<a target=\"_blank\" href=\"";
// line 108
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["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.', 108, $this->source); })()), "id", [], "any", false, false, true, 108)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 108, $this->source); })()), "name", [], "any", false, false, true, 108), 108, $this->source), "html", null, true);
echo "</a>
";
// line 109
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.', 109, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 109) && 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.', 109, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 109), "id", [], "any", false, false, true, 109))) {
// line 110
echo " <br>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 110, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 110), "ClassName", [], "any", false, false, true, 110), "name", [], "any", false, false, true, 110), 110, $this->source), "html", null, true);
echo ":";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 110, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 110), 110, $this->source), "html", null, true);
echo "
";
}
// line 112
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.', 112, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 112) && 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.', 112, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 112), "id", [], "any", false, false, true, 112))) {
// line 113
echo " <br>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 113, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 113), "ClassName", [], "any", false, false, true, 113), "name", [], "any", false, false, true, 113), 113, $this->source), "html", null, true);
echo ":";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 113, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 113), 113, $this->source), "html", null, true);
echo "
";
}
// line 115
echo " </dt>
<dd>";
// line 116
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["CartItem"], "price", [], "any", false, false, true, 116), 116, $this->source)), "html", null, true);
echo "</dd>
</dl>
</div>
<dl class=\"order-item__quantity\">
<dt>";
// line 120
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</dt>
<dd>
<div class=\"change-quantity\">
";
// line 123
if ((twig_get_attribute($this->env, $this->source, $context["CartItem"], "quantity", [], "any", false, false, true, 123) > 1)) {
// line 124
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart_handle_item", ["operation" => "down", "productClassId" => 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.', 124, $this->source); })()), "id", [], "any", false, false, true, 124)]), "html", null, true);
echo "\" ";
echo $this->extensions['Eccube\Twig\Extension\CsrfExtension']->getCsrfTokenForAnchor();
echo " class=\"load-overlay\" data-method=\"put\" data-confirm=\"false\">-</a>
";
} else {
// line 126
echo " <span class=\"btn-disabled\">-</span>
";
}
// line 128
echo " </div>
<span class=\"current-quantity\">";
// line 129
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["CartItem"], "quantity", [], "any", false, false, true, 129), 129, $this->source)), "html", null, true);
echo "</span>
<div class=\"change-quantity\">
<a href=\"";
// line 131
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart_handle_item", ["operation" => "up", "productClassId" => 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.', 131, $this->source); })()), "id", [], "any", false, false, true, 131)]), "html", null, true);
echo "\" ";
echo $this->extensions['Eccube\Twig\Extension\CsrfExtension']->getCsrfTokenForAnchor();
echo " class=\"load-overlay\" data-method=\"put\" data-confirm=\"false\">+</a>
</div>
</dd>
</dl>
<dl class=\"order-item__subtotal\">
<dt>";
// line 136
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("小計"), "html", null, true);
echo "</dt>
<dd>";
// line 137
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["CartItem"], "total_price", [], "any", false, false, true, 137), 137, $this->source)), "html", null, true);
echo "</dd>
</dl>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 141
echo " </ul>
</div>
<dl class=\"total-amount\">
<dt>";
// line 144
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("合計"), "html", null, true);
echo "</dt>
<dd>";
// line 145
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Cart"], "totalPrice", [], "any", false, false, true, 145), 145, $this->source)), "html", null, true);
echo "<span class=\"tax-label\">(税・送料込み)</span></dd>
</dl>
<div class=\"form-unit__actions\">
<a class=\"ec-blockBtn--action\" href=\"";
// line 148
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cart_buystep", ["cart_key" => (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 148, $this->source); })())]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("レジに進む"), "html", null, true);
echo "</a>
";
// line 149
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 149)) {
// line 150
echo " <a class=\"ec-blockBtn--cancel\" href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("homepage");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</a>
";
}
// line 152
echo " </div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['CartIndex'], $context['Cart'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 154
echo " </form>
";
} else {
// line 156
echo " ";
$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.', 156, $this->source); })()));
foreach ($context['_seq'] as $context["CartIndex"] => $context["Cart"]) {
// line 157
echo " ";
$context["cartKey"] = twig_get_attribute($this->env, $this->source, $context["Cart"], "cart_key", [], "any", false, false, true, 157);
// line 158
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 158, $this->source); })()), "session", [], "any", false, false, true, 158), "flashbag", [], "any", false, false, true, 158), "get", [0 => (("eccube.front.cart." . (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 158, $this->source); })())) . ".request.error")], "method", false, false, true, 158));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 159
echo " <div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"";
// line 161
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/exclamation-white.svg"), "html", null, true);
echo "\"></div>
<div class=\"ec-alert-warning__text\">
";
// line 163
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->sandbox->ensureToStringAllowed($context["error"], 163, $this->source)), "html", null, true));
echo "
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['error'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 168
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['CartIndex'], $context['Cart'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 169
echo " <p class=\"cart-error__block\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在カート内に商品はございません。"), "html", null, true);
echo "</p>
";
}
// line 171
echo " </div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Cart/index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 524 => 171, 518 => 169, 512 => 168, 501 => 163, 496 => 161, 492 => 159, 487 => 158, 484 => 157, 479 => 156, 475 => 154, 460 => 152, 452 => 150, 450 => 149, 444 => 148, 438 => 145, 434 => 144, 429 => 141, 419 => 137, 415 => 136, 405 => 131, 400 => 129, 397 => 128, 393 => 126, 385 => 124, 383 => 123, 377 => 120, 370 => 116, 367 => 115, 359 => 113, 356 => 112, 348 => 110, 346 => 109, 340 => 108, 330 => 103, 326 => 102, 319 => 98, 313 => 97, 310 => 96, 307 => 95, 304 => 94, 300 => 93, 295 => 90, 286 => 88, 281 => 87, 278 => 86, 261 => 85, 256 => 83, 253 => 82, 247 => 80, 245 => 79, 240 => 78, 237 => 77, 228 => 75, 223 => 74, 208 => 72, 202 => 70, 196 => 68, 194 => 67, 191 => 66, 188 => 65, 170 => 64, 168 => 63, 156 => 54, 153 => 53, 150 => 52, 143 => 48, 140 => 47, 137 => 46, 130 => 42, 127 => 41, 124 => 40, 121 => 39, 114 => 35, 111 => 34, 108 => 33, 105 => 32, 103 => 31, 97 => 28, 94 => 27, 91 => 26, 88 => 25, 86 => 24, 79 => 20, 73 => 16, 63 => 15, 52 => 11, 50 => 13, 37 => 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.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'cart_page' %}
{% block main %}
<div class=\"ec-role\">
<div class=\"order-navi\">
<div class=\"ec-pageHeader\">
<h1>{{ 'カゴの商品'|trans }}</h1>
</div>
<div class=\"ec-cartRole__progress\">
<ul class=\"ec-progress\">
{% set step = 1 %}
<li class=\"ec-progress__item is-complete\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '商品一覧'|trans }}
</div>
</li>
{% if is_granted('ROLE_USER') == false %}
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'お客様情報'|trans }}
</div>
</li>
{% endif %}
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'ご注文手続き'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'ご注文内容確認'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '完了'|trans }}
</div>
</li>
</ul>
</div>
</div>
</div>
<div class=\"ec-cartRole order-content\">
<div class=\"content-order\">
{% set productStr = app.session.flashbag.get('eccube.front.request.product') %}
{% for error in app.session.flashbag.get('eccube.front.request.error') %}
{% set idx = loop.index0 %}
<p class=\"cart-error__block\">
{% if productStr[idx] is defined %}
{{ error|trans({'%product%':productStr[idx]})|nl2br }}
{% else %}
{{ error|trans|nl2br }}
{% endif %}
</p>
{% endfor %}
{% for error in app.session.flashbag.get('eccube.front.cart.error') %}
<p class=\"cart-error__block\">{{ error|trans|nl2br }}</p>
{% endfor %}
{% if totalQuantity > 0 %}
<p class=\"total-price\">{{ '商品の合計金額は「<span class=\"price-number\">%price%</span>」です。'|trans({ '%price%': totalPrice|price })|raw }}</p>
{% if Carts|length > 1 %}
<p class=\"cart-error\">{{ '同時購入できない商品がカートに含まれています。'|trans|nl2br }}</p>
{% endif %}
<form name=\"form\" id=\"form_cart\" method=\"post\" action=\"{{ url('cart') }}\">
{% for CartIndex,Cart in Carts %}
{% set cartKey = Cart.cart_key %}
{% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
<p class=\"cart-error__block\">{{ error|trans|nl2br }}</p>
{% endfor %}
<div class=\"content-detail\">
<ul class=\"detail-order__list\">
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<li class=\"detail-order__item\">
<a class=\"button-circle btn-destructive\" href=\"{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}\" {{ csrf_token_for_anchor() }} data-method=\"put\" data-message=\"カートから商品を削除してもよろしいですか?\">
<img src=\"{{ asset('assets/icon/cross.svg') }}\" alt=\"delete\">
</a>
<div class=\"order-item__item\">
<div class=\"order-item__img\">
<a target=\"_blank\" href=\"{{ url('product_detail', {id : Product.id} ) }}\">
<img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\"/>
</a>
</div>
<dl class=\"order-item__detail\">
<dt>
<a target=\"_blank\" href=\"{{ url('product_detail', {id : Product.id} ) }}\">{{ Product.name }}</a>
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
<br>{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
{% endif %}
{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
<br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
{% endif %}
</dt>
<dd>{{ CartItem.price|price }}</dd>
</dl>
</div>
<dl class=\"order-item__quantity\">
<dt>{{ '数量'|trans }}</dt>
<dd>
<div class=\"change-quantity\">
{% if CartItem.quantity > 1 %}
<a href=\"{{ url('cart_handle_item', {'operation': 'down', 'productClassId': ProductClass.id}) }}\" {{ csrf_token_for_anchor() }} class=\"load-overlay\" data-method=\"put\" data-confirm=\"false\">-</a>
{% else %}
<span class=\"btn-disabled\">-</span>
{% endif %}
</div>
<span class=\"current-quantity\">{{ CartItem.quantity|number_format }}</span>
<div class=\"change-quantity\">
<a href=\"{{ url('cart_handle_item', {'operation': 'up', 'productClassId': ProductClass.id}) }}\" {{ csrf_token_for_anchor() }} class=\"load-overlay\" data-method=\"put\" data-confirm=\"false\">+</a>
</div>
</dd>
</dl>
<dl class=\"order-item__subtotal\">
<dt>{{ '小計'|trans }}</dt>
<dd>{{ CartItem.total_price|price }}</dd>
</dl>
</li>
{% endfor %}
</ul>
</div>
<dl class=\"total-amount\">
<dt>{{ '合計'|trans }}</dt>
<dd>{{ Cart.totalPrice|price }}<span class=\"tax-label\">(税・送料込み)</span></dd>
</dl>
<div class=\"form-unit__actions\">
<a class=\"ec-blockBtn--action\" href=\"{{ path('cart_buystep', {'cart_key':cartKey}) }}\">{{ 'レジに進む'|trans }}</a>
{% if loop.last %}
<a class=\"ec-blockBtn--cancel\" href=\"{{ path('homepage') }}\">{{ 'お買い物を続ける'|trans }}</a>
{% endif %}
</div>
{% endfor %}
</form>
{% else %}
{% for CartIndex,Cart in Carts %}
{% set cartKey = Cart.cart_key %}
{% for error in app.session.flashbag.get('eccube.front.cart.' ~ cartKey ~ '.request.error') %}
<div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"{{ asset('assets/icon/exclamation-white.svg') }}\"></div>
<div class=\"ec-alert-warning__text\">
{{ error|trans|nl2br }}
</div>
</div>
</div>
{% endfor %}
{% endfor %}
<p class=\"cart-error__block\">{{ '現在カート内に商品はございません。'|trans }}</p>
{% endif %}
</div>
</div>
{% endblock %}
", "Cart/index.twig", "/home/xs362797/magamar.jp/public_html/app/template/magamar/Cart/index.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 31, "for" => 64);
static $filters = array("escape" => 20, "trans" => 20, "nl2br" => 68, "raw" => 78, "price" => 78, "length" => 79, "no_image_product" => 103, "number_format" => 129);
static $functions = array("is_granted" => 31, "url" => 83, "csrf_token_for_anchor" => 97, "asset" => 98, "path" => 148);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['escape', 'trans', 'nl2br', 'raw', 'price', 'length', 'no_image_product', 'number_format'],
['is_granted', 'url', 'csrf_token_for_anchor', 'asset', 'path']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}