<?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;
/* __string_template__aaf76cf11e3a0acf9c0b3c7a146975d6 */
class __TwigTemplate_e04a1132e2056a74e8d3e18fec4fcf49 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", "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6"));
// line 13
$context["body_class"] = "product_page product_list";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6", 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"));
echo "<script>
\$(function () {
\$('select[name=classcategory_id1]')
.change(function () {
var \$li = \$(this).closest('.ec-shelfGrid__item');
\$li.find('.ec-shelfGrid__item-image').hide();
\$li.find('.ec-shelfGrid__item-image-class').hide();
var \$form = \$(this).parents('form');
var product_id = \$form.find('input[name=\"product_id\"]').val();
var \$sele1 = \$(this);
var \$sele2 = \$form.find('select[name=classcategory_id2]');
if (!\$sele2 || \$sele2.length <= 0) {
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\";
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
} else {
";
// line 35
if ((twig_get_attribute($this->env, $this->source, (isset($context["apgProductClassConfig"]) || array_key_exists("apgProductClassConfig", $context) ? $context["apgProductClassConfig"] : (function () { throw new RuntimeError('Variable "apgProductClassConfig" does not exist.', 35, $this->source); })()), "getImageType", [], "method", false, false, true, 35) == twig_constant("Plugin\\ApgProductClassImage42\\Domain\\ClassImageType::CLASS_IMAGE1_ONLY"))) {
// line 36
echo " class1 = \$sele1.val();
if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
";
} else {
// line 49
echo " \$li.find('.ec-shelfGrid__item-image').show();
";
}
// line 51
echo " }
});
\$('select[name=classcategory_id2]')
.change(function () {
var \$li = \$(this).closest('.ec-shelfGrid__item');
\$li.find('.ec-shelfGrid__item-image').hide();
\$li.find('.ec-shelfGrid__item-image-class').hide();
var \$form = \$(this).parents('form');
var product_id = \$form.find('input[name=\"product_id\"]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$(this);
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + \$sele2.val();
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
";
// line 67
if ((twig_get_attribute($this->env, $this->source, (isset($context["apgProductClassConfig"]) || array_key_exists("apgProductClassConfig", $context) ? $context["apgProductClassConfig"] : (function () { throw new RuntimeError('Variable "apgProductClassConfig" does not exist.', 67, $this->source); })()), "getImageType", [], "method", false, false, true, 67) == twig_constant("Plugin\\ApgProductClassImage42\\Domain\\ClassImageType::CLASS_IMAGE1_ONLY"))) {
// line 68
echo " class1 = \$sele1.val();
if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
";
} else {
// line 81
echo " \$li.find('.ec-shelfGrid__item-image').show();
";
}
// line 83
echo " }
});
});
</script>
<script>
eccube.productsClassCategories = {
";
// line 90
$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.', 90, $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 91
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, 91), 91, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 91, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 91) == false)) {
echo ", ";
}
// line 92
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 93
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 119
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').html(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '";
// line 147
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 154
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 172
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 173
echo " ";
// line 174
echo " ";
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["search_form"] ?? null), "vars", [], "any", false, true, true, 174), "value", [], "any", false, true, true, 174), "category_id", [], "any", false, true, true, 174), "id", [], "any", true, true, true, 174)) {
// line 175
echo " ";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, (("Block/category" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, 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.', 175, $this->source); })()), "vars", [], "any", false, false, true, 175), "value", [], "any", false, false, true, 175), "category_id", [], "any", false, false, true, 175), "id", [], "any", false, false, true, 175), 175, $this->source)) . ".twig"), array(), true, true);
echo "
";
}
// line 177
echo " ";
// line 178
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.', 178, $this->source); })()), "category_id", [], "any", false, false, true, 178), "vars", [], "any", false, false, true, 178), "errors", [], "any", false, false, true, 178)) > 0)) {
// line 179
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 180
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 183
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 185
$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.', 185, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 186
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, 186), "id", [], "any", false, false, true, 186), 186, $this->source), "html", null, true);
echo "\"
name=\"";
// line 187
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, 187), "full_name", [], "any", false, false, true, 187), 187, $this->source), "html", null, true);
echo "\"
";
// line 188
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, 188), "value", [], "any", false, false, true, 188))) {
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, 188), "value", [], "any", false, false, true, 188), 188, $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 190
echo " </form>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 193
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 195
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 195, $this->source); })()))) {
// line 196
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.', 196, $this->source); })()), "path", [], "any", false, false, true, 196));
$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 197
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item";
// line 198
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 198)) {
echo "--active";
}
echo "\"><a
href=\"";
// line 199
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, 199), 199, $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, 199), 199, $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 202
echo " ";
}
// line 203
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.', 203, $this->source); })()), "vars", [], "any", false, false, true, 203), "value", [], "any", false, false, true, 203) && 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.', 203, $this->source); })()), "vars", [], "any", false, false, true, 203), "value", [], "any", false, false, true, 203), "name", [], "any", false, false, true, 203))) {
// line 204
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">";
// line 205
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.', 205, $this->source); })()), "vars", [], "any", false, false, true, 205), "value", [], "any", false, false, true, 205), "name", [], "any", false, false, true, 205)]), "html", null, true);
echo "</li>
";
}
// line 207
echo " </ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 211
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.', 211, $this->source); })()), "totalItemCount", [], "any", false, false, true, 211) > 0)) {
// line 212
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.', 212, $this->source); })()), "totalItemCount", [], "any", false, false, true, 212)]);
echo "
";
} else {
// line 214
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 216
echo " </div>
";
// line 217
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.', 217, $this->source); })()), "totalItemCount", [], "any", false, false, true, 217) > 0)) {
// line 218
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 220
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.', 220, $this->source); })()), "disp_number", [], "any", false, false, true, 220), 220, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 221
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.', 221, $this->source); })()), "orderby", [], "any", false, false, true, 221), 221, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 225
echo " </div>
</div>
";
// line 227
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.', 227, $this->source); })()), "totalItemCount", [], "any", false, false, true, 227) > 0)) {
// line 228
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// line 230
$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.', 230, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 231
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 232
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, 232)]), "html", null, true);
echo "\">
<p class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 234
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, 234), 234, $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, 234), 234, $this->source), "html", null, true);
echo "\" loading=\"lazy\">
</p>";
// line 235
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 235)) {
// line 236
$context["imageCount"] = (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Product"], "ProductImage", [], "any", false, false, true, 236), "count", [], "any", false, false, true, 236) - 1);
// line 237
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "getProductClasses", [], "method", false, false, true, 237));
foreach ($context['_seq'] as $context["_key"] => $context["ProductClass"]) {
// line 238
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["ProductClass"], "file_name", [], "any", false, false, true, 238)) {
// line 239
echo " ";
$context["imageCount"] = ((isset($context["imageCount"]) || array_key_exists("imageCount", $context) ? $context["imageCount"] : (function () { throw new RuntimeError('Variable "imageCount" does not exist.', 239, $this->source); })()) + 1);
// line 240
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory1", [], "any", false, false, true, 240) && twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory2", [], "any", false, false, true, 240))) {
// line 241
echo " <p class=\"ec-shelfGrid__item-image-class\"
id=\"apg_product_class_image-";
// line 242
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 242), 242, $this->source), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory1", [], "any", false, false, true, 242), "id", [], "any", false, false, true, 242), 242, $this->source), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory2", [], "any", false, false, true, 242), "id", [], "any", false, false, true, 242), 242, $this->source), "html", null, true);
echo "\"
data-class_category1=\"";
// line 243
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory1", [], "any", false, false, true, 243), "id", [], "any", false, false, true, 243), 243, $this->source), "html", null, true);
echo "\"
data-class_category2=\"";
// line 244
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory2", [], "any", false, false, true, 244), "id", [], "any", false, false, true, 244), 244, $this->source), "html", null, true);
echo "\"
style=\"display: none;\">
<img src=\"";
// line 246
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["ProductClass"], "getImageUrl", [], "method", false, false, true, 246), 246, $this->source), "save_image"), "html", null, true);
echo "\">
</p>
";
} elseif (twig_get_attribute($this->env, $this->source, // line 248
$context["ProductClass"], "ClassCategory1", [], "any", false, false, true, 248)) {
// line 249
echo " <p class=\"ec-shelfGrid__item-image-class\"
id=\"apg_product_class_image-";
// line 250
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 250), 250, $this->source), "html", null, true);
echo "-";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory1", [], "any", false, false, true, 250), "id", [], "any", false, false, true, 250), 250, $this->source), "html", null, true);
echo "-\"
data-class_category1=\"";
// line 251
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductClass"], "ClassCategory1", [], "any", false, false, true, 251), "id", [], "any", false, false, true, 251), 251, $this->source), "html", null, true);
echo "\"
style=\"display: none;\">
<img src=\"";
// line 253
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["ProductClass"], "getImageUrl", [], "method", false, false, true, 253), 253, $this->source), "save_image"), "html", null, true);
echo "\">
</p>
";
}
// line 256
echo " ";
}
// line 257
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductClass'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 259
echo "
<ul class=\"ec-shelfRole__tags\">
";
// line 261
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductTag", [], "any", false, false, true, 261));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 262
echo " ";
if ($context["Tag"]) {
// line 263
echo " <li class=\"ec-shelfRole__tag\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Tag"], "Tag", [], "any", false, false, true, 263), 263, $this->source), "html", null, true);
echo "</li>
";
}
// line 265
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 266
echo " </ul>
<p class=\"ec-shelfGrid__item-name\">";
// line 267
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 267), 267, $this->source), "html", null, true);
echo "</p>
";
// line 268
if (twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, true, 268)) {
// line 269
echo " <p>";
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, true, 269), 269, $this->source));
echo "</p>
";
}
// line 271
echo " <p class=\"price02-default\">
";
// line 272
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 272)) {
// line 273
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 273) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 273))) {
// line 274
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, 274), 274, $this->source)), "html", null, true);
echo "
";
} else {
// line 276
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, 276), 276, $this->source)), "html", null, true);
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"], "getPrice02IncTaxMax", [], "any", false, false, true, 276), 276, $this->source)), "html", null, true);
echo "
";
}
// line 278
echo " ";
} else {
// line 279
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, 279), 279, $this->source)), "html", null, true);
echo "
";
}
// line 281
echo " </p>
</a>
";
// line 320
echo " </li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 322
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 327
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 328
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 331
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 332
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 339
$this->loadTemplate("pager.twig", "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6", 339)->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.', 339, $this->source); })()), "paginationData", [], "any", false, false, true, 339)]));
// line 340
echo " </div>
";
}
// line 342
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 701 => 342, 697 => 340, 695 => 339, 683 => 332, 679 => 331, 673 => 328, 669 => 327, 662 => 322, 655 => 320, 651 => 281, 645 => 279, 642 => 278, 634 => 276, 628 => 274, 625 => 273, 623 => 272, 620 => 271, 614 => 269, 612 => 268, 608 => 267, 605 => 266, 599 => 265, 593 => 263, 590 => 262, 586 => 261, 582 => 259, 575 => 257, 572 => 256, 566 => 253, 561 => 251, 555 => 250, 552 => 249, 550 => 248, 545 => 246, 540 => 244, 536 => 243, 528 => 242, 525 => 241, 522 => 240, 519 => 239, 516 => 238, 511 => 237, 509 => 236, 507 => 235, 501 => 234, 496 => 232, 493 => 231, 489 => 230, 485 => 228, 483 => 227, 479 => 225, 472 => 221, 468 => 220, 464 => 218, 462 => 217, 459 => 216, 453 => 214, 447 => 212, 445 => 211, 439 => 207, 434 => 205, 431 => 204, 428 => 203, 425 => 202, 404 => 199, 398 => 198, 395 => 197, 377 => 196, 375 => 195, 368 => 193, 363 => 190, 351 => 188, 347 => 187, 342 => 186, 338 => 185, 334 => 183, 328 => 180, 325 => 179, 322 => 178, 320 => 177, 314 => 175, 311 => 174, 309 => 173, 299 => 172, 272 => 154, 262 => 147, 231 => 119, 203 => 93, 189 => 92, 181 => 91, 164 => 90, 155 => 83, 151 => 81, 136 => 68, 134 => 67, 116 => 51, 112 => 49, 97 => 36, 95 => 35, 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 product_list' %}
{% block javascript %}<script>
\$(function () {
\$('select[name=classcategory_id1]')
.change(function () {
var \$li = \$(this).closest('.ec-shelfGrid__item');
\$li.find('.ec-shelfGrid__item-image').hide();
\$li.find('.ec-shelfGrid__item-image-class').hide();
var \$form = \$(this).parents('form');
var product_id = \$form.find('input[name=\"product_id\"]').val();
var \$sele1 = \$(this);
var \$sele2 = \$form.find('select[name=classcategory_id2]');
if (!\$sele2 || \$sele2.length <= 0) {
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\";
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
} else {
{% if apgProductClassConfig.getImageType() == constant('Plugin\\\\\\ApgProductClassImage42\\\\\\Domain\\\\\\ClassImageType::CLASS_IMAGE1_ONLY') %}
class1 = \$sele1.val();
if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
{% else %}
\$li.find('.ec-shelfGrid__item-image').show();
{% endif %}
}
});
\$('select[name=classcategory_id2]')
.change(function () {
var \$li = \$(this).closest('.ec-shelfGrid__item');
\$li.find('.ec-shelfGrid__item-image').hide();
\$li.find('.ec-shelfGrid__item-image-class').hide();
var \$form = \$(this).parents('form');
var product_id = \$form.find('input[name=\"product_id\"]').val();
var \$sele1 = \$form.find('select[name=classcategory_id1]');
var \$sele2 = \$(this);
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + \$sele2.val();
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
{% if apgProductClassConfig.getImageType() == constant('Plugin\\\\\\ApgProductClassImage42\\\\\\Domain\\\\\\ClassImageType::CLASS_IMAGE1_ONLY') %}
class1 = \$sele1.val();
if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
if (\$(\"p#\" + id).length > 0) {
\$(\"p#\" + id).show();
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
} else {
\$li.find('.ec-shelfGrid__item-image').show();
}
{% else %}
\$li.find('.ec-shelfGrid__item-image').show();
{% endif %}
}
});
});
</script>
<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').html(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 %}
{# ここから /app/template/temptu/Block 以下に category1.twig の名前のファイルを置くと表示される(1の部分はカテゴリID) #}
{% if search_form.vars.value.category_id.id is defined %}
{{ include('Block/category'~search_form.vars.value.category_id.id~'.twig', ignore_missing = true) }}
{% endif %}
{# ここまで #}
{% if search_form.category_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>
<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=\"ec-shelfGrid\">
{% for Product in pagination %}
<li class=\"ec-shelfGrid__item\">
<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 }}\" loading=\"lazy\">
</p>{% if Product.hasProductClass -%}
{% set imageCount = Product.ProductImage.count - 1 %}
{% for ProductClass in Product.getProductClasses() %}
{% if ProductClass.file_name %}
{% set imageCount = imageCount + 1 %}
{% if ProductClass.ClassCategory1 and ProductClass.ClassCategory2 %}
<p class=\"ec-shelfGrid__item-image-class\"
id=\"apg_product_class_image-{{ Product.id }}-{{ ProductClass.ClassCategory1.id }}-{{ ProductClass.ClassCategory2.id }}\"
data-class_category1=\"{{ ProductClass.ClassCategory1.id }}\"
data-class_category2=\"{{ ProductClass.ClassCategory2.id }}\"
style=\"display: none;\">
<img src=\"{{ asset(ProductClass.getImageUrl(),'save_image') }}\">
</p>
{% elseif ProductClass.ClassCategory1 %}
<p class=\"ec-shelfGrid__item-image-class\"
id=\"apg_product_class_image-{{ Product.id }}-{{ ProductClass.ClassCategory1.id }}-\"
data-class_category1=\"{{ ProductClass.ClassCategory1.id }}\"
style=\"display: none;\">
<img src=\"{{ asset(ProductClass.getImageUrl(),'save_image') }}\">
</p>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
<ul class=\"ec-shelfRole__tags\">
{% for Tag in Product.ProductTag %}
{% if Tag %}
<li class=\"ec-shelfRole__tag\">{{ Tag.Tag }}</li>
{% endif %}
{% endfor %}
</ul>
<p class=\"ec-shelfGrid__item-name\">{{ 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>
{#
{% 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=\"ec-select\">
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</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\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
#}
</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>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}", "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6", "");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 35, "for" => 90, "include" => 339);
static $filters = array("escape" => 91, "raw" => 91, "trans" => 119, "length" => 178, "no_image_product" => 234, "nl2br" => 269, "price" => 274);
static $functions = array("constant" => 35, "class_categories_as_json" => 91, "url" => 147, "include" => 175, "form_widget" => 220, "asset" => 234);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for', 'include'],
['escape', 'raw', 'trans', 'length', 'no_image_product', 'nl2br', 'price'],
['constant', 'class_categories_as_json', 'url', 'include', '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;
}
}
}