<?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;
/* ProductTagPage42/list.twig */
class __TwigTemplate_ad8776cc966cee2ed486c2ebe498618a 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 1
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", "ProductTagPage42/list.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ProductTagPage42/list.twig"));
// line 3
$context["body_class"] = "product_tag_page";
// line 1
$this->parent = $this->loadTemplate("default_frame.twig", "ProductTagPage42/list.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
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 6
echo " <script>
eccube.productsClassCategories = {
";
// line 8
$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.', 8, $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 9
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, 9), 9, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 9, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 9) == false)) {
echo ", ";
}
// line 10
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 11
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 37
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 65
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 72
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>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 90
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 91
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.', 91, $this->source); })()), "id", [], "any", false, false, true, 91), "vars", [], "any", false, false, true, 91), "errors", [], "any", false, false, true, 91)) > 0)) {
// line 92
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 93
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 96
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 98
$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.', 98, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 99
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, 99), "id", [], "any", false, false, true, 99), 99, $this->source), "html", null, true);
echo "\"
name=\"";
// line 100
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, 100), "full_name", [], "any", false, false, true, 100), 100, $this->source), "html", null, true);
echo "\"
";
// line 101
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, 101), "value", [], "any", false, false, true, 101))) {
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, 101), "value", [], "any", false, false, true, 101), 101, $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 103
echo " </form>
<!--★タイトル★-->
";
// line 105
$context["tagId"] = 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.', 105, $this->source); })()), "request", [], "any", false, false, true, 105), "query", [], "any", false, false, true, 105), "get", [0 => "id"], "method", false, false, true, 105);
// line 106
echo " ";
if ((isset($context["tagId"]) || array_key_exists("tagId", $context) ? $context["tagId"] : (function () { throw new RuntimeError('Variable "tagId" does not exist.', 106, $this->source); })())) {
// line 107
echo " <h2 class=\"title\">
";
// line 108
if (((isset($context["tagId"]) || array_key_exists("tagId", $context) ? $context["tagId"] : (function () { throw new RuntimeError('Variable "tagId" does not exist.', 108, $this->source); })()) == 1)) {
// line 109
echo " 新刊書
";
} elseif (( // line 110
(isset($context["tagId"]) || array_key_exists("tagId", $context) ? $context["tagId"] : (function () { throw new RuntimeError('Variable "tagId" does not exist.', 110, $this->source); })()) == 2)) {
// line 111
echo " 既刊書
";
}
// line 113
echo " </h2>
";
}
// line 115
echo "
<div class=\"ec-searchnavRole__infos pagenumber_area\">
<div class=\"pagination-area flex\">
<div class=\"ec-searchnavRole__counter\">
";
// line 119
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.', 119, $this->source); })()), "totalItemCount", [], "any", false, false, true, 119) > 0)) {
// line 120
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold attention\">%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.', 120, $this->source); })()), "totalItemCount", [], "any", false, false, true, 120)]);
echo "
";
} else {
// line 122
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 124
echo " </div>
";
// line 125
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.', 125, $this->source); })()), "totalItemCount", [], "any", false, false, true, 125) > 0)) {
// line 126
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 128
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.', 128, $this->source); })()), "disp_number", [], "any", false, false, true, 128), 128, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 129
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.', 129, $this->source); })()), "orderby", [], "any", false, false, true, 129), 129, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 133
echo " </div>
</div>
</div>
";
// line 136
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.', 136, $this->source); })()), "totalItemCount", [], "any", false, false, true, 136) > 0)) {
// line 137
echo " <div class=\"ec-shelfRole\" id=\"products-area\">
<ul class=\"ec-shelfGrid\">
";
// line 139
$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.', 139, $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 140
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 141
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, 141)]), "html", null, true);
echo "\">
<div class=\"product-detailarea flex\">
<div class=\"listphoto\">
<div class=\"listphotoarea\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 146
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, 146), 146, $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, 146), 146, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 146) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
</p>
</div>
</div>
<div class=\"product-ttlarea\">
<!-- 書籍タイトル -->
<div class=\"product-ttl\">
";
// line 153
if (twig_get_attribute($this->env, $this->source, $context["Product"], "sub_name_up", [], "any", false, false, true, 153)) {
// line 154
echo " <p>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "sub_name_up", [], "any", false, false, true, 154), 154, $this->source), "html", null, true);
echo "</p>
";
}
// line 156
echo " <h3>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 156), 156, $this->source), "html", null, true);
echo "</h3>
";
// line 157
if (twig_get_attribute($this->env, $this->source, $context["Product"], "sub_name_down", [], "any", false, false, true, 157)) {
// line 158
echo " <p>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "sub_name_down", [], "any", false, false, true, 158), 158, $this->source), "html", null, true);
echo "</p>
";
}
// line 160
echo " </div>
<!-- 価格 -->
<div class=\"productlist-pricebox\">
<p class=\"price02-default\">
定価:
<span class=\"price sale_price\">
";
// line 167
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 167)) {
// line 168
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 168) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 168))) {
// line 169
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 169), 169, $this->source)), "html", null, true);
echo "
";
} else {
// line 171
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 171), 171, $this->source)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 171), 171, $this->source)), "html", null, true);
echo "
";
}
// line 173
echo " ";
} else {
// line 174
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 174), 174, $this->source)), "html", null, true);
echo "
";
}
// line 176
echo " 円</span>
(税込)
</p>
</div>
</div>
</div>
</a>
<!-- 買い物かご -->
<div class=\"productlist-cartarea only-pc\">
\t\t\t\t\t\t\t\t <!--★商品詳細を見る★-->
\t\t\t <div class=\"detail_btn\">
\t\t\t <a class=\"rgreen-btn__s\" href=\"";
// line 188
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, 188)]), "html", null, true);
echo "\">
\t\t\t 商品詳細を見る
\t\t\t </a>
\t\t\t </div>
";
// line 193
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 193)) {
// line 194
echo " ";
$context["form"] = twig_get_attribute($this->env, $this->source, (isset($context["forms"]) || array_key_exists("forms", $context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.', 194, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 194), [], "array", false, false, true, 194);
// line 195
echo " <form name=\"form";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 195), 195, $this->source), "html", null, true);
echo "\" id=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 195), 195, $this->source), "html", null, true);
echo "\" action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 195)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
";
// line 197
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 197)) {
// line 198
echo " <div class=\"classlist\">
<div class=\"ec-select\">
";
// line 200
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 200, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 200), "vars", [], "any", false, false, true, 200), "label", [], "any", false, false, true, 200), 200, $this->source), "html", null, true);
echo ":
";
// line 201
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 201, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 201), 201, $this->source), 'widget');
echo "
";
// line 202
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 202, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 202), 202, $this->source), 'errors');
echo "
</div>
";
// line 204
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 204)) {
// line 205
echo " <div class=\"ec-select\">
";
// line 206
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["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 206, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 206), "vars", [], "any", false, false, true, 206), "label", [], "any", false, false, true, 206), 206, $this->source), "html", null, true);
echo ":
";
// line 207
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 207, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 207), 207, $this->source), 'widget');
echo "
";
// line 208
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 208, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 208), 208, $this->source), 'errors');
echo "
</div>
";
}
// line 211
echo " </div>
";
}
// line 213
echo " <div class=\"ec-numberInput\"><span>数量:</span>
";
// line 214
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 214, $this->source); })()), "quantity", [], "any", false, false, true, 214), 214, $this->source), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 215
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 215, $this->source); })()), "quantity", [], "any", false, false, true, 215), 215, $this->source), 'errors');
echo "
</div>
</div>
";
// line 218
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 218, $this->source); })()), 218, $this->source), 'rest');
echo "
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart orange-btn__s\" data-cartid=\"";
// line 221
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 221), 221, $this->source), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 221), 221, $this->source), "html", null, true);
echo "\">
カゴに入れる
</button>
</div>
";
} else {
// line 226
echo " <div class=\"attention\">
";
// line 227
$context["targettag"] = [];
// line 228
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, true, 228));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 229
echo " ";
$context["targettag"] = twig_array_merge($this->sandbox->ensureToStringAllowed((isset($context["targettag"]) || array_key_exists("targettag", $context) ? $context["targettag"] : (function () { throw new RuntimeError('Variable "targettag" does not exist.', 229, $this->source); })()), 229, $this->source), [0 => twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, true, 229)]);
// line 230
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 231
echo " ";
if (twig_in_filter("7", (isset($context["targettag"]) || array_key_exists("targettag", $context) ? $context["targettag"] : (function () { throw new RuntimeError('Variable "targettag" does not exist.', 231, $this->source); })()))) {
// line 232
echo " 申し訳ございませんが、本商品は絶版となりました。
";
} elseif (twig_in_filter("5", // line 233
(isset($context["targettag"]) || array_key_exists("targettag", $context) ? $context["targettag"] : (function () { throw new RuntimeError('Variable "targettag" does not exist.', 233, $this->source); })()))) {
// line 234
echo " この商品は発売前のため購入いただけません。
";
} else {
// line 236
echo " 申し訳ございませんが、本商品は只今品切れ中です。
";
}
// line 238
echo " </div>
";
}
// line 240
echo " </div>
</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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 243
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 248
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 249
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 252
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 253
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>
";
// line 260
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.', 260, $this->source); })()), "totalItemCount", [], "any", false, false, true, 260) > 0)) {
// line 261
echo " <div class=\"ec-pagerRole\">
";
// line 262
$this->loadTemplate("pager.twig", "ProductTagPage42/list.twig", 262)->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.', 262, $this->source); })()), "paginationData", [], "any", false, false, true, 262)]));
// line 263
echo " </div>
";
}
// line 265
echo " ";
}
// line 266
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "ProductTagPage42/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 654 => 266, 651 => 265, 647 => 263, 645 => 262, 642 => 261, 640 => 260, 628 => 253, 624 => 252, 618 => 249, 614 => 248, 607 => 243, 591 => 240, 587 => 238, 583 => 236, 579 => 234, 577 => 233, 574 => 232, 571 => 231, 565 => 230, 562 => 229, 557 => 228, 555 => 227, 552 => 226, 542 => 221, 536 => 218, 530 => 215, 526 => 214, 523 => 213, 519 => 211, 513 => 208, 509 => 207, 505 => 206, 502 => 205, 500 => 204, 495 => 202, 491 => 201, 487 => 200, 483 => 198, 481 => 197, 471 => 195, 468 => 194, 466 => 193, 458 => 188, 444 => 176, 438 => 174, 435 => 173, 427 => 171, 421 => 169, 418 => 168, 416 => 167, 407 => 160, 401 => 158, 399 => 157, 394 => 156, 388 => 154, 386 => 153, 370 => 146, 362 => 141, 359 => 140, 342 => 139, 338 => 137, 336 => 136, 331 => 133, 324 => 129, 320 => 128, 316 => 126, 314 => 125, 311 => 124, 305 => 122, 299 => 120, 297 => 119, 291 => 115, 287 => 113, 283 => 111, 281 => 110, 278 => 109, 276 => 108, 273 => 107, 270 => 106, 268 => 105, 264 => 103, 252 => 101, 248 => 100, 243 => 99, 239 => 98, 235 => 96, 229 => 93, 226 => 92, 223 => 91, 213 => 90, 186 => 72, 176 => 65, 145 => 37, 117 => 11, 103 => 10, 95 => 9, 78 => 8, 74 => 6, 64 => 5, 53 => 1, 51 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% set body_class = 'product_tag_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>
{% endblock %}
{% block main %}
{% if search_form.id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<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>
<!--★タイトル★-->
{% set tagId = app.request.query.get('id') %}
{% if tagId %}
<h2 class=\"title\">
{% if tagId == 1 %}
新刊書
{% elseif tagId == 2 %}
既刊書
{% endif %}
</h2>
{% endif %}
<div class=\"ec-searchnavRole__infos pagenumber_area\">
<div class=\"pagination-area flex\">
<div class=\"ec-searchnavRole__counter\">
{% if pagination.totalItemCount > 0 %}
{{ '<span class=\"ec-font-bold attention\">%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>
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\" id=\"products-area\">
<ul class=\"ec-shelfGrid\">
{% for Product in pagination %}
<li class=\"ec-shelfGrid__item\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<div class=\"product-detailarea flex\">
<div class=\"listphoto\">
<div class=\"listphotoarea\">
<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>
</div>
</div>
<div class=\"product-ttlarea\">
<!-- 書籍タイトル -->
<div class=\"product-ttl\">
{% if Product.sub_name_up %}
<p>{{ Product.sub_name_up }}</p>
{% endif %}
<h3>{{ Product.name }}</h3>
{% if Product.sub_name_down %}
<p>{{ Product.sub_name_down }}</p>
{% endif %}
</div>
<!-- 価格 -->
<div class=\"productlist-pricebox\">
<p class=\"price02-default\">
定価:
<span class=\"price sale_price\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% endif %}
円</span>
(税込)
</p>
</div>
</div>
</div>
</a>
<!-- 買い物かご -->
<div class=\"productlist-cartarea only-pc\">
\t\t\t\t\t\t\t\t <!--★商品詳細を見る★-->
\t\t\t <div class=\"detail_btn\">
\t\t\t <a class=\"rgreen-btn__s\" href=\"{{ url('product_detail', {'id': Product.id}) }}\">
\t\t\t 商品詳細を見る
\t\t\t </a>
\t\t\t </div>
{% if Product.stock_find %}
{% set form = forms[Product.id] %}
<form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"classlist\">
<div class=\"ec-select\">
{{form.classcategory_id1.vars.label }}:
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{form.classcategory_id2.vars.label }}:
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
</div>
{% endif %}
<div class=\"ec-numberInput\"><span>数量:</span>
{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{{ form_rest(form) }}
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart orange-btn__s\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
カゴに入れる
</button>
</div>
{% else %}
<div class=\"attention\">
{% set targettag = [] %}
{% for tag in Product.Tags %}
{% set targettag = targettag|merge([tag.id]) %}
{% endfor %}
{% if '7' in targettag %}
申し訳ございませんが、本商品は絶版となりました。
{% elseif '5' in targettag %}
この商品は発売前のため購入いただけません。
{% else %}
申し訳ございませんが、本商品は只今品切れ中です。
{% endif %}
</div>
{% endif %}
</div>
</li>
{% endfor %}
</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>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}
", "ProductTagPage42/list.twig", "/home/higashiyamashobo/www/higashiyamashobo.jpn.org/ec-cube/app/template/default/ProductTagPage42/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 3, "for" => 8, "if" => 9, "include" => 262);
static $filters = array("escape" => 9, "raw" => 9, "trans" => 37, "length" => 91, "no_image_product" => 146, "number_format" => 169, "merge" => 229);
static $functions = array("class_categories_as_json" => 9, "url" => 65, "form_widget" => 128, "asset" => 146, "form_errors" => 202, "form_rest" => 218);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'no_image_product', 'number_format', 'merge'],
['class_categories_as_json', 'url', 'form_widget', 'asset', 'form_errors', 'form_rest']
);
} 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;
}
}
}