<?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;
/* Product/list.twig */
class __TwigTemplate_9c25f3311b3a8f93fa80076ef0ead66b extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
// line 13
$context["body_class"] = "product_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/list.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 15
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 16
echo " <script>
eccube.productsClassCategories = {
";
// line 18
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 18, $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["_key"] => $context["Product"]) {
// line 19
echo " \"";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 19), 19, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 19, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 19) == false)) {
echo ", ";
}
// line 20
echo " ";
++$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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " };
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('";
// line 47
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '";
// line 75
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('";
// line 82
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
<script >
\$('img.check').on('error', function() {
console.log(\"画像が読み込まれませんでした\");
\$(this).addClass('d-none');
});
</script>
<script>
function getParam(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\\[\\]]/g, \"\\\\\$&\");
var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|\$)\"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\\+/g, \" \"));
}
\$(function() {
var search_category = '<div class=\"ec-headerSearch__category d-none\">';
search_category += '<div class=\"ec-select ec-select_search\">';
search_category += '<select name=\"category_id\" class=\"category_id\">';
search_category += '<option value=\"\">全ての商品</option>';
if(getParam('category_id')) {
if(getParam('category_id') == 1) {
search_category += '<option value=\"1\" selected=\"selected\">Marriage ring 結婚指輪</option>';
search_category += '<option value=\"2\">Engagement ring 婚約指輪</option>';
} else if(getParam('category_id') == 2) {
search_category += '<option value=\"1\">Marriage ring 結婚指輪</option>';
search_category += '<option value=\"2\" selected=\"selected\">Engagement ring 婚約指輪</option>';
}
}
search_category += '</select></div></div>';
\$('.ec-layoutRole__main .ec-headerSearch__keyword').before(search_category);
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 134
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 135
echo " ";
if ((twig_length_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["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 135, $this->source); })()), "category_id", [], "any", false, false, true, 135), "vars", [], "any", false, false, true, 135), "errors", [], "any", false, false, true, 135)) > 0)) {
// line 136
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 137
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 140
echo " ";
// line 141
echo " ";
if (( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 141, $this->source); })())) && (null === 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.', 141, $this->source); })()), "request", [], "any", false, false, true, 141), "query", [], "any", false, false, true, 141), "get", [0 => "name"], "method", false, false, true, 141)))) {
// line 142
echo " <div class=\"ec-role\">
<div class=\"ec-pageHeader text-center\">
<h1 class=\"border-bottom-0 fw-normal d-inline-block\">";
// line 144
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 144, $this->source); })()), "name", [], "any", false, false, true, 144), 144, $this->source), "html", null, true);
echo "</h1>
</div>
</div>
";
}
// line 148
echo "
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 151
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 151, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 152
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 152), "id", [], "any", false, false, true, 152), 152, $this->source), "html", null, true);
echo "\"
name=\"";
// line 153
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 153), "full_name", [], "any", false, false, true, 153), 153, $this->source), "html", null, true);
echo "\"
";
// line 154
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 154), "value", [], "any", false, false, true, 154))) {
echo "value=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 154), "value", [], "any", false, false, true, 154), 154, $this->source), "html", null, true);
echo "\" ";
}
echo "/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 156
echo " </form>
<div class=\"ec-headerNaviRole__search\">
";
// line 158
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
echo "
</div>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 162
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html", null, true);
echo "</a>
</li>
";
// line 164
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 164, $this->source); })()))) {
// line 165
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 165, $this->source); })()), "path", [], "any", false, false, true, 165));
$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["Path"]) {
// line 166
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item";
// line 167
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 167)) {
echo "--active";
}
echo "\"><a
href=\"";
// line 168
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 168), 168, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, true, 168), 168, $this->source), "html", null, true);
echo "</a>
</li>
";
++$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['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 171
echo " ";
}
// line 172
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 172, $this->source); })()), "vars", [], "any", false, false, true, 172), "value", [], "any", false, false, true, 172) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 172, $this->source); })()), "vars", [], "any", false, false, true, 172), "value", [], "any", false, false, true, 172), "name", [], "any", false, false, true, 172))) {
// line 173
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">";
// line 174
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」の検索結果", ["%name%" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 174, $this->source); })()), "vars", [], "any", false, false, true, 174), "value", [], "any", false, false, true, 174), "name", [], "any", false, false, true, 174)]), "html", null, true);
echo "</li>
";
}
// line 176
echo " </ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 180
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 180, $this->source); })()), "totalItemCount", [], "any", false, false, true, 180) > 0)) {
// line 181
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>", ["%count%" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 181, $this->source); })()), "totalItemCount", [], "any", false, false, true, 181)]);
echo "
";
} else {
// line 183
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 185
echo " </div>
";
// line 186
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 186, $this->source); })()), "totalItemCount", [], "any", false, false, true, 186) > 0)) {
// line 187
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 189
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 189, $this->source); })()), "disp_number", [], "any", false, false, true, 189), 189, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 190
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 190, $this->source); })()), "orderby", [], "any", false, false, true, 190), 190, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 194
echo " </div>
</div>
";
// line 196
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 196, $this->source); })()), "totalItemCount", [], "any", false, false, true, 196) > 0)) {
// line 197
echo " <div class=\"ec-shelfRole\">
<ul class=\"row flex-wrap ps-0\">
";
// line 200
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 200, $this->source); })()), "paginationData", [], "any", false, false, true, 200), "current", [], "any", false, false, true, 200) == 1)) {
// line 201
echo " ";
$context["banner_index"] = 0;
// line 202
echo " ";
} else {
// line 203
echo " ";
// line 204
echo " ";
$context["banner_per_page"] = twig_round((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 204, $this->source); })()), "paginationData", [], "any", false, false, true, 204), "numItemsPerPage", [], "any", false, false, true, 204) / 8), 0, "floor");
// line 205
echo " ";
// line 206
echo " ";
$context["banner_displayed"] = ((isset($context["banner_per_page"]) || array_key_exists("banner_per_page", $context) ? $context["banner_per_page"] : (function () { throw new RuntimeError('Variable "banner_per_page" does not exist.', 206, $this->source); })()) * twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 206, $this->source); })()), "paginationData", [], "any", false, false, true, 206), "previous", [], "any", false, false, true, 206));
// line 207
echo " ";
if (((isset($context["banner_displayed"]) || array_key_exists("banner_displayed", $context) ? $context["banner_displayed"] : (function () { throw new RuntimeError('Variable "banner_displayed" does not exist.', 207, $this->source); })()) < twig_length_filter($this->env, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 207, $this->source); })())))) {
// line 208
echo " ";
$context["banner_index"] = (isset($context["banner_displayed"]) || array_key_exists("banner_displayed", $context) ? $context["banner_displayed"] : (function () { throw new RuntimeError('Variable "banner_displayed" does not exist.', 208, $this->source); })());
// line 209
echo " ";
} elseif (((isset($context["banner_displayed"]) || array_key_exists("banner_displayed", $context) ? $context["banner_displayed"] : (function () { throw new RuntimeError('Variable "banner_displayed" does not exist.', 209, $this->source); })()) == twig_length_filter($this->env, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 209, $this->source); })())))) {
// line 210
echo " ";
$context["banner_index"] = 0;
// line 211
echo " ";
} else {
// line 212
echo " ";
$context["banner_index"] = ((isset($context["banner_displayed"]) || array_key_exists("banner_displayed", $context) ? $context["banner_displayed"] : (function () { throw new RuntimeError('Variable "banner_displayed" does not exist.', 212, $this->source); })()) % twig_length_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 212, $this->source); })()), 212, $this->source)));
// line 213
echo " ";
}
// line 214
echo " ";
}
// line 215
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 215, $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["_key"] => $context["Product"]) {
// line 216
echo " <li class=\"col-6 col-md-3 mb-3\">
<a href=\"";
// line 217
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 217)]), "html", null, true);
echo "\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 219
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, $context["Product"], "main_list_image", [], "any", false, false, true, 219), 219, $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, $context["Product"], "name", [], "any", false, false, true, 219), 219, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 219) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
</p>
<p>";
// line 221
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 221), 221, $this->source), "html", null, true);
echo "</p>
";
// line 225
echo " <p class=\"price02-default\">
";
// line 226
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 226)) {
// line 227
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 227) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 227))) {
// line 228
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 228), 228, $this->source)), "html", null, true);
echo "
";
} else {
// line 230
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 230), 230, $this->source)), "html", null, true);
echo " ~ ";
// line 231
echo " ";
}
// line 232
echo " ";
} else {
// line 233
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 233), 233, $this->source)), "html", null, true);
echo "
";
}
// line 235
echo " </p>
</a>
";
// line 239
echo " </li>
";
// line 240
if (((null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 240, $this->source); })())) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 240, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 240, $this->source); })()), "id", [], "any", false, false, true, 240) != 3)))) {
// line 241
echo " ";
if ((((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 241) % 8) == 0) && (twig_length_filter($this->env, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 241, $this->source); })())) <= (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 241, $this->source); })())))) {
// line 242
echo " ";
$context["banner_index"] = 0;
echo " ";
// line 243
echo " ";
}
// line 244
echo " ";
if ((((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 244) % 8) == 0) && (twig_length_filter($this->env, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 244, $this->source); })())) > (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 244, $this->source); })())))) {
// line 245
echo " ";
if (( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 245, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 245, $this->source); })()), "id", [], "any", false, false, true, 245) == 2))) {
// line 246
echo " ";
// line 247
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 247, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 247, $this->source); })()), [], "array", false, false, true, 247), "id", [], "any", false, false, true, 247) == 11)) {
// line 248
echo " ";
$context["banner_index"] = ((isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 248, $this->source); })()) + 1);
// line 249
echo " ";
}
// line 250
echo " ";
}
// line 251
echo " <li class=\"col-12 col-md-6 added_banner list-unstyled mb-4\">
";
// line 252
$context["style"] = "";
// line 253
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 253, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 253, $this->source); })()), [], "array", false, false, true, 253), "link_url", [], "any", false, false, true, 253)) {
// line 254
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 254, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 254, $this->source); })()), [], "array", false, false, true, 254), "link_url", [], "any", false, false, true, 254), 254, $this->source), "html", null, true);
echo "\" target=\"_blank\" rel=\"noopener\" class=\"d-flex flex-column justify-content-center h-100\" ";
(((isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 254, $this->source); })())) ? (print (twig_escape_filter($this->env, (isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 254, $this->source); })()), "html", null, true))) : (print ("")));
echo ">
";
} else {
// line 256
echo " <div class=\"d-flex flex-column h-100\" ";
(((isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 256, $this->source); })())) ? (print (twig_escape_filter($this->env, (isset($context["style"]) || array_key_exists("style", $context) ? $context["style"] : (function () { throw new RuntimeError('Variable "style" does not exist.', 256, $this->source); })()), "html", null, true))) : (print ("")));
echo ">
";
}
// line 258
echo " ";
// line 259
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 259, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 259, $this->source); })()), [], "array", false, false, true, 259), "bg_image", [], "any", false, false, true, 259)) {
// line 260
echo " ";
$context["filename"] = twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 260, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 260, $this->source); })()), [], "array", false, false, true, 260), "bg_image", [], "any", false, false, true, 260), 260, $this->source), "/");
// line 261
echo " <img src=\"";
echo twig_escape_filter($this->env, (($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("addbanner", "save_image") . "/") . twig_last($this->env, $this->sandbox->ensureToStringAllowed((isset($context["filename"]) || array_key_exists("filename", $context) ? $context["filename"] : (function () { throw new RuntimeError('Variable "filename" does not exist.', 261, $this->source); })()), 261, $this->source))), "html", null, true);
echo "\">
";
}
// line 263
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 263, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 263, $this->source); })()), [], "array", false, false, true, 263), "description", [], "any", false, false, true, 263)) {
// line 264
echo " <div class=\"add_banner_desc p-2\">";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 264, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 264, $this->source); })()), [], "array", false, false, true, 264), "description", [], "any", false, false, true, 264), 264, $this->source));
echo "</div>
";
}
// line 266
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 266, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 266, $this->source); })()), [], "array", false, false, true, 266), "link_url", [], "any", false, false, true, 266)) {
// line 267
echo " </a>
";
} else {
// line 269
echo " </div>
";
}
// line 271
echo " </li>
";
// line 272
$context["banner_index"] = ((isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 272, $this->source); })()) + 1);
// line 273
echo " ";
}
// line 274
echo " ";
}
// line 275
echo " ";
++$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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 276
echo "
";
// line 278
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 278, $this->source); })()), "paginationData", [], "any", false, false, true, 278), "endPage", [], "any", false, false, true, 278) == twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 278, $this->source); })()), "paginationData", [], "any", false, false, true, 278), "current", [], "any", false, false, true, 278))) {
// line 279
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 279, $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["_key"] => $context["AddBanner"]) {
// line 280
echo " ";
if ((((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 280, $this->source); })()), "totalItemCount", [], "any", false, false, true, 280) % 8) < twig_length_filter($this->env, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 280, $this->source); })()))) && ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 280) == (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 280, $this->source); })())) && (twig_length_filter($this->env, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 280, $this->source); })())) > (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 280, $this->source); })()))))) {
// line 281
echo " <li class=\"col-12 col-md-6 added_banner list-unstyled mb-4\">
";
// line 282
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 282, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 282, $this->source); })()), [], "array", false, false, true, 282), "link_url", [], "any", false, false, true, 282)) {
// line 283
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 283, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 283, $this->source); })()), [], "array", false, false, true, 283), "link_url", [], "any", false, false, true, 283), 283, $this->source), "html", null, true);
echo "\" target=\"_blank\" rel=\"noopener\" class=\"d-flex flex-column h-100\">
";
} else {
// line 285
echo " <div class=\"d-flex flex-column h-100\">
";
}
// line 287
echo " ";
// line 288
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 288, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 288, $this->source); })()), [], "array", false, false, true, 288), "bg_image", [], "any", false, false, true, 288)) {
// line 289
echo " ";
$context["filename"] = twig_split_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 289, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 289, $this->source); })()), [], "array", false, false, true, 289), "bg_image", [], "any", false, false, true, 289), 289, $this->source), "/");
// line 290
echo " <img src=\"";
echo twig_escape_filter($this->env, (($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("addbanner", "save_image") . "/") . twig_last($this->env, $this->sandbox->ensureToStringAllowed((isset($context["filename"]) || array_key_exists("filename", $context) ? $context["filename"] : (function () { throw new RuntimeError('Variable "filename" does not exist.', 290, $this->source); })()), 290, $this->source))), "html", null, true);
echo "\">
";
}
// line 292
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 292, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 292, $this->source); })()), [], "array", false, false, true, 292), "description", [], "any", false, false, true, 292)) {
// line 293
echo " <div class=\"add_banner_desc p-2\">";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 293, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 293, $this->source); })()), [], "array", false, false, true, 293), "description", [], "any", false, false, true, 293), 293, $this->source));
echo "</div>
";
}
// line 295
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["AddBanners"]) || array_key_exists("AddBanners", $context) ? $context["AddBanners"] : (function () { throw new RuntimeError('Variable "AddBanners" does not exist.', 295, $this->source); })()), (isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 295, $this->source); })()), [], "array", false, false, true, 295), "link_url", [], "any", false, false, true, 295)) {
// line 296
echo " </a>
";
} else {
// line 298
echo " </div>
";
}
// line 300
echo " </li>
";
// line 301
$context["banner_index"] = ((isset($context["banner_index"]) || array_key_exists("banner_index", $context) ? $context["banner_index"] : (function () { throw new RuntimeError('Variable "banner_index" does not exist.', 301, $this->source); })()) + 1);
// line 302
echo " ";
}
// line 303
echo " ";
++$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['AddBanner'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 304
echo " ";
}
// line 305
echo " </ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
// line 310
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html", null, true);
echo "\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 311
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 314
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 315
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
";
// line 322
$this->loadTemplate("pager.twig", "Product/list.twig", 322)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 322, $this->source); })()), "paginationData", [], "any", false, false, true, 322)]));
// line 323
echo " </div>
";
}
// line 325
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Product/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 822 => 325, 818 => 323, 816 => 322, 804 => 315, 800 => 314, 794 => 311, 790 => 310, 783 => 305, 780 => 304, 766 => 303, 763 => 302, 761 => 301, 758 => 300, 754 => 298, 750 => 296, 747 => 295, 741 => 293, 738 => 292, 732 => 290, 729 => 289, 726 => 288, 724 => 287, 720 => 285, 714 => 283, 712 => 282, 709 => 281, 706 => 280, 688 => 279, 685 => 278, 682 => 276, 668 => 275, 665 => 274, 662 => 273, 660 => 272, 657 => 271, 653 => 269, 649 => 267, 646 => 266, 640 => 264, 637 => 263, 631 => 261, 628 => 260, 625 => 259, 623 => 258, 617 => 256, 609 => 254, 606 => 253, 604 => 252, 601 => 251, 598 => 250, 595 => 249, 592 => 248, 589 => 247, 587 => 246, 584 => 245, 581 => 244, 578 => 243, 574 => 242, 571 => 241, 569 => 240, 566 => 239, 561 => 235, 555 => 233, 552 => 232, 549 => 231, 545 => 230, 539 => 228, 536 => 227, 534 => 226, 531 => 225, 527 => 221, 516 => 219, 511 => 217, 508 => 216, 490 => 215, 487 => 214, 484 => 213, 481 => 212, 478 => 211, 475 => 210, 472 => 209, 469 => 208, 466 => 207, 463 => 206, 461 => 205, 458 => 204, 456 => 203, 453 => 202, 450 => 201, 447 => 200, 443 => 197, 441 => 196, 437 => 194, 430 => 190, 426 => 189, 422 => 187, 420 => 186, 417 => 185, 411 => 183, 405 => 181, 403 => 180, 397 => 176, 392 => 174, 389 => 173, 386 => 172, 383 => 171, 362 => 168, 356 => 167, 353 => 166, 335 => 165, 333 => 164, 326 => 162, 319 => 158, 315 => 156, 303 => 154, 299 => 153, 294 => 152, 290 => 151, 285 => 148, 278 => 144, 274 => 142, 271 => 141, 269 => 140, 263 => 137, 260 => 136, 257 => 135, 247 => 134, 186 => 82, 176 => 75, 145 => 47, 117 => 21, 103 => 20, 95 => 19, 78 => 18, 74 => 16, 64 => 15, 53 => 11, 51 => 13, 38 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block javascript %}
<script>
eccube.productsClassCategories = {
{% for Product in pagination %}
\"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
{% endfor %}
};
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
<script >
\$('img.check').on('error', function() {
console.log(\"画像が読み込まれませんでした\");
\$(this).addClass('d-none');
});
</script>
<script>
function getParam(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\\[\\]]/g, \"\\\\\$&\");
var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|\$)\"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\\+/g, \" \"));
}
\$(function() {
var search_category = '<div class=\"ec-headerSearch__category d-none\">';
search_category += '<div class=\"ec-select ec-select_search\">';
search_category += '<select name=\"category_id\" class=\"category_id\">';
search_category += '<option value=\"\">全ての商品</option>';
if(getParam('category_id')) {
if(getParam('category_id') == 1) {
search_category += '<option value=\"1\" selected=\"selected\">Marriage ring 結婚指輪</option>';
search_category += '<option value=\"2\">Engagement ring 婚約指輪</option>';
} else if(getParam('category_id') == 2) {
search_category += '<option value=\"1\">Marriage ring 結婚指輪</option>';
search_category += '<option value=\"2\" selected=\"selected\">Engagement ring 婚約指輪</option>';
}
}
search_category += '</select></div></div>';
\$('.ec-layoutRole__main .ec-headerSearch__keyword').before(search_category);
});
</script>
{% endblock %}
{% block main %}
{% if search_form.category_id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
{# カテゴリページかつ検索欄にキーワードをいれていない場合 #}
{% if Category is not null and app.request.query.get('name') is null %}
<div class=\"ec-role\">
<div class=\"ec-pageHeader text-center\">
<h1 class=\"border-bottom-0 fw-normal d-inline-block\">{{ Category.name }}</h1>
</div>
</div>
{% endif %}
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
{% for item in search_form %}
<input type=\"hidden\" id=\"{{ item.vars.id }}\"
name=\"{{ item.vars.full_name }}\"
{% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
{% endfor %}
</form>
<div class=\"ec-headerNaviRole__search\">
{{ render(path('block_search_product')) }}
</div>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
</li>
{% if Category is not null %}
{% for Path in Category.path %}
<li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
</li>
{% endfor %}
{% endif %}
{% if search_form.vars.value and search_form.vars.value.name %}
<li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
{% endif %}
</ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
{% if pagination.totalItemCount > 0 %}
{{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
</div>
{% endif %}
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\">
<ul class=\"row flex-wrap ps-0\">
{# バナー表示用インデックス #}
{% if pagination.paginationData.current == 1 %}
{% set banner_index = 0 %}
{% else %}
{# 1ページあたりのバナー表示数 #}
{% set banner_per_page = (pagination.paginationData.numItemsPerPage / 8)|round(0, 'floor') %}
{# 既に何個のバナーを表示したか #}
{% set banner_displayed = banner_per_page * pagination.paginationData.previous %}
{% if banner_displayed < AddBanners|length %}
{% set banner_index = banner_displayed %}
{% elseif banner_displayed == AddBanners|length %}
{% set banner_index = 0 %}
{% else %}
{% set banner_index = (banner_displayed % AddBanners|length) %}
{% endif %}
{% endif %}
{% for Product in pagination %}
<li class=\"col-6 col-md-3 mb-3\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
</p>
<p>{{ Product.name }}</p>
{#{% if Product.description_list %}
<p>{{ Product.description_list|raw|nl2br }}</p>
{% endif %}#}
<p class=\"price02-default\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {#{{ Product.getPrice02IncTaxMax|price }}#}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
</p>
</a>
{# ここにあったカートボタンは削除 #}
</li>
{% if Category is null or (Category is not null and Category.id != 3) %}{# アニバーサリージュエリー以外の場合バナーを表示 #}
{% if loop.index % 8 == 0 and AddBanners|length <= banner_index %}{# バナーが少ない場合 #}
{% set banner_index = 0 %} {# もう一度最初から表示する #}
{% endif %}
{% if loop.index % 8 == 0 and AddBanners|length > banner_index %}{# 8商品ごとにバナーを表示 #}
{% if Category is not null and Category.id == 2 %}
{# 婚約指輪の場合はid11のバナーは表示しない #}
{% if AddBanners[banner_index].id == 11 %}
{% set banner_index = banner_index + 1 %}
{% endif %}
{% endif %}
<li class=\"col-12 col-md-6 added_banner list-unstyled mb-4\">
{% set style = \"\" %}
{% if AddBanners[banner_index].link_url %}
<a href=\"{{ AddBanners[banner_index].link_url }}\" target=\"_blank\" rel=\"noopener\" class=\"d-flex flex-column justify-content-center h-100\" {{ style ? style : \"\" }}>
{% else %}
<div class=\"d-flex flex-column h-100\" {{ style ? style : \"\" }}>
{% endif %}
{#<h5>{{ AddBanners[banner_index].name }}</h5>#}{# 画像だけの場合もあるだろうから必須項目の「名称」は表示しない #}
{% if AddBanners[banner_index].bg_image %}
{% set filename = AddBanners[banner_index].bg_image|split('/') %}
<img src=\"{{ asset('addbanner' ,'save_image') ~ \"/\" ~ filename|last }}\">
{% endif %}
{% if AddBanners[banner_index].description %}
<div class=\"add_banner_desc p-2\">{{ AddBanners[banner_index].description|raw|nl2br }}</div>
{% endif %}
{% if AddBanners[banner_index].link_url %}
</a>
{% else %}
</div>
{% endif %}
</li>
{% set banner_index = banner_index + 1 %}
{% endif %}
{% endif %}
{% endfor %}
{# 最終ページでバナーが多かった場合、残りのバナーを表示する #}
{% if pagination.paginationData.endPage == pagination.paginationData.current %}
{% for AddBanner in AddBanners %}
{% if (pagination.totalItemCount % 8 < AddBanners|length) and (loop.index == banner_index and AddBanners|length > banner_index) %}
<li class=\"col-12 col-md-6 added_banner list-unstyled mb-4\">
{% if AddBanners[banner_index].link_url %}
<a href=\"{{ AddBanners[banner_index].link_url }}\" target=\"_blank\" rel=\"noopener\" class=\"d-flex flex-column h-100\">
{% else %}
<div class=\"d-flex flex-column h-100\">
{% endif %}
{#<h5>{{ AddBanners[banner_index].name }}</h5>#}{# 画像だけの場合もあるだろうから必須項目の「名称」は表示しない #}
{% if AddBanners[banner_index].bg_image %}
{% set filename = AddBanners[banner_index].bg_image|split('/') %}
<img src=\"{{ asset('addbanner' ,'save_image') ~ \"/\" ~ filename|last }}\">
{% endif %}
{% if AddBanners[banner_index].description %}
<div class=\"add_banner_desc p-2\">{{ AddBanners[banner_index].description|raw|nl2br }}</div>
{% endif %}
{% if AddBanners[banner_index].link_url %}
</a>
{% else %}
</div>
{% endif %}
</li>
{% set banner_index = banner_index + 1 %}
{% endif %}
{% endfor %}
{% endif %}
</ul>
</div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}", "Product/list.twig", "/home/apteq5/apteq5x.com/public_html/tanzoec/app/template/tanzo/Product/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "for" => 18, "if" => 19, "include" => 322);
static $filters = array("escape" => 19, "raw" => 19, "trans" => 47, "length" => 135, "round" => 204, "no_image_product" => 219, "price" => 228, "split" => 260, "last" => 261, "nl2br" => 264);
static $functions = array("class_categories_as_json" => 19, "url" => 75, "render" => 158, "path" => 158, "form_widget" => 189, "asset" => 219);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'round', 'no_image_product', 'price', 'split', 'last', 'nl2br'],
['class_categories_as_json', 'url', 'render', 'path', 'form_widget', '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;
}
}
}