<?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_0697cfa45d2867a2faaa555aa26cfa1f extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/cart.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/cart.twig"));
// line 11
$context["Carts"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_all_carts();
// line 12
$context["totalPrice"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_price();
// line 13
$context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
// line 14
echo "<a class=\"cart\" href=\"\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/plot/ico_cart.svg", "user_data"), "html", null, true);
echo "\" alt=\"\"><i class=\"ft_e\">";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, (isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 14, $this->source); })())), "html", null, true);
echo "</i></a>
<div class=\"h_cart\">
";
// line 16
if (((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 16, $this->source); })()) > 0)) {
// line 17
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.', 17, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Cart"]) {
// line 18
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Cart"], "CartItems", [], "any", false, false, false, 18));
foreach ($context['_seq'] as $context["_key"] => $context["CartItem"]) {
// line 19
echo " ";
$context["ProductClass"] = twig_get_attribute($this->env, $this->source, $context["CartItem"], "ProductClass", [], "any", false, false, false, 19);
// line 20
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.', 20, $this->source); })()), "Product", [], "any", false, false, false, 20);
// line 21
echo " <div class=\"row2\">
<figure><img src=\"";
// line 22
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.', 22, $this->source); })()), "MainListImage", [], "any", false, false, false, 22)), "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.', 22, $this->source); })()), "name", [], "any", false, false, false, 22), "html", null, true);
echo "\"></figure>
<div class=\"desc\">
<p class=\"name\">";
// line 24
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.', 24, $this->source); })()), "name", [], "any", false, false, false, 24), "html", null, true);
echo "</p>
";
// line 25
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.', 25, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 25) && 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.', 25, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 25), "id", [], "any", false, false, false, 25))) {
// line 26
echo " <p>";
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.', 26, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 26), "ClassName", [], "any", false, false, false, 26), "name", [], "any", false, false, false, 26), "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.', 26, $this->source); })()), "ClassCategory1", [], "any", false, false, false, 26), "html", null, true);
echo "</p>
";
}
// line 28
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.', 28, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 28) && 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.', 28, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 28), "id", [], "any", false, false, false, 28))) {
// line 29
echo " <p>";
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.', 29, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 29), "ClassName", [], "any", false, false, false, 29), "name", [], "any", false, false, false, 29), "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.', 29, $this->source); })()), "ClassCategory2", [], "any", false, false, false, 29), "html", null, true);
echo "</p>
";
}
// line 31
echo " <p class=\"price\">
";
// line 32
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, 32)), "html", null, true);
echo "<small>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html", null, true);
echo "</small>
</p>
<p>";
// line 34
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["CartItem"], "quantity", [], "any", false, false, false, 34)), "html", null, true);
echo "</p>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CartItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Cart'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 39
echo " <div class=\"action\">
<a href=\"";
// line 40
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
<a href=\"\" class=\"cancel\">";
// line 41
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("キャンセル"), "html", null, true);
echo "</a>
</div>
";
} else {
// line 44
echo " <p class=\"none\">現在カート内に商品はございません。</p>
<div class=\"action\">
<a href=\"\" class=\"cancel\">キャンセル</a>
</div>
";
}
// line 49
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 ( 160 => 49, 153 => 44, 147 => 41, 141 => 40, 138 => 39, 132 => 38, 120 => 34, 113 => 32, 110 => 31, 102 => 29, 99 => 28, 91 => 26, 89 => 25, 85 => 24, 78 => 22, 75 => 21, 72 => 20, 69 => 19, 64 => 18, 59 => 17, 57 => 16, 49 => 14, 47 => 13, 45 => 12, 43 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Carts = get_all_carts() %}
{% set totalPrice = get_carts_total_price() %}
{% set totalQuantity = get_carts_total_quantity() %}
<a class=\"cart\" href=\"\"><img src=\"{{ asset('assets/img/plot/ico_cart.svg', 'user_data') }}\" alt=\"\"><i class=\"ft_e\">{{ totalQuantity|number_format }}</i></a>
<div class=\"h_cart\">
{% if totalQuantity > 0 %}
{% for Cart in Carts %}
{% for CartItem in Cart.CartItems %}
{% set ProductClass = CartItem.ProductClass %}
{% set Product = ProductClass.Product %}
<div class=\"row2\">
<figure><img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\"></figure>
<div class=\"desc\">
<p class=\"name\">{{ Product.name }}</p>
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory1.id %}
<p>{{ ProductClass.ClassCategory1.ClassName.name }}:{{ ProductClass.ClassCategory1 }}</p>
{% endif %}
{% if ProductClass.ClassCategory2 and ProductClass.ClassCategory2.id %}
<p>{{ ProductClass.ClassCategory2.ClassName.name }}:{{ ProductClass.ClassCategory2 }}</p>
{% endif %}
<p class=\"price\">
{{ CartItem.price|price }}<small>{{ '税込'|trans }}</small>
</p>
<p>{{ '数量'|trans }} {{ CartItem.quantity|number_format }}</p>
</div>
</div>
{% endfor %}
{% endfor %}
<div class=\"action\">
<a href=\"{{ url('cart') }}\">{{ 'カートへ進む'|trans }}</a>
<a href=\"\" class=\"cancel\">{{ 'キャンセル'|trans }}</a>
</div>
{% else %}
<p class=\"none\">現在カート内に商品はございません。</p>
<div class=\"action\">
<a href=\"\" class=\"cancel\">キャンセル</a>
</div>
{% endif %}
</div>", "Block/cart.twig", "/home/xs355060/ppplot.com/public_html/props.ppplot.com/app/template/default/Block/cart.twig");
}
}