<?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_86887ef9f7987e83c8e88e4e2c22034d536ee918f2941e3a8dffbe1f13d6d6ae 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'],
];
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
// line 13
$context["body_class"] = "product_page";
// line 15
$context["main_class"] = "l-main l-main--products";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/list.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 17
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 18
echo " <script>
eccube.productsClassCategories = {
";
// line 20
$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.', 20, $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 21
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, 21), "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, 21) == false)) {
echo ", ";
}
// line 22
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 23
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 49
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 77
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 84
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_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 102
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 103
echo "
<div class=\"l-page-heading\">
<ul class=\"c-breadcrumb\">
<li class=\"c-breadcrumb__item\"><a href=\"";
// line 106
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" class=\"c-breadcrumb__link c-btn-txt\">TOP</a></li>
<li class=\"c-breadcrumb__item\"><span class=\"c-breadcrumb__txt\">商品リスト</span></li>
</ul>
<h1 class=\"l-page-heading__ttl\">
<span class=\"l-page-heading__ttl-jp\">商品リスト</span>
<span class=\"l-page-heading__ttl-en\">PRODUCTS</span>
</h1>
</div>
";
// line 115
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.', 115, $this->source); })()), "category_id", [], "any", false, false, false, 115), "vars", [], "any", false, false, false, 115), "errors", [], "any", false, false, false, 115)) > 0)) {
// line 116
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 117
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 120
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 123
$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.', 123, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 124
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 124), "id", [], "any", false, false, false, 124), "html", null, true);
echo "\"
name=\"";
// line 125
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 125), "full_name", [], "any", false, false, false, 125), "html", null, true);
echo "\"
";
// line 126
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 126), "value", [], "any", false, false, false, 126))) {
echo "value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 126), "value", [], "any", false, false, false, 126), "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 128
echo " </form>
";
// line 130
if (((null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 130, $this->source); })())) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 130, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 130, $this->source); })()), "id", [], "any", false, false, false, 130) != "11")))) {
// line 131
echo "
<ul class=\"p-products-cat\">
<li class=\"p-products-cat__item";
// line 133
if ((null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 133, $this->source); })()))) {
echo " current";
}
echo "\">
<a href=\"";
// line 134
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">すべて</span>
<span class=\"p-products-cat__small\">(ALL)</span>
</a>
</li>
<li class=\"p-products-cat__item";
// line 139
if (( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 139, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 139, $this->source); })()), "id", [], "any", false, false, false, 139) == "8"))) {
echo " current";
}
echo "\">
<a href=\"";
// line 140
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=8\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">MUYU-SEN Nature.</span>
<span class=\"p-products-cat__small\">(むゆうせんナチュレ)</span>
</a>
</li>
<li class=\"p-products-cat__item";
// line 145
if ((((( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })()), "id", [], "any", false, false, false, 145) == "9")) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })()), "id", [], "any", false, false, false, 145) == "13"))) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })()), "id", [], "any", false, false, false, 145) == "14"))) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 145, $this->source); })()), "id", [], "any", false, false, false, 145) == "15")))) {
echo " current";
}
echo "\">
<a href=\"";
// line 146
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=9\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">Nature.Dog</span>
<span class=\"p-products-cat__small\">(ナチュレドッグ)</span>
</a>
</li>
";
// line 152
$context["group1"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Plugin\\CustomerGroup42\\Entity\\Group"), "find", [0 => 1], "method", false, false, false, 152);
// line 153
echo " ";
$context["group2"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Plugin\\CustomerGroup42\\Entity\\Group"), "find", [0 => 2], "method", false, false, false, 153);
// line 154
echo " ";
$context["group3"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Plugin\\CustomerGroup42\\Entity\\Group"), "find", [0 => 3], "method", false, false, false, 154);
// line 155
echo " ";
$context["group4"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Plugin\\CustomerGroup42\\Entity\\Group"), "find", [0 => 4], "method", false, false, false, 155);
// line 156
echo "
";
// line 157
if ((((( !(null === (isset($context["group1"]) || array_key_exists("group1", $context) ? $context["group1"] : (function () { throw new RuntimeError('Variable "group1" does not exist.', 157, $this->source); })())) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", (isset($context["group1"]) || array_key_exists("group1", $context) ? $context["group1"] : (function () { throw new RuntimeError('Variable "group1" does not exist.', 157, $this->source); })()))) || ( !(null === (isset($context["group2"]) || array_key_exists("group2", $context) ? $context["group2"] : (function () { throw new RuntimeError('Variable "group2" does not exist.', 157, $this->source); })())) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", (isset($context["group2"]) || array_key_exists("group2", $context) ? $context["group2"] : (function () { throw new RuntimeError('Variable "group2" does not exist.', 157, $this->source); })())))) || ( !(null === (isset($context["group3"]) || array_key_exists("group3", $context) ? $context["group3"] : (function () { throw new RuntimeError('Variable "group3" does not exist.', 157, $this->source); })())) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", (isset($context["group3"]) || array_key_exists("group3", $context) ? $context["group3"] : (function () { throw new RuntimeError('Variable "group3" does not exist.', 157, $this->source); })())))) || ( !(null === (isset($context["group4"]) || array_key_exists("group4", $context) ? $context["group4"] : (function () { throw new RuntimeError('Variable "group4" does not exist.', 157, $this->source); })())) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", (isset($context["group4"]) || array_key_exists("group4", $context) ? $context["group4"] : (function () { throw new RuntimeError('Variable "group4" does not exist.', 157, $this->source); })()))))) {
// line 158
echo " <li class=\"p-products-cat__item";
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 158, $this->source); })()))) {
if ((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.', 158, $this->source); })()), "id", [], "any", false, false, false, 158) == "10")) {
echo " current";
}
}
echo "\">
<a href=\"";
// line 159
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=10\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">Heat therapy Member</span>
<span class=\"p-products-cat__small\">(ヒートセラピー会員専⽤)</span>
</a>
</li>
";
}
// line 165
echo " </ul>
";
// line 167
if ((((( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })()), "id", [], "any", false, false, false, 167) == "9")) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })()), "id", [], "any", false, false, false, 167) == "13"))) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })()), "id", [], "any", false, false, false, 167) == "14"))) || ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 167, $this->source); })()), "id", [], "any", false, false, false, 167) == "15")))) {
// line 168
echo " <ul class=\"p-products-cat p-products-cat--child\">
<li class=\"p-products-cat__item";
// line 169
if (( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 169, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 169, $this->source); })()), "id", [], "any", false, false, false, 169) == "13"))) {
echo " current";
}
echo "\">
<a href=\"";
// line 170
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=13\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__small\">ワンコケア用品</span>
</a>
</li>
<li class=\"p-products-cat__item";
// line 174
if (( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 174, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 174, $this->source); })()), "id", [], "any", false, false, false, 174) == "14"))) {
echo " current";
}
echo "\">
<a href=\"";
// line 175
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=14\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__small\">ワンコのおやつとご飯</span>
</a>
</li>
<li class=\"p-products-cat__item";
// line 179
if (( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 179, $this->source); })())) && (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 179, $this->source); })()), "id", [], "any", false, false, false, 179) == "15"))) {
echo " current";
}
echo "\">
<a href=\"";
// line 180
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=15\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__small\">ワンコのグッズ</span>
</a>
</li>
</ul>
";
}
// line 186
echo "
";
}
// line 188
echo "
<div class=\"ec-searchnavRole__infos p-products-infos\">
";
// line 190
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.', 190, $this->source); })()), "totalItemCount", [], "any", false, false, false, 190) > 0)) {
// line 191
echo " <div class=\"ec-searchnavRole__actions p-products-infos__actions\">
";
// line 192
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 192, $this->source); })()), "disp_number", [], "any", false, false, false, 192), 'widget', ["id" => "", "attr" => ["class" => "disp-number p-products-infos__select"]]);
echo "
";
// line 193
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 193, $this->source); })()), "orderby", [], "any", false, false, false, 193), 'widget', ["id" => "", "attr" => ["class" => "order-by p-products-infos__select"]]);
echo "
</div>
";
} else {
// line 196
echo " <p class=\"p-products-infos__none\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</p>
";
}
// line 198
echo " </div>
</div>
";
// line 202
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.', 202, $this->source); })()), "totalItemCount", [], "any", false, false, false, 202) > 0)) {
// line 203
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid p-products-list\">
";
// line 205
$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.', 205, $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 206
echo " <li class=\"ec-shelfGrid__item p-products-list__item\">
";
// line 209
echo " ";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 210
echo " ";
echo twig_include($this->env, $context, "Block/product_list_favorite_block.twig");
echo "
";
}
// line 212
echo "
<a href=\"";
// line 213
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, 213)]), "html", null, true);
echo "\" class=\" p-products-list__link\">
";
// line 216
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, false, 216))) {
// line 217
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 217))) {
// line 218
echo " <ul class=\"c-tags p-products-list__tags\">
";
// line 219
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 219));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 220
echo " <li class=\"c-tags__tag p-products-list__tags-tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 220), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 222
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, false, 222));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 223
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["ProductCategory"], "Category", [], "any", false, false, false, 223), "path", [], "any", false, false, false, 223), 0, [], "array", false, false, false, 223), "id", [], "any", false, false, false, 223) == "11")) {
// line 224
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 224), "path", [], "any", false, false, false, 224));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 225
echo " <li class=\"c-tags__tag p-products-list__tags-tag tag_cat";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 225), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 225), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 227
echo " ";
}
// line 228
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 229
echo " </ul>
";
} elseif (twig_test_empty(twig_get_attribute($this->env, $this->source, // line 230
$context["Product"], "Tags", [], "any", false, false, false, 230))) {
// line 231
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, false, 231));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 232
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["ProductCategory"], "Category", [], "any", false, false, false, 232), "path", [], "any", false, false, false, 232), 0, [], "array", false, false, false, 232), "id", [], "any", false, false, false, 232) == "11")) {
// line 233
echo " <ul class=\"c-tags p-products-list__tags\">
";
// line 234
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 234), "path", [], "any", false, false, false, 234));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 235
echo " <li class=\"c-tags__tag p-products-list__tags-tag tag_cat";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "id", [], "any", false, false, false, 235), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 235), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 237
echo " </ul>
";
}
// line 239
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 240
echo " ";
}
// line 241
echo " ";
} elseif ((twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, false, 241)) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 241)))) {
// line 242
echo " <ul class=\"c-tags p-products-list__tags\">
";
// line 243
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 243));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 244
echo " <li class=\"c-tags__tag p-products-list__tags-tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 244), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 246
echo " </ul>
";
}
// line 248
echo " ";
// line 249
echo "
";
// line 251
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, false, 251))) {
// line 252
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, false, 252));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 253
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["ProductCategory"], "Category", [], "any", false, false, false, 253), "path", [], "any", false, false, false, 253), 0, [], "array", false, false, false, 253), "id", [], "any", false, false, false, 253) != "11")) {
// line 254
echo " <ul class=\"c-cats p-products-list__cats\">
<li class=\"c-cats__cat p-products-list__cats-cat\">
";
// line 256
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 256), "path", [], "any", false, false, false, 256));
$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["Category"]) {
// line 257
echo " <span class=\"c-cats__cat-txt\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "name", [], "any", false, false, false, 257), "html", null, true);
echo "</span>";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 257) == false)) {
// line 258
echo " <span class=\"c-cats__cat-arrow\">></span>";
}
++$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['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 260
echo " </li>
</ul>
";
}
// line 263
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 264
echo " ";
}
// line 265
echo " ";
// line 266
echo "
<p class=\"ec-shelfGrid__item-image p-products-list__img-wrap\">
<img src=\"";
// line 268
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, 268)), "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, 268), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 268) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
</p>
<p class=\" p-products-list__name\">";
// line 271
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 271), "html", null, true);
echo "</p>
<div class=\"p-products-list__info\">
";
// line 275
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "production_capacity", [], "any", false, false, false, 275))) {
// line 276
echo " <p class=\" p-products-list__capacity\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "production_capacity", [], "any", false, false, false, 276), "html", null, true);
echo "</p>
";
}
// line 278
echo "
<p class=\"price02-default p-products-list__price\">
";
// line 280
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, false, 280)) {
// line 281
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, false, 281) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, false, 281))) {
// line 282
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 282)), "html", null, true);
echo "
";
} else {
// line 284
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 284)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, false, 284)), "html", null, true);
echo "
";
}
// line 286
echo " ";
} else {
// line 287
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 287)), "html", null, true);
echo "
";
}
// line 288
echo "円(税込)
</p>
</div>
</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['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 295
echo " </ul>
</div>
<div class=\"ec-pagerRole l-pagination\">
";
// line 299
$this->loadTemplate("pager.twig", "Product/list.twig", 299)->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.', 299, $this->source); })()), "paginationData", [], "any", false, false, false, 299)]));
// line 300
echo " </div>
";
}
// line 302
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 791 => 302, 787 => 300, 785 => 299, 779 => 295, 759 => 288, 753 => 287, 750 => 286, 742 => 284, 736 => 282, 733 => 281, 731 => 280, 727 => 278, 721 => 276, 719 => 275, 712 => 271, 700 => 268, 696 => 266, 694 => 265, 691 => 264, 685 => 263, 680 => 260, 665 => 258, 660 => 257, 643 => 256, 639 => 254, 636 => 253, 631 => 252, 628 => 251, 625 => 249, 623 => 248, 619 => 246, 608 => 244, 604 => 243, 601 => 242, 598 => 241, 595 => 240, 589 => 239, 585 => 237, 574 => 235, 570 => 234, 567 => 233, 564 => 232, 559 => 231, 557 => 230, 554 => 229, 548 => 228, 545 => 227, 534 => 225, 529 => 224, 526 => 223, 521 => 222, 510 => 220, 506 => 219, 503 => 218, 500 => 217, 497 => 216, 492 => 213, 489 => 212, 483 => 210, 480 => 209, 476 => 206, 459 => 205, 455 => 203, 453 => 202, 447 => 198, 441 => 196, 435 => 193, 431 => 192, 428 => 191, 426 => 190, 422 => 188, 418 => 186, 409 => 180, 403 => 179, 396 => 175, 390 => 174, 383 => 170, 377 => 169, 374 => 168, 372 => 167, 368 => 165, 359 => 159, 350 => 158, 348 => 157, 345 => 156, 342 => 155, 339 => 154, 336 => 153, 334 => 152, 325 => 146, 319 => 145, 311 => 140, 305 => 139, 297 => 134, 291 => 133, 287 => 131, 285 => 130, 281 => 128, 269 => 126, 265 => 125, 260 => 124, 256 => 123, 251 => 120, 245 => 117, 242 => 116, 240 => 115, 228 => 106, 223 => 103, 213 => 102, 186 => 84, 176 => 77, 145 => 49, 117 => 23, 103 => 22, 95 => 21, 78 => 20, 74 => 18, 64 => 17, 53 => 11, 51 => 15, 49 => 13, 36 => 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' %}
{% set main_class = 'l-main l-main--products' %}
{% 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>
{% endblock %}
{% block main %}
<div class=\"l-page-heading\">
<ul class=\"c-breadcrumb\">
<li class=\"c-breadcrumb__item\"><a href=\"{{ url('homepage') }}\" class=\"c-breadcrumb__link c-btn-txt\">TOP</a></li>
<li class=\"c-breadcrumb__item\"><span class=\"c-breadcrumb__txt\">商品リスト</span></li>
</ul>
<h1 class=\"l-page-heading__ttl\">
<span class=\"l-page-heading__ttl-jp\">商品リスト</span>
<span class=\"l-page-heading__ttl-en\">PRODUCTS</span>
</h1>
</div>
{% 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>
{% if Category is null or Category is not null and Category.id != '11' %}
<ul class=\"p-products-cat\">
<li class=\"p-products-cat__item{% if Category is null %} current{% endif %}\">
<a href=\"{{ url('product_list') }}\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">すべて</span>
<span class=\"p-products-cat__small\">(ALL)</span>
</a>
</li>
<li class=\"p-products-cat__item{% if Category is not null and Category.id == '8' %} current{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id=8\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">MUYU-SEN Nature.</span>
<span class=\"p-products-cat__small\">(むゆうせんナチュレ)</span>
</a>
</li>
<li class=\"p-products-cat__item{% if Category is not null and Category.id == '9' or Category is not null and Category.id == '13' or Category is not null and Category.id == '14' or Category is not null and Category.id == '15' %} current{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id=9\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">Nature.Dog</span>
<span class=\"p-products-cat__small\">(ナチュレドッグ)</span>
</a>
</li>
{% set group1 = repository(\"Plugin\\\\CustomerGroup42\\\\Entity\\\\Group\").find(1) %}
{% set group2 = repository(\"Plugin\\\\CustomerGroup42\\\\Entity\\\\Group\").find(2) %}
{% set group3 = repository(\"Plugin\\\\CustomerGroup42\\\\Entity\\\\Group\").find(3) %}
{% set group4 = repository(\"Plugin\\\\CustomerGroup42\\\\Entity\\\\Group\").find(4) %}
{% if group1 is not null and is_granted('view', group1) or group2 is not null and is_granted('view', group2) or group3 is not null and is_granted('view', group3) or group4 is not null and is_granted('view', group4) %}
<li class=\"p-products-cat__item{% if Category is not null %}{% if Category.id == '10' %} current{% endif %}{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id=10\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__large\">Heat therapy Member</span>
<span class=\"p-products-cat__small\">(ヒートセラピー会員専⽤)</span>
</a>
</li>
{% endif %}
</ul>
{% if Category is not null and Category.id == '9' or Category is not null and Category.id == '13' or Category is not null and Category.id == '14' or Category is not null and Category.id == '15' %}
<ul class=\"p-products-cat p-products-cat--child\">
<li class=\"p-products-cat__item{% if Category is not null and Category.id == '13' %} current{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id=13\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__small\">ワンコケア用品</span>
</a>
</li>
<li class=\"p-products-cat__item{% if Category is not null and Category.id == '14' %} current{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id=14\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__small\">ワンコのおやつとご飯</span>
</a>
</li>
<li class=\"p-products-cat__item{% if Category is not null and Category.id == '15' %} current{% endif %}\">
<a href=\"{{ url('product_list') }}?category_id=15\" class=\"p-products-cat__link\">
<span class=\"p-products-cat__small\">ワンコのグッズ</span>
</a>
</li>
</ul>
{% endif %}
{% endif %}
<div class=\"ec-searchnavRole__infos p-products-infos\">
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions p-products-infos__actions\">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number p-products-infos__select'}}) }}
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by p-products-infos__select'}}) }}
</div>
{% else %}
<p class=\"p-products-infos__none\">{{ 'お探しの商品は見つかりませんでした'|trans }}</p>
{% endif %}
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid p-products-list\">
{% for Product in pagination %}
<li class=\"ec-shelfGrid__item p-products-list__item\">
{# お気に入り #}
{% if is_granted('ROLE_USER') %}{# ログインしている場合 #}
{{ include('Block/product_list_favorite_block.twig') }}
{% endif %}
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\" class=\" p-products-list__link\">
{# タグと「定期便対応」カテゴリを出力 ここから #}
{% if Product.ProductCategories is not empty %}
{% if Product.Tags is not empty %}
<ul class=\"c-tags p-products-list__tags\">
{% for Tag in Product.Tags %}
<li class=\"c-tags__tag p-products-list__tags-tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.path[0].id == '11' %}
{% for Category in ProductCategory.Category.path %}
<li class=\"c-tags__tag p-products-list__tags-tag tag_cat{{ Category.id }}\">{{ Category.name }}</li>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% elseif Product.Tags is empty %}
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.path[0].id == '11' %}
<ul class=\"c-tags p-products-list__tags\">
{% for Category in ProductCategory.Category.path %}
<li class=\"c-tags__tag p-products-list__tags-tag tag_cat{{ Category.id }}\">{{ Category.name }}</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% elseif Product.ProductCategories is empty and Product.Tags is not empty %}
<ul class=\"c-tags p-products-list__tags\">
{% for Tag in Product.Tags %}
<li class=\"c-tags__tag p-products-list__tags-tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{% endif %}
{# タグと「定期便対応」カテゴリを出力 ここまで #}
{# 「定期便対応」以外のカテゴリを出力 ここから #}
{% if Product.ProductCategories is not empty %}
{% for ProductCategory in Product.ProductCategories %}
{% if ProductCategory.Category.path[0].id != '11' %}
<ul class=\"c-cats p-products-list__cats\">
<li class=\"c-cats__cat p-products-list__cats-cat\">
{% for Category in ProductCategory.Category.path %}
<span class=\"c-cats__cat-txt\">{{ Category.name }}</span>{%- if loop.last == false %}
<span class=\"c-cats__cat-arrow\">></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endif %}
{% endfor %}
{% endif %}
{# 「定期便対応」以外のカテゴリを出力 ここまで #}
<p class=\"ec-shelfGrid__item-image p-products-list__img-wrap\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
</p>
<p class=\" p-products-list__name\">{{ Product.name }}</p>
<div class=\"p-products-list__info\">
{% if Product.production_capacity is not empty %}
<p class=\" p-products-list__capacity\">{{ Product.production_capacity }}</p>
{% endif %}
<p class=\"price02-default p-products-list__price\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% endif %}円(税込)
</p>
</div>
</a>
</li>
{% endfor %}
</ul>
</div>
<div class=\"ec-pagerRole l-pagination\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}
", "Product/list.twig", "/home/indigomole988/www/muyu-sen.com/app/template/default/Product/list.twig");
}
}