<?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_41dcba1d96abfaa7492507bd52e59991 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
}
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 216
$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 13
public function block_stylesheet($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", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 14
echo " ";
// line 15
echo " ";
// line 16
echo " <link rel=\"stylesheet\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/page/_product_list.css", "user_data"), "html", null, true);
echo "\">
<style>
.ec-topicpath{
display: flex;
margin: 30px 10% 0;
}
.ec-topicpath a{
color: #09860D;
}
.ec-topicpath__divider{
margin: 0 5px;
}
.category-btn{
justify-content: center;
}
.category-btn img{
margin-right: 15px;
}
.tab {
margin: 30px 10% 0;
}
@media screen and (max-width:768px){
.tab img{
width: 15%;
}
.category-btn{
margin-bottom: 15px;
}
}
.tab-list {
display: flex;
gap: 1px;
}
@media screen and (max-width:768px){
.tab-list{
flex-direction: column;
}
}
.tab-item {
border-radius: 5px 5px 0 0;
background-color: #09860D;
border-top: solid 1px #09860D;
border-right: solid 1px #09860D;
border-left: solid 1px #09860D;
}
.tab-item a{
color: #FFF;
padding: 0.5em 1.2em;
display: block;
}
.tab-content:has(.tab-panel.active){
display: flex;
justify-content: space-between;
border-top:solid 1px #09860D;
border-right:solid 1px #09860D;
border-left:solid 1px #09860D;
border-radius: 0 8px 0 0;
}
.tab-content:not(:has(.tab-panel.active)){
display: none;
}
@media screen and (max-width:768px){
.tab-content{
flex-direction: column;
border-radius: 0;
}
}
.tab-panel {
display: none;
}
.tab-item.active {
background-color: #fff;
font-weight: bold;
position: relative;
}
.tab-item.active a{
color: #09860D;
}
.tab-item.active::before{
content: \"\";
width: 100%;
border-bottom: 1px solid #FFF;
position: absolute;
bottom: -1px;
left: 0;
}
.tab-panel.active {
display: flex;
padding: 3%;
flex-wrap: wrap;
gap:20px 20px;
flex: 10;
}
@media screen and (max-width:768px){
.tab-panel.active{
justify-content: center;
}
}
.tab-panel.active h2 {
font-size: 20px;
font-weight: bold;
}
.search-form-box{
border: solid 1px #09860D;
border-radius: 0 0 8px 8px;
}
.tab-content:not(:has(.active)) + .search-form-box{
border-radius: 0 8px 8px 8px;
}
.search-form-box .search-form-content{
display: flex;
justify-content: space-between;
}
@media screen and (max-width:768px){
.search-form-box .search-form-content{
flex-direction: column;
}
}
.search-form-box .search-form-item{
padding: 3%;
}
@media screen and (max-width:768px){
.search-form-box .search-form-item{
margin: 0 auto;
}
}
.search-form-box .search-form-input{
-webkit-appearance: none;
-moz-appearance:none;
appearance: none;
border:1px solid #09860d;
border-radius:25px;
width: 30vw;
padding-left: 20px;
height: 36px;
background-color: #f5f5f5;
}
@media screen and (max-width:768px){
.search-form-box .search-form-input{
width: 50vw;
box-sizing: border-box;
}
.search-form-box .search-form-input::placeholder{
font-size: 2vw;
}
}
select{
background:none;
appearance: none;
font:inherit;
padding:9.5px 10px;
border:1px solid #09860d;
box-sizing: border-box;
width: 250px;
border-radius:2px;
}
.select {
display: inline-block;
position: relative;
vertical-align: middle;
}
.select::before {
position: absolute;
top: 18px;
right: 16px;
width: 0;
height: 0;
border-width: 10px 5px 0 5px;
border-style: solid;
border-color: #09860d transparent transparent transparent;
content: \"\";
pointer-events: none;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 218
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 219
echo " <script>
eccube.productsClassCategories = {
";
// line 221
$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.', 221, $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 222
echo " \"";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 222), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 222) == false)) {
echo ", ";
}
// line 223
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 224
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 250
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 278
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 285
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>
// 絞り込み検索は、絞り込み検索ボタンが押されたとき、もしくは入力欄にフォーカスされたときに、
// enterを押したときのみ発動する。カテゴリ検索を押したときは発火させない
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('.tab');
const categoryBtn = form.querySelector('button[name=\"search_parent_id\"]:not(.word-search)');
const wordBtn = form.querySelector('.category-btn.word-search');
const wordInput = form.querySelector('input.search-form-input');
// カテゴリ検索 → name を送らせない
categoryBtn.addEventListener('click', function () {
if (wordInput) {
wordInput.disabled = true;
}
});
// 絞り込み検索 → name を有効化
wordBtn?.addEventListener('click', function () {
if (wordInput) {
wordInput.disabled = false;
}
});
// Enterキーで submit 時に絞り込み検索の値を送信するための hidden input 挿入
form.addEventListener('submit', function (e) {
if (document.activeElement === wordInput) {
e.preventDefault();
// 既に存在していたら除去(2重防止)
const existingHidden = form.querySelector('input[name=\"search_parent_id\"].auto-injected');
if (existingHidden) {
existingHidden.remove();
}
// ボタンのvalue属性をそのまま使う
const valueFromButton = wordBtn?.getAttribute('value') || '';
const hidden = document.createElement('input');
hidden.type = 'hidden';
hidden.name = 'search_parent_id';
hidden.value = valueFromButton;
hidden.classList.add('auto-injected');
form.appendChild(hidden);
if (wordInput) {
wordInput.disabled = false;
}
form.submit();
}
});
});
// カテゴリの詳細検索に値が入っていない場合、buttonのnameの値をcategory_idに変更する
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('.tab');
const submitBtn = form.querySelector('button.category-btn');
const categorySelects = form.querySelectorAll('select[name=\"category_ids[]\"]');
form.addEventListener('submit', function (e) {
// category_ids[] に選択されている値が1つもない場合、ボタンのnameを変更
const hasValue = Array.from(categorySelects).some(select => select.value && select.value !== '');
if (!hasValue) {
submitBtn.setAttribute('name', 'category_id');
} else {
submitBtn.setAttribute('name', 'search_parent_id');
}
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 373
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 374
echo " ";
$context["AllCategories"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method", false, false, false, 374);
// line 375
echo " ";
$context["Categories"] = twig_array_filter($this->env, (isset($context["AllCategories"]) || array_key_exists("AllCategories", $context) ? $context["AllCategories"] : (function () { throw new RuntimeError('Variable "AllCategories" does not exist.', 375, $this->source); })()), function ($__c__) use ($context, $macros) { $context["c"] = $__c__; return ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["c"]) || array_key_exists("c", $context) ? $context["c"] : (function () { throw new RuntimeError('Variable "c" does not exist.', 375, $this->source); })()), "id", [], "any", false, false, false, 375)) && (twig_get_attribute($this->env, $this->source, (isset($context["c"]) || array_key_exists("c", $context) ? $context["c"] : (function () { throw new RuntimeError('Variable "c" does not exist.', 375, $this->source); })()), "id", [], "any", false, false, false, 375) == 1)); });
// line 376
echo " ";
$context["selected_categories"] = 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.', 376, $this->source); })()), "request", [], "any", false, false, false, 376), "query", [], "any", false, false, false, 376), "get", [0 => "category_ids", 1 => []], "method", false, false, false, 376);
// line 377
echo " ";
$context["parent_category"] = 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.', 377, $this->source); })()), "request", [], "any", false, false, false, 377), "query", [], "any", false, false, false, 377), "get", [0 => "search_parent_id"], "method", false, false, false, 377);
// line 378
echo " ";
// line 379
echo " <div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 381
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("front.product.all_category"), "html", null, true);
echo "</a>
</li>
";
// line 383
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 383, $this->source); })()))) {
// line 384
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.', 384, $this->source); })()), "path", [], "any", false, false, false, 384));
$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 385
echo " ";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 385)) {
echo "
<li class=\"ec-topicpath__divider\">></li>
<li class=\"ec-topicpath__item";
// line 387
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 387)) {
echo "--active";
}
echo "\">
<a href=\"";
// line 388
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, false, 388), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 388), "html", null, true);
echo "</a>
</li>
";
}
// line 391
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['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 392
echo " ";
}
// line 393
echo " ";
if ((isset($context["selected_categories"]) || array_key_exists("selected_categories", $context) ? $context["selected_categories"] : (function () { throw new RuntimeError('Variable "selected_categories" does not exist.', 393, $this->source); })())) {
// line 394
echo " ";
$context["first_matched"] = true;
// line 395
echo " \t\t ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories", $context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.', 395, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 396
echo " \t\t ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Category"], "Children", [], "any", false, false, false, 396));
foreach ($context['_seq'] as $context["_key"] => $context["children"]) {
// line 397
echo " \t\t ";
if ((twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 397) == (isset($context["parent_category"]) || array_key_exists("parent_category", $context) ? $context["parent_category"] : (function () { throw new RuntimeError('Variable "parent_category" does not exist.', 397, $this->source); })()))) {
// line 398
echo " \t\t <li class=\"ec-topicpath__divider\">></li>
\t\t <li><a href=\"";
// line 399
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 399), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["children"], "name", [], "any", false, false, false, 399), "html", null, true);
echo "</a></li>
\t\t ";
}
// line 401
echo " \t\t ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["children"], "Children", [], "any", false, false, false, 401));
foreach ($context['_seq'] as $context["_key"] => $context["grandChildren"]) {
// line 402
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["grandChildren"], "Children", [], "any", false, false, false, 402));
foreach ($context['_seq'] as $context["_key"] => $context["grandgrandChild"]) {
// line 403
echo " ";
if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["grandgrandChild"], "id", [], "any", false, false, false, 403), (isset($context["selected_categories"]) || array_key_exists("selected_categories", $context) ? $context["selected_categories"] : (function () { throw new RuntimeError('Variable "selected_categories" does not exist.', 403, $this->source); })()))) {
// line 404
echo " ";
if ((isset($context["first_matched"]) || array_key_exists("first_matched", $context) ? $context["first_matched"] : (function () { throw new RuntimeError('Variable "first_matched" does not exist.', 404, $this->source); })())) {
// line 405
echo " <li class=\"ec-topicpath__divider\">></li>
<li><a href=\"";
// line 406
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_ids[]=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandgrandChild"], "id", [], "any", false, false, false, 406), "html", null, true);
echo "&search_parent_id=";
echo twig_escape_filter($this->env, (isset($context["parent_category"]) || array_key_exists("parent_category", $context) ? $context["parent_category"] : (function () { throw new RuntimeError('Variable "parent_category" does not exist.', 406, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandgrandChild"], "name", [], "any", false, false, false, 406), "html", null, true);
echo "</a></li>
";
// line 407
$context["first_matched"] = false;
// line 408
echo " ";
} else {
// line 409
echo " <li><a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_ids[]=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandgrandChild"], "id", [], "any", false, false, false, 409), "html", null, true);
echo "&search_parent_id=";
echo twig_escape_filter($this->env, (isset($context["parent_category"]) || array_key_exists("parent_category", $context) ? $context["parent_category"] : (function () { throw new RuntimeError('Variable "parent_category" does not exist.', 409, $this->source); })()), "html", null, true);
echo "\">・";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandgrandChild"], "name", [], "any", false, false, false, 409), "html", null, true);
echo "</a></li>
";
}
// line 411
echo " ";
}
// line 412
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['grandgrandChild'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 413
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['grandChildren'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 414
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['children'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 415
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 416
echo " ";
}
// line 417
echo " ";
if (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.', 417, $this->source); })()), "vars", [], "any", false, false, false, 417), "value", [], "any", false, false, false, 417), "name", [], "any", false, false, false, 417)) {
// line 418
echo " <li class=\"ec-topicpath__divider\">></li>
<li class=\"ec-topicpath__item\"><a href=\"";
// line 419
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?name=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 419, $this->source); })()), "vars", [], "any", false, false, false, 419), "value", [], "any", false, false, false, 419), "name", [], "any", false, false, false, 419), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 419, $this->source); })()), "vars", [], "any", false, false, false, 419), "value", [], "any", false, false, false, 419), "name", [], "any", false, false, false, 419), "html", null, true);
echo "</a></li>
";
}
// line 421
echo " </ol>
</div>
<!-- カテゴリ検索 -->
";
// line 424
if ((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.', 424, $this->source); })()), "request", [], "any", false, false, false, 424), "query", [], "any", false, false, false, 424), "get", [0 => "category_id"], "method", false, false, false, 424) || 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.', 424, $this->source); })()), "request", [], "any", false, false, false, 424), "query", [], "any", false, false, false, 424), "get", [0 => "search_parent_id"], "method", false, false, false, 424))) {
// line 425
echo " <form action=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" method=\"get\" class=\"tab\" >
<ul class=\"tab-list\">
";
// line 427
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories", $context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.', 427, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["tab"]) {
// line 428
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["tab"], "Children", [], "any", false, false, false, 428));
foreach ($context['_seq'] as $context["_key"] => $context["children"]) {
// line 429
echo " ";
$context["children_ids"] = [];
// line 430
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["children"], "Children", [], "any", false, false, false, 430));
foreach ($context['_seq'] as $context["_key"] => $context["grandChild"]) {
// line 431
echo " ";
$context["children_ids"] = twig_array_merge((isset($context["children_ids"]) || array_key_exists("children_ids", $context) ? $context["children_ids"] : (function () { throw new RuntimeError('Variable "children_ids" does not exist.', 431, $this->source); })()), [0 => twig_get_attribute($this->env, $this->source, $context["grandChild"], "id", [], "any", false, false, false, 431)]);
// line 432
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['grandChild'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 433
echo " ";
if ((((twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 433) == 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.', 433, $this->source); })()), "request", [], "any", false, false, false, 433), "query", [], "any", false, false, false, 433), "get", [0 => "category_id"], "method", false, false, false, 433)) || (twig_get_attribute($this->env, $this->source, // line 434
$context["children"], "id", [], "any", false, false, false, 434) == 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.', 434, $this->source); })()), "request", [], "any", false, false, false, 434), "query", [], "any", false, false, false, 434), "get", [0 => "search_parent_id"], "method", false, false, false, 434))) || twig_in_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 435
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 435, $this->source); })()), "request", [], "any", false, false, false, 435), "query", [], "any", false, false, false, 435), "get", [0 => "category_id"], "method", false, false, false, 435), (isset($context["children_ids"]) || array_key_exists("children_ids", $context) ? $context["children_ids"] : (function () { throw new RuntimeError('Variable "children_ids" does not exist.', 435, $this->source); })())))) {
// line 437
echo " <li class=\"tab-item active\" tabindex=\"0\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 437), "html", null, true);
echo "\">
<a href=\"";
// line 438
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list", ["category_id" => twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 438)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["children"], "name", [], "any", false, false, false, 438), "html", null, true);
echo "</a>
</li>
";
} else {
// line 441
echo " <li class=\"tab-item\" tabindex=\"0\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 441), "html", null, true);
echo "\">
<a href=\"";
// line 442
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list", ["category_id" => twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 442)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["children"], "name", [], "any", false, false, false, 442), "html", null, true);
echo "</a>
</li>
";
}
// line 445
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['children'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 446
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tab'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 447
echo " </ul>
<div class=\"tab-content\" id=\"category-form\">
";
// line 449
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories", $context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.', 449, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 450
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Category"], "Children", [], "any", false, false, false, 450));
foreach ($context['_seq'] as $context["_key"] => $context["children"]) {
// line 451
echo " ";
$context["children_ids"] = [];
// line 452
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["children"], "Children", [], "any", false, false, false, 452));
foreach ($context['_seq'] as $context["_key"] => $context["grandChild"]) {
// line 453
echo " ";
$context["children_ids"] = twig_array_merge((isset($context["children_ids"]) || array_key_exists("children_ids", $context) ? $context["children_ids"] : (function () { throw new RuntimeError('Variable "children_ids" does not exist.', 453, $this->source); })()), [0 => twig_get_attribute($this->env, $this->source, $context["grandChild"], "id", [], "any", false, false, false, 453)]);
// line 454
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['grandChild'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 455
echo " ";
if (((((twig_get_attribute($this->env, $this->source, $context["children"], "id", [], "any", false, false, false, 455) == 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.', 455, $this->source); })()), "request", [], "any", false, false, false, 455), "query", [], "any", false, false, false, 455), "get", [0 => "category_id"], "method", false, false, false, 455)) || (twig_get_attribute($this->env, $this->source, // line 456
$context["children"], "id", [], "any", false, false, false, 456) == 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.', 456, $this->source); })()), "request", [], "any", false, false, false, 456), "query", [], "any", false, false, false, 456), "get", [0 => "search_parent_id"], "method", false, false, false, 456))) || twig_in_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 457
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 457, $this->source); })()), "request", [], "any", false, false, false, 457), "query", [], "any", false, false, false, 457), "get", [0 => "category_id"], "method", false, false, false, 457), (isset($context["children_ids"]) || array_key_exists("children_ids", $context) ? $context["children_ids"] : (function () { throw new RuntimeError('Variable "children_ids" does not exist.', 457, $this->source); })()))) && !twig_test_empty(twig_get_attribute($this->env, $this->source, // line 458
$context["children"], "Children", [], "any", false, false, false, 458)))) {
// line 460
echo " <div class=\"tab-panel active\">
";
// line 461
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["children"], "Children", [], "any", false, false, false, 461));
foreach ($context['_seq'] as $context["_key"] => $context["grandChild"]) {
// line 462
echo " <div class=select>
<select name=\"category_ids[]\">
<option value=\"\">";
// line 464
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandChild"], "name", [], "any", false, false, false, 464), "html", null, true);
echo "から選択</option>
";
// line 465
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["grandChild"], "Children", [], "any", false, false, false, 465));
foreach ($context['_seq'] as $context["_key"] => $context["grandgrandchild"]) {
// line 466
echo " <option value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandgrandchild"], "id", [], "any", false, false, false, 466), "html", null, true);
echo "\"
";
// line 467
if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["grandgrandchild"], "id", [], "any", false, false, false, 467), (isset($context["selected_categories"]) || array_key_exists("selected_categories", $context) ? $context["selected_categories"] : (function () { throw new RuntimeError('Variable "selected_categories" does not exist.', 467, $this->source); })()))) {
// line 468
echo " selected
";
}
// line 470
echo " >";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["grandgrandchild"], "name", [], "any", false, false, false, 470), "html", null, true);
echo "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['grandgrandchild'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 472
echo " </select>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['grandChild'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 475
echo " </div>
<button type=\"submit\" class=\"category-btn\" name=\"search_parent_id\"
";
// line 477
if ((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.', 477, $this->source); })()), "request", [], "any", false, false, false, 477), "query", [], "any", false, false, false, 477), "get", [0 => "category_id"], "method", false, false, false, 477) || 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.', 477, $this->source); })()), "request", [], "any", false, false, false, 477), "query", [], "any", false, false, false, 477), "get", [0 => "search_parent_id"], "method", false, false, false, 477))) {
// line 478
echo " value=\"";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 478, $this->source); })()), "request", [], "any", false, false, false, 478), "query", [], "any", false, false, false, 478), "get", [0 => "category_id"], "method", false, false, false, 478)) ? (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.', 478, $this->source); })()), "request", [], "any", false, false, false, 478), "query", [], "any", false, false, false, 478), "get", [0 => "category_id"], "method", false, false, false, 478)) : (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.', 478, $this->source); })()), "request", [], "any", false, false, false, 478), "query", [], "any", false, false, false, 478), "get", [0 => "search_parent_id"], "method", false, false, false, 478))), "html", null, true);
echo "\"
>
";
}
// line 481
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/html/user_data/assets/icon/btn_ic_search.svg ", "user_data"), "html", null, true);
echo "\" alt=\"お気に入り\">
カテゴリ検索
</button>
";
} else {
// line 485
echo " <div class=\"tab-panel\"></div>
";
}
// line 487
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['children'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 488
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 489
echo " </div>
<div class=\"search-form-box\">
<div class=\"search-form-content\">
<div class=\"search-form-item\">
<input type=\"text\" name=\"name\" class=\"search-form-input\"
placeholder=\"カテゴリから絞り込み\"
";
// line 495
if ((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.', 495, $this->source); })()), "vars", [], "any", false, false, false, 495), "value", [], "any", false, false, false, 495), "name", [], "any", false, false, false, 495) && ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 496
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 496, $this->source); })()), "request", [], "any", false, false, false, 496), "query", [], "any", false, false, false, 496), "get", [0 => "search_parent_id"], "method", false, false, false, 496)) || !twig_test_empty(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.', 496, $this->source); })()), "request", [], "any", false, false, false, 496), "query", [], "any", false, false, false, 496), "get", [0 => "category_id"], "method", false, false, false, 496))))) {
// line 497
echo " value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 497, $this->source); })()), "vars", [], "any", false, false, false, 497), "value", [], "any", false, false, false, 497), "name", [], "any", false, false, false, 497), "html", null, true);
echo "\"
";
}
// line 499
echo " >
</div>
<button type=\"submit\" class=\"category-btn word-search\" name=\"search_parent_id\"
";
// line 502
if ((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.', 502, $this->source); })()), "request", [], "any", false, false, false, 502), "query", [], "any", false, false, false, 502), "get", [0 => "category_id"], "method", false, false, false, 502) || 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.', 502, $this->source); })()), "request", [], "any", false, false, false, 502), "query", [], "any", false, false, false, 502), "get", [0 => "search_parent_id"], "method", false, false, false, 502))) {
// line 503
echo " value=\"";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 503, $this->source); })()), "request", [], "any", false, false, false, 503), "query", [], "any", false, false, false, 503), "get", [0 => "category_id"], "method", false, false, false, 503)) ? (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.', 503, $this->source); })()), "request", [], "any", false, false, false, 503), "query", [], "any", false, false, false, 503), "get", [0 => "category_id"], "method", false, false, false, 503)) : (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.', 503, $this->source); })()), "request", [], "any", false, false, false, 503), "query", [], "any", false, false, false, 503), "get", [0 => "search_parent_id"], "method", false, false, false, 503))), "html", null, true);
echo "\"
>
";
}
// line 506
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/html/user_data/assets/icon/btn_ic_search.svg ", "user_data"), "html", null, true);
echo "\" alt=\"お気に入り\">
絞り込み検索
</button>
</div>
</div>
</form>
";
}
// line 513
echo "<section class=\"contents-list\">
\t<!-- 商品リスト -->
\t<div class=\"list-view\">
\t\t<div class=\"list-title\">
\t\t ";
// line 518
echo " ";
if (((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.', 518, $this->source); })()), "vars", [], "any", false, false, false, 518), "value", [], "any", false, false, false, 518), "name", [], "any", false, false, false, 518) && twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 519
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 519, $this->source); })()), "request", [], "any", false, false, false, 519), "query", [], "any", false, false, false, 519), "get", [0 => "category_id"], "method", false, false, false, 519))) && twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 520
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 520, $this->source); })()), "request", [], "any", false, false, false, 520), "query", [], "any", false, false, false, 520), "get", [0 => "search_parent_id"], "method", false, false, false, 520)))) {
// line 521
echo " <h2 class=\"ec-topicpath__item\">「";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 521, $this->source); })()), "vars", [], "any", false, false, false, 521), "value", [], "any", false, false, false, 521), "name", [], "any", false, false, false, 521), "html", null, true);
echo "」で検索</h2>
";
}
// line 523
echo "
";
// line 525
echo "\t\t ";
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 525, $this->source); })()))) {
// line 526
echo " <h2 class=\"ec-topicpath__item\">";
echo twig_escape_filter($this->env, 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.', 526, $this->source); })()), "name", [], "any", false, false, false, 526), "html", null, true);
echo "</h2>
";
// line 527
if (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.', 527, $this->source); })()), "vars", [], "any", false, false, false, 527), "value", [], "any", false, false, false, 527), "name", [], "any", false, false, false, 527)) {
// line 528
echo " <p class=\"ec-topicpath__item\">> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 528, $this->source); })()), "vars", [], "any", false, false, false, 528), "value", [], "any", false, false, false, 528), "name", [], "any", false, false, false, 528), "html", null, true);
echo "</p>
";
}
// line 530
echo " ";
}
// line 531
echo " ";
// line 532
echo " ";
if ((isset($context["selected_categories"]) || array_key_exists("selected_categories", $context) ? $context["selected_categories"] : (function () { throw new RuntimeError('Variable "selected_categories" does not exist.', 532, $this->source); })())) {
// line 533
echo " ";
$context["first_matched"] = true;
// line 534
echo " \t\t ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories", $context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.', 534, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["firstCategory"]) {
// line 535
echo " \t\t ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["firstCategory"], "Children", [], "any", false, false, false, 535));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 536
echo " \t\t ";
if ((twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 536) == (isset($context["parent_category"]) || array_key_exists("parent_category", $context) ? $context["parent_category"] : (function () { throw new RuntimeError('Variable "parent_category" does not exist.', 536, $this->source); })()))) {
// line 537
echo " \t\t <h2 class=\"ec-topicpath__item\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 537), "html", null, true);
echo "</h2>
\t\t ";
}
// line 539
echo " \t\t ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Category"], "Children", [], "any", false, false, false, 539));
foreach ($context['_seq'] as $context["_key"] => $context["Child"]) {
// line 540
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Child"], "Children", [], "any", false, false, false, 540));
foreach ($context['_seq'] as $context["_key"] => $context["GrandChildren"]) {
// line 541
echo " ";
if (twig_in_filter(twig_get_attribute($this->env, $this->source, $context["GrandChildren"], "id", [], "any", false, false, false, 541), (isset($context["selected_categories"]) || array_key_exists("selected_categories", $context) ? $context["selected_categories"] : (function () { throw new RuntimeError('Variable "selected_categories" does not exist.', 541, $this->source); })()))) {
// line 542
echo " ";
if ((isset($context["first_matched"]) || array_key_exists("first_matched", $context) ? $context["first_matched"] : (function () { throw new RuntimeError('Variable "first_matched" does not exist.', 542, $this->source); })())) {
// line 543
echo " <p class=\"ec-topicpath__item\">> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["GrandChildren"], "name", [], "any", false, false, false, 543), "html", null, true);
echo "</p>
";
// line 544
$context["first_matched"] = false;
// line 545
echo " ";
} else {
// line 546
echo " <p class=\"ec-topicpath__item\">・ ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["GrandChildren"], "name", [], "any", false, false, false, 546), "html", null, true);
echo "</p>
";
}
// line 548
echo " ";
}
// line 549
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['GrandChildren'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 550
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Child'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 551
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 552
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['firstCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 553
echo " ";
if (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.', 553, $this->source); })()), "vars", [], "any", false, false, false, 553), "value", [], "any", false, false, false, 553), "name", [], "any", false, false, false, 553)) {
// line 554
echo " <p class=\"ec-topicpath__item\">> ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 554, $this->source); })()), "vars", [], "any", false, false, false, 554), "value", [], "any", false, false, false, 554), "name", [], "any", false, false, false, 554), "html", null, true);
echo "</p>
";
}
// line 556
echo " ";
}
// line 557
echo "
\t\t\t\t";
// line 558
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.', 558, $this->source); })()), "totalItemCount", [], "any", false, false, false, 558) > 0)) {
// line 559
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<p>(%count%冊)</p>", ["%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.', 559, $this->source); })()), "totalItemCount", [], "any", false, false, false, 559)]);
echo "
";
} else {
// line 561
echo " <p>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</p>
";
}
// line 563
echo "\t\t</div>
\t\t<!-- リストエリア -->
\t\t";
// line 565
if ((twig_length_filter($this->env, 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.', 565, $this->source); })()), "totalItemCount", [], "any", false, false, false, 565)) > 0)) {
// line 566
echo "\t\t\t<div>
\t\t\t <div class=\"list-area\">
\t\t\t ";
// line 568
$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.', 568, $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 569
echo " <div class=\"card-1\">
<a href=\"";
// line 570
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, false, 570)]), "html", null, true);
echo "\">
<img src=\"";
// line 571
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, false, 571)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 571), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 571) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
<h3>";
// line 572
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 572), "html", null, true);
echo "</h3>
<p class=\"price02-default\">
";
// line 574
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 574)), "html", null, true);
echo "<span class=\"tax\">(税込)</span>
</p>
</a>
</div>
";
++$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 579
echo " </div>
\t\t\t<!-- ページネーション -->
\t\t\t";
// line 581
$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.', 581, $this->source); })()), "paginationData", [], "any", false, false, false, 581);
// line 582
echo " \t\t\t";
if ((twig_get_attribute($this->env, $this->source, (isset($context["pages"]) || array_key_exists("pages", $context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.', 582, $this->source); })()), "pageCount", [], "any", false, false, false, 582) > 1)) {
// line 583
echo " <div class=\"ec-pager pagination\">
";
// line 585
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["pages"] ?? null), "previous", [], "any", true, true, false, 585)) {
// line 586
echo " <a class=\"page-return\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 587
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 587, $this->source); })()), "request", [], "any", false, false, false, 587), "attributes", [], "any", false, false, false, 587), "get", [0 => "_route"], "method", false, false, false, 587), twig_array_merge(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 588
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 588, $this->source); })()), "request", [], "any", false, false, false, 588), "query", [], "any", false, false, false, 588), "all", [], "any", false, false, false, 588), ["pageno" => twig_get_attribute($this->env, $this->source, (isset($context["pages"]) || array_key_exists("pages", $context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.', 588, $this->source); })()), "previous", [], "any", false, false, false, 588)])), "html", null, true);
echo "\">←</a>
";
}
// line 590
echo " <div class=\"page-num\">
";
// line 591
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["pages"]) || array_key_exists("pages", $context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.', 591, $this->source); })()), "pagesInRange", [], "any", false, false, false, 591));
foreach ($context['_seq'] as $context["_key"] => $context["page"]) {
// line 592
echo " ";
if (($context["page"] == twig_get_attribute($this->env, $this->source, (isset($context["pages"]) || array_key_exists("pages", $context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.', 592, $this->source); })()), "current", [], "any", false, false, false, 592))) {
// line 593
echo " <a class=\"active\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 594
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 594, $this->source); })()), "request", [], "any", false, false, false, 594), "attributes", [], "any", false, false, false, 594), "get", [0 => "_route"], "method", false, false, false, 594), twig_array_merge(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 595
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 595, $this->source); })()), "request", [], "any", false, false, false, 595), "query", [], "any", false, false, false, 595), "all", [], "any", false, false, false, 595), ["pageno" => $context["page"]])), "html", null, true);
echo "\"> ";
echo twig_escape_filter($this->env, $context["page"], "html", null, true);
echo " </a>
";
} else {
// line 597
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 598
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 598, $this->source); })()), "request", [], "any", false, false, false, 598), "attributes", [], "any", false, false, false, 598), "get", [0 => "_route"], "method", false, false, false, 598), twig_array_merge(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 599
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 599, $this->source); })()), "request", [], "any", false, false, false, 599), "query", [], "any", false, false, false, 599), "all", [], "any", false, false, false, 599), ["pageno" => $context["page"]])), "html", null, true);
echo "\"> ";
echo twig_escape_filter($this->env, $context["page"], "html", null, true);
echo " </a>
";
}
// line 601
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['page'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 602
echo " </div>
";
// line 604
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["pages"] ?? null), "next", [], "any", true, true, false, 604)) {
// line 605
echo " <a class=\"page-advance\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 606
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 606, $this->source); })()), "request", [], "any", false, false, false, 606), "attributes", [], "any", false, false, false, 606), "get", [0 => "_route"], "method", false, false, false, 606), twig_array_merge(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 607
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 607, $this->source); })()), "request", [], "any", false, false, false, 607), "query", [], "any", false, false, false, 607), "all", [], "any", false, false, false, 607), ["pageno" => twig_get_attribute($this->env, $this->source, (isset($context["pages"]) || array_key_exists("pages", $context) ? $context["pages"] : (function () { throw new RuntimeError('Variable "pages" does not exist.', 607, $this->source); })()), "next", [], "any", false, false, false, 607)])), "html", null, true);
echo "\">→</a>
";
}
// line 609
echo " </div>
";
}
// line 611
echo " \t </div>
";
}
// line 613
echo " </div>
</section>
";
$__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 ( 1269 => 613, 1265 => 611, 1261 => 609, 1256 => 607, 1255 => 606, 1253 => 605, 1250 => 604, 1247 => 602, 1241 => 601, 1234 => 599, 1233 => 598, 1231 => 597, 1224 => 595, 1223 => 594, 1221 => 593, 1218 => 592, 1214 => 591, 1211 => 590, 1206 => 588, 1205 => 587, 1203 => 586, 1200 => 585, 1197 => 583, 1194 => 582, 1192 => 581, 1188 => 579, 1169 => 574, 1164 => 572, 1154 => 571, 1150 => 570, 1147 => 569, 1130 => 568, 1126 => 566, 1124 => 565, 1120 => 563, 1114 => 561, 1108 => 559, 1106 => 558, 1103 => 557, 1100 => 556, 1094 => 554, 1091 => 553, 1085 => 552, 1079 => 551, 1073 => 550, 1067 => 549, 1064 => 548, 1058 => 546, 1055 => 545, 1053 => 544, 1048 => 543, 1045 => 542, 1042 => 541, 1037 => 540, 1032 => 539, 1026 => 537, 1023 => 536, 1018 => 535, 1013 => 534, 1010 => 533, 1007 => 532, 1005 => 531, 1002 => 530, 996 => 528, 994 => 527, 989 => 526, 986 => 525, 983 => 523, 977 => 521, 975 => 520, 974 => 519, 972 => 518, 966 => 513, 955 => 506, 948 => 503, 946 => 502, 941 => 499, 935 => 497, 933 => 496, 932 => 495, 924 => 489, 918 => 488, 912 => 487, 908 => 485, 900 => 481, 893 => 478, 891 => 477, 887 => 475, 879 => 472, 870 => 470, 866 => 468, 864 => 467, 859 => 466, 855 => 465, 851 => 464, 847 => 462, 843 => 461, 840 => 460, 838 => 458, 837 => 457, 836 => 456, 834 => 455, 828 => 454, 825 => 453, 820 => 452, 817 => 451, 812 => 450, 808 => 449, 804 => 447, 798 => 446, 792 => 445, 784 => 442, 779 => 441, 771 => 438, 766 => 437, 764 => 435, 763 => 434, 761 => 433, 755 => 432, 752 => 431, 747 => 430, 744 => 429, 739 => 428, 735 => 427, 729 => 425, 727 => 424, 722 => 421, 713 => 419, 710 => 418, 707 => 417, 704 => 416, 698 => 415, 692 => 414, 686 => 413, 680 => 412, 677 => 411, 665 => 409, 662 => 408, 660 => 407, 650 => 406, 647 => 405, 644 => 404, 641 => 403, 636 => 402, 631 => 401, 622 => 399, 619 => 398, 616 => 397, 611 => 396, 606 => 395, 603 => 394, 600 => 393, 597 => 392, 583 => 391, 573 => 388, 567 => 387, 561 => 385, 543 => 384, 541 => 383, 534 => 381, 530 => 379, 528 => 378, 525 => 377, 522 => 376, 519 => 375, 516 => 374, 506 => 373, 409 => 285, 399 => 278, 368 => 250, 340 => 224, 326 => 223, 318 => 222, 301 => 221, 297 => 219, 287 => 218, 77 => 16, 75 => 15, 73 => 14, 63 => 13, 52 => 11, 50 => 216, 37 => 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' %}
{% block stylesheet %}
{#<link rel=\"stylesheet\" href=\"{{ asset('assets/css/contents-list.css', 'user_data') }}\">#}
{#<link rel=\"stylesheet\" href=\"{{ asset('assets/css/main_module.css', 'user_data') }}\">#}
<link rel=\"stylesheet\" href=\"{{ asset('assets/css/page/_product_list.css', 'user_data') }}\">
<style>
.ec-topicpath{
display: flex;
margin: 30px 10% 0;
}
.ec-topicpath a{
color: #09860D;
}
.ec-topicpath__divider{
margin: 0 5px;
}
.category-btn{
justify-content: center;
}
.category-btn img{
margin-right: 15px;
}
.tab {
margin: 30px 10% 0;
}
@media screen and (max-width:768px){
.tab img{
width: 15%;
}
.category-btn{
margin-bottom: 15px;
}
}
.tab-list {
display: flex;
gap: 1px;
}
@media screen and (max-width:768px){
.tab-list{
flex-direction: column;
}
}
.tab-item {
border-radius: 5px 5px 0 0;
background-color: #09860D;
border-top: solid 1px #09860D;
border-right: solid 1px #09860D;
border-left: solid 1px #09860D;
}
.tab-item a{
color: #FFF;
padding: 0.5em 1.2em;
display: block;
}
.tab-content:has(.tab-panel.active){
display: flex;
justify-content: space-between;
border-top:solid 1px #09860D;
border-right:solid 1px #09860D;
border-left:solid 1px #09860D;
border-radius: 0 8px 0 0;
}
.tab-content:not(:has(.tab-panel.active)){
display: none;
}
@media screen and (max-width:768px){
.tab-content{
flex-direction: column;
border-radius: 0;
}
}
.tab-panel {
display: none;
}
.tab-item.active {
background-color: #fff;
font-weight: bold;
position: relative;
}
.tab-item.active a{
color: #09860D;
}
.tab-item.active::before{
content: \"\";
width: 100%;
border-bottom: 1px solid #FFF;
position: absolute;
bottom: -1px;
left: 0;
}
.tab-panel.active {
display: flex;
padding: 3%;
flex-wrap: wrap;
gap:20px 20px;
flex: 10;
}
@media screen and (max-width:768px){
.tab-panel.active{
justify-content: center;
}
}
.tab-panel.active h2 {
font-size: 20px;
font-weight: bold;
}
.search-form-box{
border: solid 1px #09860D;
border-radius: 0 0 8px 8px;
}
.tab-content:not(:has(.active)) + .search-form-box{
border-radius: 0 8px 8px 8px;
}
.search-form-box .search-form-content{
display: flex;
justify-content: space-between;
}
@media screen and (max-width:768px){
.search-form-box .search-form-content{
flex-direction: column;
}
}
.search-form-box .search-form-item{
padding: 3%;
}
@media screen and (max-width:768px){
.search-form-box .search-form-item{
margin: 0 auto;
}
}
.search-form-box .search-form-input{
-webkit-appearance: none;
-moz-appearance:none;
appearance: none;
border:1px solid #09860d;
border-radius:25px;
width: 30vw;
padding-left: 20px;
height: 36px;
background-color: #f5f5f5;
}
@media screen and (max-width:768px){
.search-form-box .search-form-input{
width: 50vw;
box-sizing: border-box;
}
.search-form-box .search-form-input::placeholder{
font-size: 2vw;
}
}
select{
background:none;
appearance: none;
font:inherit;
padding:9.5px 10px;
border:1px solid #09860d;
box-sizing: border-box;
width: 250px;
border-radius:2px;
}
.select {
display: inline-block;
position: relative;
vertical-align: middle;
}
.select::before {
position: absolute;
top: 18px;
right: 16px;
width: 0;
height: 0;
border-width: 10px 5px 0 5px;
border-style: solid;
border-color: #09860d transparent transparent transparent;
content: \"\";
pointer-events: none;
}
</style>
{% endblock %}
{% 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').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>
<script>
// 絞り込み検索は、絞り込み検索ボタンが押されたとき、もしくは入力欄にフォーカスされたときに、
// enterを押したときのみ発動する。カテゴリ検索を押したときは発火させない
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('.tab');
const categoryBtn = form.querySelector('button[name=\"search_parent_id\"]:not(.word-search)');
const wordBtn = form.querySelector('.category-btn.word-search');
const wordInput = form.querySelector('input.search-form-input');
// カテゴリ検索 → name を送らせない
categoryBtn.addEventListener('click', function () {
if (wordInput) {
wordInput.disabled = true;
}
});
// 絞り込み検索 → name を有効化
wordBtn?.addEventListener('click', function () {
if (wordInput) {
wordInput.disabled = false;
}
});
// Enterキーで submit 時に絞り込み検索の値を送信するための hidden input 挿入
form.addEventListener('submit', function (e) {
if (document.activeElement === wordInput) {
e.preventDefault();
// 既に存在していたら除去(2重防止)
const existingHidden = form.querySelector('input[name=\"search_parent_id\"].auto-injected');
if (existingHidden) {
existingHidden.remove();
}
// ボタンのvalue属性をそのまま使う
const valueFromButton = wordBtn?.getAttribute('value') || '';
const hidden = document.createElement('input');
hidden.type = 'hidden';
hidden.name = 'search_parent_id';
hidden.value = valueFromButton;
hidden.classList.add('auto-injected');
form.appendChild(hidden);
if (wordInput) {
wordInput.disabled = false;
}
form.submit();
}
});
});
// カテゴリの詳細検索に値が入っていない場合、buttonのnameの値をcategory_idに変更する
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('.tab');
const submitBtn = form.querySelector('button.category-btn');
const categorySelects = form.querySelectorAll('select[name=\"category_ids[]\"]');
form.addEventListener('submit', function (e) {
// category_ids[] に選択されている値が1つもない場合、ボタンのnameを変更
const hasValue = Array.from(categorySelects).some(select => select.value && select.value !== '');
if (!hasValue) {
submitBtn.setAttribute('name', 'category_id');
} else {
submitBtn.setAttribute('name', 'search_parent_id');
}
});
});
</script>
{% endblock %}
{% block main %}
{% set AllCategories = repository('Eccube\\\\Entity\\\\Category').getList() %}
{% set Categories = AllCategories|filter(c => c.id is not null and c.id == 1) %}
{% set selected_categories = app.request.query.get('category_ids', []) %}
{% set parent_category = app.request.query.get('search_parent_id') %}
{#パンくず#}
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ 'front.product.all_category'|trans }}</a>
</li>
{% if Category is not null %}
{% for Path in Category.path %}
{% if not loop.first %}
<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>
{% endif %}
{% endfor %}
{% endif %}
{% if selected_categories %}
{% set first_matched = true %}
\t\t {% for Category in Categories %}
\t\t {% for children in Category.Children %}
\t\t {% if children.id == parent_category %}
\t\t <li class=\"ec-topicpath__divider\">></li>
\t\t <li><a href=\"{{ url('product_list') }}?category_id={{ children.id }}\">{{ children.name }}</a></li>
\t\t {% endif %}
\t\t {% for grandChildren in children.Children %}
{% for grandgrandChild in grandChildren.Children %}
{% if grandgrandChild.id in selected_categories %}
{% if first_matched %}
<li class=\"ec-topicpath__divider\">></li>
<li><a href=\"{{ url('product_list') }}?category_ids[]={{ grandgrandChild.id }}&search_parent_id={{parent_category}}\">{{ grandgrandChild.name }}</a></li>
{% set first_matched = false %}
{% else %}
<li><a href=\"{{ url('product_list') }}?category_ids[]={{ grandgrandChild.id }}&search_parent_id={{parent_category}}\">・{{ grandgrandChild.name }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% if search_form.vars.value.name %}
<li class=\"ec-topicpath__divider\">></li>
<li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}?name={{ search_form.vars.value.name }}\">{{ search_form.vars.value.name }}</a></li>
{% endif %}
</ol>
</div>
<!-- カテゴリ検索 -->
{% if app.request.query.get('category_id') or app.request.query.get('search_parent_id') %}
<form action=\"{{ url('product_list') }}\" method=\"get\" class=\"tab\" >
<ul class=\"tab-list\">
{% for tab in Categories%}
{% for children in tab.Children %}
{% set children_ids = [] %}
{% for grandChild in children.Children %}
{% set children_ids = children_ids|merge([grandChild.id]) %}
{% endfor %}
{% if children.id == app.request.query.get('category_id')
or children.id == app.request.query.get('search_parent_id')
or app.request.query.get('category_id') in children_ids
%}
<li class=\"tab-item active\" tabindex=\"0\" id=\"{{children.id}}\">
<a href=\"{{ url('product_list', {'category_id': children.id}) }}\">{{children.name}}</a>
</li>
{% else %}
<li class=\"tab-item\" tabindex=\"0\" id=\"{{children.id}}\">
<a href=\"{{ url('product_list', {'category_id': children.id}) }}\">{{children.name}}</a>
</li>
{% endif %}
{% endfor %}
{% endfor %}
</ul>
<div class=\"tab-content\" id=\"category-form\">
{% for Category in Categories%}
{% for children in Category.Children %}
{% set children_ids = [] %}
{% for grandChild in children.Children %}
{% set children_ids = children_ids|merge([grandChild.id]) %}
{% endfor %}
{% if (children.id == app.request.query.get('category_id')
or children.id == app.request.query.get('search_parent_id')
or app.request.query.get('category_id') in children_ids)
and children.Children is not empty
%}
<div class=\"tab-panel active\">
{% for grandChild in children.Children%}
<div class=select>
<select name=\"category_ids[]\">
<option value=\"\">{{grandChild.name}}から選択</option>
{% for grandgrandchild in grandChild.Children %}
<option value=\"{{grandgrandchild.id}}\"
{% if grandgrandchild.id in selected_categories %}
selected
{% endif %}
>{{grandgrandchild.name}}</option>
{% endfor %}
</select>
</div>
{% endfor %}
</div>
<button type=\"submit\" class=\"category-btn\" name=\"search_parent_id\"
{% if app.request.query.get('category_id') or app.request.query.get('search_parent_id') %}
value=\"{{ app.request.query.get('category_id') ?: app.request.query.get('search_parent_id') }}\"
>
{% endif %}
<img src=\"{{ asset('/html/user_data/assets/icon/btn_ic_search.svg ', 'user_data') }}\" alt=\"お気に入り\">
カテゴリ検索
</button>
{% else %}
<div class=\"tab-panel\"></div>
{% endif %}
{% endfor %}
{% endfor %}
</div>
<div class=\"search-form-box\">
<div class=\"search-form-content\">
<div class=\"search-form-item\">
<input type=\"text\" name=\"name\" class=\"search-form-input\"
placeholder=\"カテゴリから絞り込み\"
{% if search_form.vars.value.name
and (app.request.query.get('search_parent_id') is not empty or app.request.query.get('category_id') is not empty) %}
value=\"{{ search_form.vars.value.name }}\"
{% endif %}
>
</div>
<button type=\"submit\" class=\"category-btn word-search\" name=\"search_parent_id\"
{% if app.request.query.get('category_id') or app.request.query.get('search_parent_id') %}
value=\"{{ app.request.query.get('category_id') ?: app.request.query.get('search_parent_id') }}\"
>
{% endif%}
<img src=\"{{ asset('/html/user_data/assets/icon/btn_ic_search.svg ', 'user_data') }}\" alt=\"お気に入り\">
絞り込み検索
</button>
</div>
</div>
</form>
{% endif %}
<section class=\"contents-list\">
\t<!-- 商品リスト -->
\t<div class=\"list-view\">
\t\t<div class=\"list-title\">
\t\t {#カテゴリが存在しない(全体検索の場合)#}
{% if search_form.vars.value.name
and app.request.query.get('category_id') is empty
and app.request.query.get('search_parent_id') is empty%}
<h2 class=\"ec-topicpath__item\">「{{ search_form.vars.value.name }}」で検索</h2>
{% endif %}
{#カテゴリが存在する場合(単純にカテゴリナビから言った場合など)#}
\t\t {% if Category is not null %}
<h2 class=\"ec-topicpath__item\">{{ Category.name }}</h2>
{% if search_form.vars.value.name %}
<p class=\"ec-topicpath__item\">> {{ search_form.vars.value.name }}</p>
{% endif %}
{% endif %}
{#カテゴリの詳細検索を使った場合#}
{% if selected_categories %}
{% set first_matched = true %}
\t\t {% for firstCategory in Categories %}
\t\t {% for Category in firstCategory.Children %}
\t\t {% if Category.id == parent_category %}
\t\t <h2 class=\"ec-topicpath__item\">{{ Category.name }}</h2>
\t\t {% endif %}
\t\t {% for Child in Category.Children %}
{% for GrandChildren in Child.Children %}
{% if GrandChildren.id in selected_categories %}
{% if first_matched %}
<p class=\"ec-topicpath__item\">> {{ GrandChildren.name }}</p>
{% set first_matched = false %}
{% else %}
<p class=\"ec-topicpath__item\">・ {{ GrandChildren.name }}</p>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% if search_form.vars.value.name %}
<p class=\"ec-topicpath__item\">> {{ search_form.vars.value.name }}</p>
{% endif %}
{% endif %}
\t\t\t\t{% if pagination.totalItemCount > 0 %}
{{ '<p>(%count%冊)</p>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<p>{{ 'お探しの商品は見つかりませんでした'|trans }}</p>
{% endif %}
\t\t</div>
\t\t<!-- リストエリア -->
\t\t{% if pagination.totalItemCount|length > 0 %}
\t\t\t<div>
\t\t\t <div class=\"list-area\">
\t\t\t {% for Product in pagination %}
<div class=\"card-1\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
<h3>{{ Product.name }}</h3>
<p class=\"price02-default\">
{{ Product.getPrice02IncTaxMin|price }}<span class=\"tax\">(税込)</span>
</p>
</a>
</div>
{% endfor %}
</div>
\t\t\t<!-- ページネーション -->
\t\t\t{% set pages = pagination.paginationData %}
\t\t\t{% if pages.pageCount > 1 %}
<div class=\"ec-pager pagination\">
{# 前へ #}
{% if pages.previous is defined %}
<a class=\"page-return\" href=\"{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': pages.previous})) }}\">←</a>
{% endif %}
<div class=\"page-num\">
{% for page in pages.pagesInRange %}
{% if page == pages.current %}
<a class=\"active\" href=\"{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': page})) }}\"> {{ page }} </a>
{% else %}
<a href=\"{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': page})) }}\"> {{ page }} </a>
{% endif %}
{% endfor %}
</div>
{# 次へ #}
{% if pages.next is defined %}
<a class=\"page-advance\" href=\"{{ path(
app.request.attributes.get('_route'),
app.request.query.all|merge({'pageno': pages.next})) }}\">→</a>
{% endif %}
</div>
{% endif %}
\t </div>
{% endif %}
</div>
</section>
{% endblock %}", "Product/list.twig", "/home/photo-pub/www/photo-pub.com/app/template/default/Product/list.twig");
}
}