<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Block/cart.twig */
class __TwigTemplate_0aa8f44d329e224e4b2fe8177eca026d extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/cart.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/cart.twig"));
// line 11
$context["Carts"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_all_carts();
// line 12
$context["totalPrice"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_price();
// line 13
$context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
// line 14
echo "<div class=\"ec-cartNaviWrap\">
\t<div class=\"header-cart\">
\t\t<a href=\"";
// line 16
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">
\t\t\t<div class=\"header-cart-icon\">
\t\t\t\t<img src=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/icon-cart.svg", "user_data"), "html", null, true);
echo "\" alt=\"\">
\t\t\t<span class=\"header-cart-badge\">";
// line 19
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 19, $this->source); })()), 19, $this->source)), "html", null, true);
echo "</span>
\t\t\t</div>
\t\t\t<span class=\"header-item-name\">";
// line 21
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カート"), "html", null, true);
echo "</span>
\t\t\t";
// line 25
echo "\t\t</a>
\t</div>
\t";
// line 27
if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 27, $this->source); })()) > 0)) {
// line 28
echo "\t\t<div class=\"ec-cartNaviIsset\">
\t\t\t";
// line 29
$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.', 29, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Cart"]) {
// line 30
echo "\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Cart"], "CartItems", [], "any", false, false, true, 30));
foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
// line 31
echo "\t\t\t\t\t";
$context["ProductClass"] = twig_get_attribute($this->env, $this->source, $context["CartItem"], "ProductClass", [], "any", false, false, true, 31);
// line 32
echo "\t\t\t\t\t";
$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.', 32, $this->source); })()), "Product", [], "any", false, false, true, 32);
// line 33
echo "\t\t\t\t\t<div class=\"ec-cartNaviIsset__cart\">
\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartImage\">
\t\t\t\t\t\t\t<img src=\"";
// line 35
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.', 35, $this->source); })()), "MainListImage", [], "any", false, false, true, 35), 35, $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.', 35, $this->source); })()), "name", [], "any", false, false, true, 35), 35, $this->source), "html", null, true);
echo "\">
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContent\">
\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentTitle\">";
// line 38
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.', 38, $this->source); })()), "name", [], "any", false, false, true, 38), 38, $this->source), "html", null, true);
echo "
\t\t\t\t\t\t\t\t<div class=\"ec-font-size-1\">
\t\t\t\t\t\t\t\t\t";
// line 40
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.', 40, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 40) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 40, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 40), "id", [], "any", false, false, true, 40))) {
// line 41
echo "\t\t\t\t\t\t\t\t\t\t";
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.', 41, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 41), "ClassName", [], "any", false, false, true, 41), "name", [], "any", false, false, true, 41), 41, $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.', 41, $this->source); })()), "ClassCategory1", [], "any", false, false, true, 41), 41, $this->source), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t";
}
// line 43
echo "\t\t\t\t\t\t\t\t\t";
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.', 43, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 43) && 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.', 43, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 43), "id", [], "any", false, false, true, 43))) {
// line 44
echo "\t\t\t\t\t\t\t\t\t\t<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.', 44, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 44), "ClassName", [], "any", false, false, true, 44), "name", [], "any", false, false, true, 44), 44, $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.', 44, $this->source); })()), "ClassCategory2", [], "any", false, false, true, 44), 44, $this->source), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t";
}
// line 46
echo "\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentPrice\">
\t\t\t\t\t\t\t\t";
// line 49
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, 49), 49, $this->source)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentTax\">";
// line 50
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentNumber\">";
// line 52
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "
\t\t\t\t\t\t\t\t";
// line 53
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, 53), 53, $this->source)), "html", null, true);
echo "</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 57
echo "\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Cart'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 58
echo "\t\t\t<div class=\"ec-cartNaviIsset__action\">
\t\t\t\t<a class=\"ec-blockBtn--action\" href=\"";
// line 59
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
\t\t\t\t<a class=\"ec-blockBtn ec-cartNavi--cancel\">";
// line 60
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("キャンセル"), "html", null, true);
echo "</a>
\t\t\t</div>
\t\t</div>
\t";
} else {
// line 64
echo "\t\t<div class=\"ec-cartNaviNull\">
\t\t\t<div class=\"ec-cartNaviNull__message\">
\t\t\t\t<p>";
// line 66
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("現在カート内に商品はございません。"), "html", null, true);
echo "</p>
\t\t\t</div>
\t\t</div>
\t";
}
// line 70
echo "</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/cart.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 196 => 70, 189 => 66, 185 => 64, 178 => 60, 172 => 59, 169 => 58, 163 => 57, 153 => 53, 149 => 52, 144 => 50, 140 => 49, 135 => 46, 127 => 44, 124 => 43, 116 => 41, 114 => 40, 109 => 38, 101 => 35, 97 => 33, 94 => 32, 91 => 31, 86 => 30, 82 => 29, 79 => 28, 77 => 27, 73 => 25, 69 => 21, 64 => 19, 60 => 18, 55 => 16, 51 => 14, 49 => 13, 47 => 12, 45 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Carts = get_all_carts() %}
{% set totalPrice = get_carts_total_price() %}
{% set totalQuantity = get_carts_total_quantity() %}
<div class=\"ec-cartNaviWrap\">
\t<div class=\"header-cart\">
\t\t<a href=\"{{ url('cart') }}\">
\t\t\t<div class=\"header-cart-icon\">
\t\t\t\t<img src=\"{{ asset('assets/img/common/icon-cart.svg', 'user_data') }}\" alt=\"\">
\t\t\t<span class=\"header-cart-badge\">{{ totalQuantity|number_format }}</span>
\t\t\t</div>
\t\t\t<span class=\"header-item-name\">{{ 'カート'|trans }}</span>
\t\t\t{# <div class=\"ec-cartNavi__label\">
\t\t\t\t\t<div class=\"ec-cartNavi__price\">{{ totalPrice|price }}</div>
\t\t\t\t</div> #}
\t\t</a>
\t</div>
\t{% if totalQuantity > 0 %}
\t\t<div class=\"ec-cartNaviIsset\">
\t\t\t{% for Cart in Carts %}
\t\t\t\t{% for CartItem in Cart.CartItems %}
\t\t\t\t\t{% set ProductClass = CartItem.ProductClass %}
\t\t\t\t\t{% set Product = ProductClass.Product %}
\t\t\t\t\t<div class=\"ec-cartNaviIsset__cart\">
\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartImage\">
\t\t\t\t\t\t\t<img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\">
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContent\">
\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentTitle\">{{ Product.name }}
\t\t\t\t\t\t\t\t<div class=\"ec-font-size-1\">
\t\t\t\t\t\t\t\t\t{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
\t\t\t\t\t\t\t\t\t\t{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
\t\t\t\t\t\t\t\t\t\t<br>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentPrice\">
\t\t\t\t\t\t\t\t{{ CartItem.price|price }}
\t\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentTax\">{{ '税込'|trans }}</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"ec-cartNaviIsset__cartContentNumber\">{{ '数量'|trans }}
\t\t\t\t\t\t\t\t{{ CartItem.quantity|number_format }}</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t{% endfor %}
\t\t\t{% endfor %}
\t\t\t<div class=\"ec-cartNaviIsset__action\">
\t\t\t\t<a class=\"ec-blockBtn--action\" href=\"{{ url('cart') }}\">{{ 'カートへ進む'|trans }}</a>
\t\t\t\t<a class=\"ec-blockBtn ec-cartNavi--cancel\">{{ 'キャンセル'|trans }}</a>
\t\t\t</div>
\t\t</div>
\t{% else %}
\t\t<div class=\"ec-cartNaviNull\">
\t\t\t<div class=\"ec-cartNaviNull__message\">
\t\t\t\t<p>{{ '現在カート内に商品はございません。'|trans }}</p>
\t\t\t</div>
\t\t</div>
\t{% endif %}
</div>
", "Block/cart.twig", "/home/hirota-s.com/public_html/app/template/default/Block/cart.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 11, "if" => 27, "for" => 29);
static $filters = array("escape" => 18, "number_format" => 19, "trans" => 21, "no_image_product" => 35, "price" => 49);
static $functions = array("get_all_carts" => 11, "get_carts_total_price" => 12, "get_carts_total_quantity" => 13, "url" => 16, "asset" => 18);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['escape', 'number_format', 'trans', 'no_image_product', 'price'],
['get_all_carts', 'get_carts_total_price', 'get_carts_total_quantity', 'url', 'asset']
);
} 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;
}
}
}