<?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_8761d83ce7742649a824ba24b33a95487fffee4f7bf3102e6d9a870595714554 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'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Cart/index.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Cart/index.twig"));
// line 3
$context["body_class"] = "cart_page";
// line 1
$this->parent = $this->loadTemplate("default_frame.twig", "Cart/index.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 4
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 5
echo " <script>
const formatCurrency = (value) => {
value = value.toLocaleString(\"en\",{
minimumFractionDigits: 0,
maximumFractionDigits: 0,
});
return `¥\${value}`
}
\$(function() {
\$(\".ec-cartRow__Action\").on(\"click\", function(e) {
e.preventDefault();
var href = \$(this).attr(\"href\");
var confirmMessage = \$(this).attr(\"data-message\");
var action = \$(this).attr(\"data-action\");
var self = \$(this);
if(confirmMessage) {
if(!confirm(confirmMessage)) {
return false;
}
}
\$.ajax({
url: href,
type: \"PUT\",
}).done(function(data) {
var \$curQuantityEl = \$(self).parents(\".ec-cartRow__amountColumn\").find(\".ec-cartRow__amount\");
var \$curQuantitySPEl = \$(self).parents(\".ec-cartRow__amountColumn\").find(\".ec-cartRow__amountSP\");
var stock = \$(self).parents(\".ec-cartRow\").find(\".stock\").val() * 1;
var cartItemPrice = \$(self).parents(\".ec-cartRow\").find(\".cart-item__price\").val() * 1;
var \$pinpointSaleQtyEl = \$(self).parents(\".ec-cartRow\").find(\".pinpoint_sale_quantity\");
var \$totalEl = \$(self).parents(\".ec-cartRole__cart\").next().next().find(\".ec-cartRole__totalAmount\");
var \$cartTable = \$(self).parents(\".ec-cartTable\");
var \$curRowPriceEl = \$(self).parents(\".ec-cartRow\").find(\".ec-cartRow__sutbtotal\");
var \$curRowPriceSPEl = \$(self).parents(\".ec-cartRow\").find(\".ec-cartRow__sutbtotalSP\");
var \$table = \$(self).parents(\".ec-cartRole__cart\")
var cartKey = \$table.data(\"cart-key\");
var cartLeastUrl = \$table.data(\"url\");
// Reload quantity START
var curQuantity = \$(\$curQuantityEl).text() * 1;
if(action == \"down\") {
curQuantity = curQuantity - 1;
} else if(action == \"up\") {
curQuantity = curQuantity + 1;
} else if(action == \"remove\") {
\$(self).parents(\"ul.ec-cartRow\").remove();
}
if(curQuantity == 1 || curQuantity == stock) {
\$(self).prop(\"disabled\", true);
} else {
\$(self).parents(\".ec-cartRow__amountColumn\").find(\".ec-cartRow__Action\").prop(\"disabled\", false);
}
\$(\$curQuantityEl).text(curQuantity);
\$(\$curQuantitySPEl).text(`\${curQuantity}`);
\$(\$pinpointSaleQtyEl).text(curQuantity);
// Reload quantity END
// Reload total in current row START
\$(\$curRowPriceEl).text(formatCurrency(curQuantity * cartItemPrice));
\$(\$curRowPriceSPEl).text(`小計:\${formatCurrency(curQuantity * cartItemPrice)}`);
// Reload total in current row END
// Reload total in cart START
var totalPrice = 0;
\$cartRows = \$(\$cartTable).find(\".ec-cartRow\");
\$(\$cartRows).each(function(index, el){
var quantity = \$(el).find(\".ec-cartRow__amount\").text() * 1;
var price = \$(el).find(\".cart-item__price\").val() * 1;
totalPrice += quantity * price;
});
\$(\$totalEl).text(`\${formatCurrency(totalPrice)}`)
// Reload total in cart END
// Reload total by all cart START
var totalByCarts = 0;
\$(\".ec-cartRole__cart\").each(function(index, el) {
var \$_cartRows = \$(el).find(\".ec-cartRow\");
\$_cartRows.each(function(indx, rowEl) {
var quantity = \$(rowEl).find(\".ec-cartRow__amount\").text() * 1;
var price = \$(rowEl).find(\".cart-item__price\").val() * 1;
totalByCarts += quantity * price;
});
});
\$(\".ec-cartRole__totalText strong\").text(formatCurrency(totalByCarts));
// Reload total by all cart END
// Update cart block in header START
\$.ajax({
url: '";
// line 98
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
// Update cart block in header END
// update free condition START
\$.ajax({
url: cartLeastUrl,
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$(`#cartRole__progress__\${cartKey}`).html(html);
});
// update free condition END
}).fail(function(error) {
console.log(error);
})
return false;
});
});
</script>
<ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"";
// line 125
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" class=\"breadcrumb__item__link\">
ホーム
</a>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__text\">カート</p>
</li>
</ul>
<div class=\"ec-role\">
<div class=\"ec-pageHeader text-center\">
<h1>";
// line 138
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ショッピングカート"), "html", null, true);
echo "</h1>
</div>
</div>
<div class=\"ec-cartRole\">
<div class=\"ec-cartRole__progress\">
<ul class=\"ec-progress\">
";
// line 145
$context["step"] = 1;
// line 146
echo " <li class=\"ec-progress__item is-complete\">
<div class=\"ec-progress__number\">0";
// line 147
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 147, $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.', 147, $this->source); })()) + 1);
// line 148
echo " </div>
<div class=\"ec-progress__label\">";
// line 149
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートの商品"), "html", null, true);
echo "
</div>
</li>
";
// line 152
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER") == false)) {
// line 153
echo " <li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">0";
// line 154
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 154, $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.', 154, $this->source); })()) + 1);
// line 155
echo " </div>
<div class=\"ec-progress__label\">";
// line 156
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お客様情報"), "html", null, true);
echo "
</div>
</li>
";
}
// line 160
echo " <li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">0";
// line 161
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 161, $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.', 161, $this->source); })()) + 1);
// line 162
echo " </div>
<div class=\"ec-progress__label\">";
// line 163
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\">0";
// line 167
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 167, $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.', 167, $this->source); })()) + 1);
// line 168
echo " </div>
<div class=\"ec-progress__label\">";
// line 169
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\">0";
// line 173
echo twig_escape_filter($this->env, (isset($context["step"]) || array_key_exists("step", $context) ? $context["step"] : (function () { throw new RuntimeError('Variable "step" does not exist.', 173, $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.', 173, $this->source); })()) + 1);
// line 174
echo " </div>
<div class=\"ec-progress__label\">";
// line 175
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("完了"), "html", null, true);
echo "
</div>
</li>
</ul>
</div>
";
// line 180
$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.', 180, $this->source); })()), "session", [], "any", false, false, false, 180), "flashbag", [], "any", false, false, false, 180), "get", [0 => "eccube.front.request.product"], "method", false, false, false, 180);
// line 181
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.', 181, $this->source); })()), "session", [], "any", false, false, false, 181), "flashbag", [], "any", false, false, false, 181), "get", [0 => "eccube.front.request.error"], "method", false, false, false, 181));
$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 182
echo " ";
$context["idx"] = twig_get_attribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 182);
// line 183
echo " <div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"";
// line 185
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 187
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.', 187, $this->source); })()), [], "array", true, true, false, 187)) {
// line 188
echo " ";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["error"], ["%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.', 188, $this->source); })()), (isset($context["idx"]) || array_key_exists("idx", $context) ? $context["idx"] : (function () { throw new RuntimeError('Variable "idx" does not exist.', 188, $this->source); })()), [], "array", false, false, false, 188)]), "html", null, true));
echo "
";
} else {
// line 190
echo " ";
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["error"]), "html", null, true));
echo "
";
}
// line 192
echo " </div>
</div>
</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['_key'], $context['error'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 196
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.', 196, $this->source); })()), "session", [], "any", false, false, false, 196), "flashbag", [], "any", false, false, false, 196), "get", [0 => "eccube.front.cart.error"], "method", false, false, false, 196));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 197
echo " <div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"";
// line 199
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 201
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["error"]), "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 206
echo " ";
if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 206, $this->source); })()) > 0)) {
// line 207
echo " <div class=\"ec-cartRole__totalText\">
<p>
";
// line 209
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品の合計金額は「<strong>%price%</strong>」です。", ["%price%" => $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.', 209, $this->source); })()))]);
echo "
</p>
</div>
";
// line 212
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.', 212, $this->source); })())) > 1)) {
// line 213
echo " <div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__text\">
";
// line 216
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("同時購入できない商品がカートに含まれています。"), "html", null, true));
echo "
</div>
</div>
</div>
";
}
// line 221
echo "
<form name=\"form\" id=\"form_cart\" class=\"ec-cartRole__form\" method=\"post\" action=\"";
// line 222
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">
";
// line 224
$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.', 224, $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 225
echo " ";
$context["cartKey"] = twig_get_attribute($this->env, $this->source, $context["Cart"], "cart_key", [], "any", false, false, false, 225);
// line 226
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.', 226, $this->source); })()), "session", [], "any", false, false, false, 226), "flashbag", [], "any", false, false, false, 226), "get", [0 => (("eccube.front.cart." . (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 226, $this->source); })())) . ".request.error")], "method", false, false, false, 226));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 227
echo " <div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"";
// line 229
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 231
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["error"]), "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 236
echo " <div class=\"ec-cartRole__cart\" data-cart-key=\"";
echo twig_escape_filter($this->env, (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 236, $this->source); })()), "html", null, true);
echo "\" data-url=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart_least", ["cart_key" => (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 236, $this->source); })())]), "html", null, true);
echo "\">
<div class=\"ec-cartTable\">
<ol class=\"ec-cartHeader\">
<li class=\"ec-cartHeader__label\">";
// line 239
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品内容"), "html", null, true);
echo "</li>
<li class=\"ec-cartHeader__label\">";
// line 240
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</li>
<li class=\"ec-cartHeader__label\">";
// line 241
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("小計"), "html", null, true);
echo "</li>
<li class=\"ec-cartHeader__label\">";
// line 242
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("削除"), "html", null, true);
echo "</li>
</ol>
";
// line 244
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Cart"], "CartItems", [], "any", false, false, false, 244));
foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
// line 245
echo " ";
$context["ProductClass"] = twig_get_attribute($this->env, $this->source, $context["CartItem"], "ProductClass", [], "any", false, false, false, 245);
// line 246
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.', 246, $this->source); })()), "Product", [], "any", false, false, false, 246);
// line 247
echo " <ul class=\"ec-cartRow\">
";
// line 248
$context["disabled"] = false;
// line 249
echo " ";
$context["default"] = twig_get_attribute($this->env, $this->source, $context["CartItem"], "quantity", [], "any", false, false, false, 249);
// line 250
echo " ";
if ( !twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 250, $this->source); })()), "isStockDiscontinued", [], "any", false, false, false, 250)) {
// line 251
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
";
} else {
// line 253
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 253, $this->source); })()), "getStockMin", [], "any", false, false, false, 253) <= (isset($context["default"]) || array_key_exists("default", $context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.', 253, $this->source); })()))) {
// line 254
echo " ";
$context["disabled"] = true;
// line 255
echo " ";
}
// line 256
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"";
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.', 256, $this->source); })()), "getStockMin", [], "any", false, false, false, 256), "html", null, true);
echo "\">
";
}
// line 258
echo " <input type=\"hidden\" name=\"cart-item__price\" class=\"cart-item__price\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["CartItem"], "price", [], "any", false, false, false, 258), "html", null, true);
echo "\">
<li class=\"ec-cartRow__contentColumn\">
<div class=\"ec-cartRow__img\">
<a target=\"_blank\" href=\"";
// line 261
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.', 261, $this->source); })()), "id", [], "any", false, false, false, 261)]), "html", null, true);
echo "\">
<img src=\"";
// line 262
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.', 262, $this->source); })()), "MainListImage", [], "any", false, false, false, 262)), "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.', 262, $this->source); })()), "name", [], "any", false, false, false, 262), "html", null, true);
echo "\"/>
</a>
</div>
<div class=\"ec-cartRow__summary\">
<div class=\"ec-cartRow__name\">
<a target=\"_blank\" href=\"";
// line 267
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.', 267, $this->source); })()), "id", [], "any", false, false, false, 267)]), "html", null, true);
echo "\">";
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.', 267, $this->source); })()), "name", [], "any", false, false, false, 267), "html", null, true);
echo "</a>
";
// line 268
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.', 268, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 268) && 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.', 268, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 268), "id", [], "any", false, false, false, 268))) {
// line 269
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.', 269, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 269), "ClassName", [], "any", false, false, false, 269), "name", [], "any", false, false, false, 269), "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.', 269, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 269), "html", null, true);
echo "
";
}
// line 271
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.', 271, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 271) && 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.', 271, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 271), "id", [], "any", false, false, false, 271))) {
// line 272
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.', 272, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 272), "ClassName", [], "any", false, false, false, 272), "name", [], "any", false, false, false, 272), "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.', 272, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 272), "html", null, true);
echo "
";
}
// line 274
echo " </div>
<div class=\"ec-cartRow__unitPrice\">";
// line 275
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, 275)), "html", null, true);
echo "</div>
<div class=\"ec-cartRow__sutbtotalSP\">";
// line 276
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("小計:"), "html", null, true);
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["CartItem"], "total_price", [], "any", false, false, false, 276)), "html", null, true);
echo "</div>
</div>
</li>
<li class=\"ec-cartRow__amountColumn\">
<div class=\"ec-cartRow__amountSP\">";
// line 280
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, 280)), "html", null, true);
echo "</div>
<div class=\"ec-cartRow__amountUpDown\">
<button ";
// line 282
if ((twig_get_attribute($this->env, $this->source, $context["CartItem"], "quantity", [], "any", false, false, false, 282) == 1)) {
echo "disabled";
}
echo " 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.', 282, $this->source); })()), "id", [], "any", false, false, false, 282)]), "html", null, true);
echo "\" ";
echo $this->extensions['Eccube\Twig\Extension\CsrfExtension']->getCsrfTokenForAnchor();
echo " class=\"ec-cartRow__Action ec-cartRow__amountDownButton\" data-action=\"down\" data-confirm=\"false\">
<span class=\"ec-cartRow__amountDownButton__icon\"></span>
</button>
<div class=\"ec-cartRow__amount\">";
// line 285
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, 285)), "html", null, true);
echo "</div>
<button ";
// line 286
if ((isset($context["disabled"]) || array_key_exists("disabled", $context) ? $context["disabled"] : (function () { throw new RuntimeError('Variable "disabled" does not exist.', 286, $this->source); })())) {
echo "disabled";
}
echo " href=\"";
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.', 286, $this->source); })()), "id", [], "any", false, false, false, 286)]), "html", null, true);
echo "\" ";
echo $this->extensions['Eccube\Twig\Extension\CsrfExtension']->getCsrfTokenForAnchor();
echo " class=\"ec-cartRow__Action ec-cartRow__amountUpButton\" data-action=\"up\" data-confirm=\"false\">
<span class=\"ec-cartRow__amountUpButton__icon\"></span>
</button>
</div>
</li>
<li class=\"ec-cartRow__subtotalColumn\">
<div class=\"ec-cartRow__sutbtotal\">";
// line 292
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["CartItem"], "total_price", [], "any", false, false, false, 292)), "html", null, true);
echo "</div>
</li>
<li class=\"ec-cartRow__delColumn\">
<button href=\"";
// line 295
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.', 295, $this->source); })()), "id", [], "any", false, false, false, 295)]), "html", null, true);
echo "\" ";
echo $this->extensions['Eccube\Twig\Extension\CsrfExtension']->getCsrfTokenForAnchor();
echo " class=\"ec-icon ec-cartRow__Action\" data-action=\"remove\" data-message=\"カートから商品を削除してもよろしいですか?\">
<img src=\"";
// line 296
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/cart/close.svg"), "html", null, true);
echo "\" alt=\"delete\">
</button>
</li>
</ul>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 301
echo " </div>
</div>
<div class=\"ec-cartRole__progress\" id=\"cartRole__progress__";
// line 303
echo twig_escape_filter($this->env, (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 303, $this->source); })()), "html", null, true);
echo "\">
";
// line 304
if ((twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 304, $this->source); })()), "delivery_free_amount", [], "any", false, false, false, 304) && twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 304, $this->source); })()), "delivery_free_quantity", [], "any", false, false, false, 304))) {
// line 305
echo " <br/>
";
// line 306
if (twig_get_attribute($this->env, $this->source, (isset($context["is_delivery_free"]) || array_key_exists("is_delivery_free", $context) ? $context["is_delivery_free"] : (function () { throw new RuntimeError('Variable "is_delivery_free" does not exist.', 306, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 306, $this->source); })()), [], "array", false, false, false, 306)) {
// line 307
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在送料無料です。"), "html", null, true);
echo "
";
} else {
// line 309
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("あと「<strong>%price%</strong>」または「<strong>%quantity%個</strong>」のお買い上げで<strong class=\"ec-color-red\">送料無料</strong>になります。", ["%price%" => $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["least"]) || array_key_exists("least", $context) ? $context["least"] : (function () { throw new RuntimeError('Variable "least" does not exist.', 309, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 309, $this->source); })()), [], "array", false, false, false, 309)), "%quantity%" => twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["quantity"]) || array_key_exists("quantity", $context) ? $context["quantity"] : (function () { throw new RuntimeError('Variable "quantity" does not exist.', 309, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 309, $this->source); })()), [], "array", false, false, false, 309))]);
echo "
";
}
// line 311
echo " ";
} elseif (twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 311, $this->source); })()), "delivery_free_amount", [], "any", false, false, false, 311)) {
// line 312
echo " <br/>
";
// line 313
if (twig_get_attribute($this->env, $this->source, (isset($context["is_delivery_free"]) || array_key_exists("is_delivery_free", $context) ? $context["is_delivery_free"] : (function () { throw new RuntimeError('Variable "is_delivery_free" does not exist.', 313, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 313, $this->source); })()), [], "array", false, false, false, 313)) {
// line 314
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在送料無料です。"), "html", null, true);
echo "
";
} else {
// line 316
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("あと「<strong>%price%</strong>」のお買い上げで<strong class=\"ec-color-red\">送料無料</strong>になります。", ["%price%" => $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, (isset($context["least"]) || array_key_exists("least", $context) ? $context["least"] : (function () { throw new RuntimeError('Variable "least" does not exist.', 316, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 316, $this->source); })()), [], "array", false, false, false, 316))]);
echo "
";
}
// line 318
echo " ";
} elseif (twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 318, $this->source); })()), "delivery_free_quantity", [], "any", false, false, false, 318)) {
// line 319
echo " <br/>
";
// line 320
if (twig_get_attribute($this->env, $this->source, (isset($context["is_delivery_free"]) || array_key_exists("is_delivery_free", $context) ? $context["is_delivery_free"] : (function () { throw new RuntimeError('Variable "is_delivery_free" does not exist.', 320, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 320, $this->source); })()), [], "array", false, false, false, 320)) {
// line 321
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在送料無料です。"), "html", null, true);
echo "
";
} else {
// line 323
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("あと「<strong>%quantity%個</strong>」のお買い上げで<strong class=\"ec-color-red\">送料無料</strong>になります。", ["%quantity%" => twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["quantity"]) || array_key_exists("quantity", $context) ? $context["quantity"] : (function () { throw new RuntimeError('Variable "quantity" does not exist.', 323, $this->source); })()), (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 323, $this->source); })()), [], "array", false, false, false, 323))]);
echo "
";
}
// line 325
echo " ";
}
// line 326
echo " </div>
<div class=\"ec-cartRole__actions\">
<div class=\"ec-cartRole__actions__inner\">
<div class=\"ec-cartRole__total\"><span>";
// line 329
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("合計"), "html", null, true);
echo "</span><span class=\"ec-cartRole__totalAmount\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Cart"], "totalPrice", [], "any", false, false, false, 329)), "html", null, true);
echo "</span></div>
<div class=\"ec-cartRole__actions__flex\">
";
// line 331
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 331)) {
// line 332
echo " <a class=\"ec-blockBtn--back\" 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 334
echo " <a class=\"ec-regular__btn\" href=\"";
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.', 334, $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>
</div>
</div>
</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 340
echo " </form>
";
} else {
// line 342
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.', 342, $this->source); })()));
foreach ($context['_seq'] as $context["CartIndex"] => $context["Cart"]) {
// line 343
echo " ";
$context["cartKey"] = twig_get_attribute($this->env, $this->source, $context["Cart"], "cart_key", [], "any", false, false, false, 343);
// line 344
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.', 344, $this->source); })()), "session", [], "any", false, false, false, 344), "flashbag", [], "any", false, false, false, 344), "get", [0 => (("eccube.front.cart." . (isset($context["cartKey"]) || array_key_exists("cartKey", $context) ? $context["cartKey"] : (function () { throw new RuntimeError('Variable "cartKey" does not exist.', 344, $this->source); })())) . ".request.error")], "method", false, false, false, 344));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 345
echo " <div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"";
// line 347
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 349
echo twig_nl2br(twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["error"]), "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 354
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 355
echo " <div class=\"ec-role\">
<div class=\"ec-alert-warning cart-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"";
// line 357
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 358
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在カート内に商品はございません。"), "html", null, true);
echo "</div>
</div>
</div>
";
}
// line 362
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Cart/index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 830 => 362, 823 => 358, 819 => 357, 815 => 355, 809 => 354, 798 => 349, 793 => 347, 789 => 345, 784 => 344, 781 => 343, 776 => 342, 772 => 340, 749 => 334, 741 => 332, 739 => 331, 732 => 329, 727 => 326, 724 => 325, 718 => 323, 712 => 321, 710 => 320, 707 => 319, 704 => 318, 698 => 316, 692 => 314, 690 => 313, 687 => 312, 684 => 311, 678 => 309, 672 => 307, 670 => 306, 667 => 305, 665 => 304, 661 => 303, 657 => 301, 646 => 296, 640 => 295, 634 => 292, 619 => 286, 615 => 285, 603 => 282, 598 => 280, 590 => 276, 586 => 275, 583 => 274, 575 => 272, 572 => 271, 564 => 269, 562 => 268, 556 => 267, 546 => 262, 542 => 261, 535 => 258, 529 => 256, 526 => 255, 523 => 254, 520 => 253, 516 => 251, 513 => 250, 510 => 249, 508 => 248, 505 => 247, 502 => 246, 499 => 245, 495 => 244, 490 => 242, 486 => 241, 482 => 240, 478 => 239, 469 => 236, 458 => 231, 453 => 229, 449 => 227, 444 => 226, 441 => 225, 424 => 224, 419 => 222, 416 => 221, 408 => 216, 403 => 213, 401 => 212, 395 => 209, 391 => 207, 388 => 206, 377 => 201, 372 => 199, 368 => 197, 363 => 196, 346 => 192, 340 => 190, 334 => 188, 332 => 187, 327 => 185, 323 => 183, 320 => 182, 302 => 181, 300 => 180, 292 => 175, 289 => 174, 286 => 173, 279 => 169, 276 => 168, 273 => 167, 266 => 163, 263 => 162, 260 => 161, 257 => 160, 250 => 156, 247 => 155, 244 => 154, 241 => 153, 239 => 152, 233 => 149, 230 => 148, 227 => 147, 224 => 146, 222 => 145, 212 => 138, 196 => 125, 166 => 98, 71 => 5, 61 => 4, 50 => 1, 48 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% set body_class = 'cart_page' %}
{% block main %}
<script>
const formatCurrency = (value) => {
value = value.toLocaleString(\"en\",{
minimumFractionDigits: 0,
maximumFractionDigits: 0,
});
return `¥\${value}`
}
\$(function() {
\$(\".ec-cartRow__Action\").on(\"click\", function(e) {
e.preventDefault();
var href = \$(this).attr(\"href\");
var confirmMessage = \$(this).attr(\"data-message\");
var action = \$(this).attr(\"data-action\");
var self = \$(this);
if(confirmMessage) {
if(!confirm(confirmMessage)) {
return false;
}
}
\$.ajax({
url: href,
type: \"PUT\",
}).done(function(data) {
var \$curQuantityEl = \$(self).parents(\".ec-cartRow__amountColumn\").find(\".ec-cartRow__amount\");
var \$curQuantitySPEl = \$(self).parents(\".ec-cartRow__amountColumn\").find(\".ec-cartRow__amountSP\");
var stock = \$(self).parents(\".ec-cartRow\").find(\".stock\").val() * 1;
var cartItemPrice = \$(self).parents(\".ec-cartRow\").find(\".cart-item__price\").val() * 1;
var \$pinpointSaleQtyEl = \$(self).parents(\".ec-cartRow\").find(\".pinpoint_sale_quantity\");
var \$totalEl = \$(self).parents(\".ec-cartRole__cart\").next().next().find(\".ec-cartRole__totalAmount\");
var \$cartTable = \$(self).parents(\".ec-cartTable\");
var \$curRowPriceEl = \$(self).parents(\".ec-cartRow\").find(\".ec-cartRow__sutbtotal\");
var \$curRowPriceSPEl = \$(self).parents(\".ec-cartRow\").find(\".ec-cartRow__sutbtotalSP\");
var \$table = \$(self).parents(\".ec-cartRole__cart\")
var cartKey = \$table.data(\"cart-key\");
var cartLeastUrl = \$table.data(\"url\");
// Reload quantity START
var curQuantity = \$(\$curQuantityEl).text() * 1;
if(action == \"down\") {
curQuantity = curQuantity - 1;
} else if(action == \"up\") {
curQuantity = curQuantity + 1;
} else if(action == \"remove\") {
\$(self).parents(\"ul.ec-cartRow\").remove();
}
if(curQuantity == 1 || curQuantity == stock) {
\$(self).prop(\"disabled\", true);
} else {
\$(self).parents(\".ec-cartRow__amountColumn\").find(\".ec-cartRow__Action\").prop(\"disabled\", false);
}
\$(\$curQuantityEl).text(curQuantity);
\$(\$curQuantitySPEl).text(`\${curQuantity}`);
\$(\$pinpointSaleQtyEl).text(curQuantity);
// Reload quantity END
// Reload total in current row START
\$(\$curRowPriceEl).text(formatCurrency(curQuantity * cartItemPrice));
\$(\$curRowPriceSPEl).text(`小計:\${formatCurrency(curQuantity * cartItemPrice)}`);
// Reload total in current row END
// Reload total in cart START
var totalPrice = 0;
\$cartRows = \$(\$cartTable).find(\".ec-cartRow\");
\$(\$cartRows).each(function(index, el){
var quantity = \$(el).find(\".ec-cartRow__amount\").text() * 1;
var price = \$(el).find(\".cart-item__price\").val() * 1;
totalPrice += quantity * price;
});
\$(\$totalEl).text(`\${formatCurrency(totalPrice)}`)
// Reload total in cart END
// Reload total by all cart START
var totalByCarts = 0;
\$(\".ec-cartRole__cart\").each(function(index, el) {
var \$_cartRows = \$(el).find(\".ec-cartRow\");
\$_cartRows.each(function(indx, rowEl) {
var quantity = \$(rowEl).find(\".ec-cartRow__amount\").text() * 1;
var price = \$(rowEl).find(\".cart-item__price\").val() * 1;
totalByCarts += quantity * price;
});
});
\$(\".ec-cartRole__totalText strong\").text(formatCurrency(totalByCarts));
// Reload total by all cart END
// Update cart block in header START
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
// Update cart block in header END
// update free condition START
\$.ajax({
url: cartLeastUrl,
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$(`#cartRole__progress__\${cartKey}`).html(html);
});
// update free condition END
}).fail(function(error) {
console.log(error);
})
return false;
});
});
</script>
<ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"{{ url('homepage') }}\" class=\"breadcrumb__item__link\">
ホーム
</a>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__text\">カート</p>
</li>
</ul>
<div class=\"ec-role\">
<div class=\"ec-pageHeader text-center\">
<h1>{{ 'ショッピングカート'|trans }}</h1>
</div>
</div>
<div class=\"ec-cartRole\">
<div class=\"ec-cartRole__progress\">
<ul class=\"ec-progress\">
{% set step = 1 %}
<li class=\"ec-progress__item is-complete\">
<div class=\"ec-progress__number\">0{{ 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\">0{{ 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\">0{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'ご注文手続き'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">0{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ 'ご注文内容確認'|trans }}
</div>
</li>
<li class=\"ec-progress__item\">
<div class=\"ec-progress__number\">0{{ step }}{% set step = step + 1 %}
</div>
<div class=\"ec-progress__label\">{{ '完了'|trans }}
</div>
</li>
</ul>
</div>
{% 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 %}
<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\">
{% if productStr[idx] is defined %}
{{ error|trans({'%product%':productStr[idx]})|nl2br }}
{% else %}
{{ error|trans|nl2br }}
{% endif %}
</div>
</div>
</div>
{% endfor %}
{% for error in app.session.flashbag.get('eccube.front.cart.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 %}
{% if totalQuantity > 0 %}
<div class=\"ec-cartRole__totalText\">
<p>
{{ '商品の合計金額は「<strong>%price%</strong>」です。'|trans({ '%price%': totalPrice|price })|raw }}
</p>
</div>
{% if Carts|length > 1 %}
<div class=\"ec-cartRole__error\">
<div class=\"ec-alert-warning\">
<div class=\"ec-alert-warning__text\">
{{ '同時購入できない商品がカートに含まれています。'|trans|nl2br }}
</div>
</div>
</div>
{% endif %}
<form name=\"form\" id=\"form_cart\" class=\"ec-cartRole__form\" 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') %}
<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 %}
<div class=\"ec-cartRole__cart\" data-cart-key=\"{{cartKey}}\" data-url=\"{{ url('cart_least', {\"cart_key\": cartKey}) }}\">
<div class=\"ec-cartTable\">
<ol class=\"ec-cartHeader\">
<li class=\"ec-cartHeader__label\">{{ '商品内容'|trans }}</li>
<li class=\"ec-cartHeader__label\">{{ '数量'|trans }}</li>
<li class=\"ec-cartHeader__label\">{{ '小計'|trans }}</li>
<li class=\"ec-cartHeader__label\">{{ '削除'|trans }}</li>
</ol>
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<ul class=\"ec-cartRow\">
{% set disabled = false %}
{% set default = CartItem.quantity %}
{% if not Product.isStockDiscontinued %}
<input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
{% else %}
{% if Product.getStockMin <= default %}
{% set disabled = true %}
{% endif %}
<input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"{{Product.getStockMin}}\">
{% endif %}
<input type=\"hidden\" name=\"cart-item__price\" class=\"cart-item__price\" value=\"{{ CartItem.price }}\">
<li class=\"ec-cartRow__contentColumn\">
<div class=\"ec-cartRow__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>
<div class=\"ec-cartRow__summary\">
<div class=\"ec-cartRow__name\">
<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 %}
</div>
<div class=\"ec-cartRow__unitPrice\">{{ CartItem.price|price }}</div>
<div class=\"ec-cartRow__sutbtotalSP\">{{ '小計:'|trans }}{{ CartItem.total_price|price }}</div>
</div>
</li>
<li class=\"ec-cartRow__amountColumn\">
<div class=\"ec-cartRow__amountSP\">{{ CartItem.quantity|number_format }}</div>
<div class=\"ec-cartRow__amountUpDown\">
<button {% if CartItem.quantity == 1 %}disabled{% endif %} href=\"{{ url('cart_handle_item', {'operation': 'down', 'productClassId': ProductClass.id}) }}\" {{ csrf_token_for_anchor() }} class=\"ec-cartRow__Action ec-cartRow__amountDownButton\" data-action=\"down\" data-confirm=\"false\">
<span class=\"ec-cartRow__amountDownButton__icon\"></span>
</button>
<div class=\"ec-cartRow__amount\">{{ CartItem.quantity|number_format }}</div>
<button {% if disabled %}disabled{% endif %} href=\"{{ url('cart_handle_item', {'operation': 'up', 'productClassId': ProductClass.id}) }}\" {{ csrf_token_for_anchor() }} class=\"ec-cartRow__Action ec-cartRow__amountUpButton\" data-action=\"up\" data-confirm=\"false\">
<span class=\"ec-cartRow__amountUpButton__icon\"></span>
</button>
</div>
</li>
<li class=\"ec-cartRow__subtotalColumn\">
<div class=\"ec-cartRow__sutbtotal\">{{ CartItem.total_price|price }}</div>
</li>
<li class=\"ec-cartRow__delColumn\">
<button href=\"{{ url('cart_handle_item', {'operation': 'remove', 'productClassId': ProductClass.id }) }}\" {{ csrf_token_for_anchor() }} class=\"ec-icon ec-cartRow__Action\" data-action=\"remove\" data-message=\"カートから商品を削除してもよろしいですか?\">
<img src=\"{{ asset('assets/img/cart/close.svg') }}\" alt=\"delete\">
</button>
</li>
</ul>
{% endfor %}
</div>
</div>
<div class=\"ec-cartRole__progress\" id=\"cartRole__progress__{{cartKey}}\">
{% if BaseInfo.delivery_free_amount and BaseInfo.delivery_free_quantity %}
<br/>
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「<strong>%price%</strong>」または「<strong>%quantity%個</strong>」のお買い上げで<strong class=\"ec-color-red\">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price, '%quantity%': quantity[cartKey]|number_format })|raw }}
{% endif %}
{% elseif BaseInfo.delivery_free_amount %}
<br/>
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「<strong>%price%</strong>」のお買い上げで<strong class=\"ec-color-red\">送料無料</strong>になります。'|trans({ '%price%': least[cartKey]|price })|raw }}
{% endif %}
{% elseif BaseInfo.delivery_free_quantity %}
<br/>
{% if is_delivery_free[cartKey] %}
{{ '現在送料無料です。'|trans }}
{% else %}
{{ 'あと「<strong>%quantity%個</strong>」のお買い上げで<strong class=\"ec-color-red\">送料無料</strong>になります。'|trans({ '%quantity%': quantity[cartKey]|number_format })|raw }}
{% endif %}
{% endif %}
</div>
<div class=\"ec-cartRole__actions\">
<div class=\"ec-cartRole__actions__inner\">
<div class=\"ec-cartRole__total\"><span>{{ '合計'|trans }}</span><span class=\"ec-cartRole__totalAmount\">{{ Cart.totalPrice|price }}</span></div>
<div class=\"ec-cartRole__actions__flex\">
{% if loop.last %}
<a class=\"ec-blockBtn--back\" href=\"{{ path('homepage') }}\">{{ 'お買い物を続ける'|trans }}</a>
{% endif %}
<a class=\"ec-regular__btn\" href=\"{{ path('cart_buystep', {'cart_key':cartKey}) }}\">{{ 'レジに進む'|trans }}</a>
</div>
</div>
</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 %}
<div class=\"ec-role\">
<div class=\"ec-alert-warning cart-warning\">
<div class=\"ec-alert-warning__icon\"><img src=\"{{ asset('assets/icon/exclamation-white.svg') }}\"></div>
<div class=\"ec-alert-warning__text\">{{ '現在カート内に商品はございません。'|trans }}</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}
", "Cart/index.twig", "/home/bravers/bravers.xbiz.jp/public_html/app/template/bravers/Cart/index.twig");
}
}