<?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_3be7e494934bcab98a93de2aaec9fd851029dfbbb1f3294c001d63001fc89693 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'],
'pagetitlearea' => [$this, 'block_pagetitlearea'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_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 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 15
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 16
echo " <script>
eccube.productsClassCategories = {
";
// line 18
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 18, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 19
echo " \"";
echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 19), 19, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 19, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 19) == false)) {
echo ", ";
}
// line 20
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " };
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('";
// line 47
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '";
// line 75
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
echo "',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('";
// line 82
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 103
public function block_pagetitlearea($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", "pagetitlearea"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pagetitlearea"));
// line 104
echo "
<div class=\"main-top\">
\t\t";
// line 108
echo "\t\t<div id=\"pagetitle\">
\t\t\t<h2>
\t\t\t\tPRODUCT
\t\t\t\t<small>商品</small>
\t\t\t</h2>
\t\t\t<div class=\"image\">
\t\t\t\t<img src=\"";
// line 114
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/assets/images/pagetitle-image-product.jpg"), "html", null, true);
echo "\">
\t\t\t</div>
\t\t</div>
\t</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 122
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 123
echo "
";
// line 129
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.', 129, $this->source); })()), "category_id", [], "any", false, false, true, 129), "vars", [], "any", false, false, true, 129), "errors", [], "any", false, false, true, 129)) > 0)) {
// line 130
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 131
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 134
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 136
$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.', 136, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 137
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 137), "id", [], "any", false, false, true, 137), 137, $this->source), "html", null, true);
echo "\"
name=\"";
// line 138
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 138), "full_name", [], "any", false, false, true, 138), 138, $this->source), "html", null, true);
echo "\"
";
// line 139
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 139), "value", [], "any", false, false, true, 139))) {
echo "value=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, true, 139), "value", [], "any", false, false, true, 139), 139, $this->source), "html", null, true);
echo "\" ";
}
echo "/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 141
echo " </form>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 144
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html", null, true);
echo "</a>
</li>
";
// line 146
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 146, $this->source); })()))) {
// line 147
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.', 147, $this->source); })()), "path", [], "any", false, false, true, 147));
$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 148
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item";
// line 149
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 149)) {
echo "--active";
}
echo "\"><a
href=\"";
// line 150
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 150), 150, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, true, 150), 150, $this->source), "html", null, true);
echo "</a>
</li>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 153
echo " ";
}
// line 154
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 154, $this->source); })()), "vars", [], "any", false, false, true, 154), "value", [], "any", false, false, true, 154) && 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.', 154, $this->source); })()), "vars", [], "any", false, false, true, 154), "value", [], "any", false, false, true, 154), "name", [], "any", false, false, true, 154))) {
// line 155
echo " <li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">";
// line 156
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」の検索結果", ["%name%" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 156, $this->source); })()), "vars", [], "any", false, false, true, 156), "value", [], "any", false, false, true, 156), "name", [], "any", false, false, true, 156)]), "html", null, true);
echo "</li>
";
}
// line 158
echo " </ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 165
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.', 165, $this->source); })()), "totalItemCount", [], "any", false, false, true, 165) > 0)) {
// line 166
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>", ["%count%" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 166, $this->source); })()), "totalItemCount", [], "any", false, false, true, 166)]);
echo "
";
} else {
// line 168
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 170
echo " </div>
";
// line 171
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.', 171, $this->source); })()), "totalItemCount", [], "any", false, false, true, 171) > 0)) {
// line 172
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 174
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 174, $this->source); })()), "disp_number", [], "any", false, false, true, 174), 174, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 175
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 175, $this->source); })()), "orderby", [], "any", false, false, true, 175), 175, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 179
echo " </div>
</div>
";
// line 181
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.', 181, $this->source); })()), "totalItemCount", [], "any", false, false, true, 181) > 0)) {
// line 182
echo "
<section id=\"carender\">
";
// line 188
$context["recomendTag"] = 13;
// line 189
echo "
";
// line 190
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 190, $this->source); })()))) {
// line 191
echo "
";
// line 193
$context["lastCategoryId"] = null;
// line 194
$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.', 194, $this->source); })()), "path", [], "any", false, false, true, 194));
$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 195
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 195)) {
// line 196
echo " ";
$context["lastCategoryId"] = twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 196);
// line 197
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 199
echo "
";
// line 200
$context["desiTag"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [0 => (isset($context["lastCategoryId"]) || array_key_exists("lastCategoryId", $context) ? $context["lastCategoryId"] : (function () { throw new RuntimeError('Variable "lastCategoryId" does not exist.', 200, $this->source); })())], "method", false, false, true, 200);
// line 201
echo "
";
// line 203
$context["products"] = 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, 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, twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Product"), "createQueryBuilder", [0 => "p"], "method", false, false, true, 203), "innerJoin", [0 => "p.ProductCategories", 1 => "pc"], "method", false, false, true, 204), "where", [0 => "pc.Category = :category_id"], "method", false, false, true, 205), "andWhere", [0 => "p.Status = 1"], "method", false, false, true, 206), "setParameter", [0 => "category_id", 1 => // line 208
(isset($context["desiTag"]) || array_key_exists("desiTag", $context) ? $context["desiTag"] : (function () { throw new RuntimeError('Variable "desiTag" does not exist.', 208, $this->source); })())], "method", false, false, true, 207), "orderBy", [0 => "p.update_date", 1 => "DESC"], "method", false, false, true, 208), "setMaxResults", [0 => 9999], "method", false, false, true, 209), "getQuery", [], "method", false, false, true, 210), "getResult", [], "method", false, false, true, 211);
// line 214
echo "
";
} else {
// line 219
echo "
";
// line 221
$context["desiTag"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [0 => (isset($context["recomendTag"]) || array_key_exists("recomendTag", $context) ? $context["recomendTag"] : (function () { throw new RuntimeError('Variable "recomendTag" does not exist.', 221, $this->source); })())], "method", false, false, true, 221);
// line 223
$context["products"] = 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, 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, twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Product"), "createQueryBuilder", [0 => "p"], "method", false, false, true, 223), "innerJoin", [0 => "p.ProductCategories", 1 => "pc"], "method", false, false, true, 224), "where", [0 => "pc.Category = :category_id"], "method", false, false, true, 225), "andWhere", [0 => "p.Status = 1"], "method", false, false, true, 226), "setParameter", [0 => "category_id", 1 => // line 228
(isset($context["desiTag"]) || array_key_exists("desiTag", $context) ? $context["desiTag"] : (function () { throw new RuntimeError('Variable "desiTag" does not exist.', 228, $this->source); })())], "method", false, false, true, 227), "orderBy", [0 => "p.update_date", 1 => "DESC"], "method", false, false, true, 228), "setMaxResults", [0 => 9999], "method", false, false, true, 229), "getQuery", [], "method", false, false, true, 230), "getResult", [], "method", false, false, true, 231);
// line 234
echo "
";
}
// line 239
echo "
";
// line 240
if ((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 240, $this->source); })())) {
// line 241
echo "
\t\t\t\t\t\t<div class=\"recommendation\">
\t\t\t\t\t\t\t<p class=\"title\">カテゴリ別おすすめ商品</p>
\t<div class=\"contents\">
";
// line 250
$context["break"] = false;
// line 251
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 251, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
if ( !(isset($context["break"]) || array_key_exists("break", $context) ? $context["break"] : (function () { throw new RuntimeError('Variable "break" does not exist.', 251, $this->source); })())) {
// line 252
echo "
";
// line 254
$context["hasCategory"] = (twig_length_filter($this->env, twig_array_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "ProductCategories", [], "any", false, false, true, 254), 254, $this->source), function ($__pc__) use ($context, $macros) { $context["pc"] = $__pc__; return (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["pc"]) || array_key_exists("pc", $context) ? $context["pc"] : (function () { throw new RuntimeError('Variable "pc" does not exist.', 254, $this->source); })()), "Category", [], "any", false, false, true, 254), "id", [], "any", false, false, true, 254) == (isset($context["recomendTag"]) || array_key_exists("recomendTag", $context) ? $context["recomendTag"] : (function () { throw new RuntimeError('Variable "recomendTag" does not exist.', 254, $this->source); })())); })) > 0);
// line 255
echo " ";
if ((isset($context["hasCategory"]) || array_key_exists("hasCategory", $context) ? $context["hasCategory"] : (function () { throw new RuntimeError('Variable "hasCategory" does not exist.', 255, $this->source); })())) {
// line 256
echo "
<div class=\"block\">
\t\t\t\t\t\t\t\t <a href=\"";
// line 258
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 258)]), "html", null, true);
echo "\">
";
// line 260
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 260)) {
// line 261
echo "\t\t\t\t\t\t\t\t\t<div class=\"image\">
\t\t\t\t\t\t\t\t\t\t<img src=\"";
// line 262
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 262), 262, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 262), 262, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 262) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
\t\t\t\t\t\t\t\t\t</div>
";
} else {
// line 265
echo "<div class=\"image souldout\">
\t\t\t\t\t\t\t\t\t\t<img src=\"";
// line 266
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 266), 266, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 266), 266, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 266) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
\t\t\t\t\t\t\t\t\t</div>
";
}
// line 269
echo "
\t\t\t\t\t\t\t\t\t<p class=\"title\">
\t\t\t\t\t\t\t\t\t\t";
// line 271
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 271), 271, $this->source), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t";
// line 273
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, true, 273))) {
echo "<p class=\"type\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, true, 273), 273, $this->source), "html", null, true);
echo "</p>";
}
// line 274
echo "
";
// line 278
echo "
";
// line 280
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 280)) {
// line 281
echo "
";
// line 283
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 283))) {
// line 284
echo "<p class=\"price\"><span>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 284), 284, $this->source), "html", null, true);
echo "</span></p>
";
} else {
// line 288
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 288)) {
// line 289
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 289) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 289))) {
// line 290
echo "
\t\t\t\t\t\t\t\t<p class=\"price\"><span>";
// line 291
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 291) == 0)) {
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/textcampaign.twig");
echo "</span>";
} else {
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 291), 291, $this->source)), "html", null, true);
echo "</span>/100冊";
}
echo "</p>
\t\t\t\t\t\t\t";
} else {
// line 294
echo "\t\t\t\t\t\t\t\t<p class=\"price\"><span>";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 294), 294, $this->source)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t";
// line 296
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 296), 296, $this->source)), "html", null, true);
echo "</span>/100冊</p>
\t\t\t\t\t\t\t";
}
// line 298
echo "\t\t\t\t\t\t";
} else {
// line 299
echo " <p class=\"price\"><span>";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 299) == 0)) {
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/textcampaign.twig");
echo "</span>";
} else {
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 299), 299, $this->source)), "html", null, true);
echo "</span>/100冊";
}
echo "</p>
\t\t\t\t\t\t";
}
// line 301
echo "
";
}
// line 303
echo "
";
// line 306
echo " ";
} else {
// line 307
echo "
";
// line 309
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 309))) {
// line 310
echo "<p class=\"price\"><span>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 310), 310, $this->source), "html", null, true);
echo "</span></p>
";
} else {
// line 313
echo "<p class=\"price\"><span>";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/textcampaign.twig");
echo "</span></p>
";
}
// line 315
echo "
";
}
// line 318
echo "
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t</div>
";
// line 328
$context["break"] = true;
// line 329
echo " ";
} else {
// line 330
echo "
";
}
// line 333
echo "
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 335
echo "</div>
\t\t\t\t\t\t
\t\t\t\t\t\t</div>
";
}
// line 340
echo "
\t\t\t\t\t\t
\t\t\t\t\t\t<div class=\"contents\">
";
// line 345
$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.', 345, $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 346
echo "
<div class=\"block\">
\t\t\t\t\t\t\t\t <a href=\"";
// line 349
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 349)]), "html", null, true);
echo "\">
";
// line 351
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 351)) {
// line 352
echo "\t\t\t\t\t\t\t\t\t<div class=\"image\">
\t\t\t\t\t\t\t\t\t\t<img src=\"";
// line 353
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 353), 353, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 353), 353, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 353) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
\t\t\t\t\t\t\t\t\t</div>
";
} else {
// line 356
echo "<div class=\"image souldout\">
\t\t\t\t\t\t\t\t\t\t<img src=\"";
// line 357
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 357), 357, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 357), 357, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 357) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
\t\t\t\t\t\t\t\t\t</div>
";
}
// line 360
echo "
\t\t\t\t\t\t\t\t\t<p class=\"title\">
\t\t\t\t\t\t\t\t\t\t";
// line 362
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 362), 362, $this->source), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t";
// line 364
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, true, 364))) {
echo "<p class=\"type\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "code_min", [], "any", false, false, true, 364), 364, $this->source), "html", null, true);
echo "</p>";
}
// line 365
echo "
";
// line 371
echo "
";
// line 373
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 373)) {
// line 374
echo "
";
// line 376
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 376))) {
// line 377
echo "<p class=\"price\"><span>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 377), 377, $this->source), "html", null, true);
echo "</span></p>
";
} else {
// line 381
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 381)) {
// line 382
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 382) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 382))) {
// line 383
echo "
\t\t\t\t\t\t\t\t<p class=\"price\"><span>";
// line 384
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 384) == 0)) {
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/textcampaign.twig");
echo "</span>";
} else {
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 384), 384, $this->source)), "html", null, true);
echo "</span>/100冊";
}
echo "</p>
\t\t\t\t\t\t\t";
} else {
// line 387
echo "\t\t\t\t\t\t\t\t<p class=\"price\"><span>";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 387), 387, $this->source)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t";
// line 389
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 389), 389, $this->source)), "html", null, true);
echo "</span>/100冊</p>
\t\t\t\t\t\t\t";
}
// line 391
echo "\t\t\t\t\t\t";
} else {
// line 392
echo " <p class=\"price\"><span>";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 392) == 0)) {
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/textcampaign.twig");
echo "</span>";
} else {
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 392), 392, $this->source)), "html", null, true);
echo "</span>/100冊";
}
echo "</p>
\t\t\t\t\t\t";
}
// line 394
echo "
";
}
// line 396
echo "
";
// line 399
echo " ";
} else {
// line 400
echo "
";
// line 402
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 402))) {
// line 403
echo "<p class=\"price\"><span>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "ViewData", [0 => 11], "method", false, false, true, 403), 403, $this->source), "html", null, true);
echo "</span></p>
";
} else {
// line 406
echo "<p class=\"price\"><span>";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/textcampaign.twig");
echo "</span></p>
";
}
// line 408
echo "
";
}
// line 411
echo "
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t</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 426
echo "
</div>
\t\t\t\t\t</section>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
// line 434
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html", null, true);
echo "\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 435
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 438
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 439
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
";
// line 446
$this->loadTemplate("pager.twig", "Product/list.twig", 446)->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.', 446, $this->source); })()), "paginationData", [], "any", false, false, true, 446)]));
// line 447
echo " </div>
";
}
// line 449
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 ( 1011 => 449, 1007 => 447, 1005 => 446, 993 => 439, 989 => 438, 983 => 435, 979 => 434, 969 => 426, 941 => 411, 937 => 408, 931 => 406, 925 => 403, 923 => 402, 920 => 400, 917 => 399, 913 => 396, 909 => 394, 897 => 392, 894 => 391, 889 => 389, 883 => 387, 871 => 384, 868 => 383, 866 => 382, 864 => 381, 857 => 377, 855 => 376, 852 => 374, 850 => 373, 847 => 371, 840 => 365, 834 => 364, 829 => 362, 825 => 360, 813 => 357, 810 => 356, 798 => 353, 795 => 352, 793 => 351, 788 => 349, 783 => 346, 766 => 345, 759 => 340, 752 => 335, 741 => 333, 736 => 330, 733 => 329, 731 => 328, 719 => 318, 715 => 315, 709 => 313, 703 => 310, 701 => 309, 698 => 307, 695 => 306, 691 => 303, 687 => 301, 675 => 299, 672 => 298, 667 => 296, 661 => 294, 649 => 291, 646 => 290, 644 => 289, 642 => 288, 635 => 284, 633 => 283, 630 => 281, 628 => 280, 625 => 278, 620 => 274, 614 => 273, 609 => 271, 605 => 269, 593 => 266, 590 => 265, 578 => 262, 575 => 261, 573 => 260, 568 => 258, 564 => 256, 561 => 255, 559 => 254, 555 => 252, 544 => 251, 542 => 250, 531 => 241, 529 => 240, 526 => 239, 519 => 234, 517 => 228, 516 => 223, 514 => 221, 510 => 219, 503 => 214, 501 => 208, 500 => 203, 497 => 201, 495 => 200, 492 => 199, 477 => 197, 474 => 196, 471 => 195, 454 => 194, 452 => 193, 449 => 191, 447 => 190, 444 => 189, 442 => 188, 435 => 182, 433 => 181, 429 => 179, 422 => 175, 418 => 174, 414 => 172, 412 => 171, 409 => 170, 403 => 168, 397 => 166, 395 => 165, 386 => 158, 381 => 156, 378 => 155, 375 => 154, 372 => 153, 351 => 150, 345 => 149, 342 => 148, 324 => 147, 322 => 146, 315 => 144, 310 => 141, 298 => 139, 294 => 138, 289 => 137, 285 => 136, 281 => 134, 275 => 131, 272 => 130, 270 => 129, 262 => 123, 252 => 122, 237 => 114, 229 => 108, 224 => 104, 214 => 103, 187 => 82, 177 => 75, 146 => 47, 118 => 21, 104 => 20, 96 => 19, 79 => 18, 75 => 16, 65 => 15, 54 => 11, 52 => 13, 39 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block javascript %}
<script>
eccube.productsClassCategories = {
{% for Product in pagination %}
\"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
{% endfor %}
};
\$(function() {
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
{% endblock %}
{% block pagetitlearea %}
<div class=\"main-top\">
\t\t{# ページタイトル #}
\t\t<div id=\"pagetitle\">
\t\t\t<h2>
\t\t\t\tPRODUCT
\t\t\t\t<small>商品</small>
\t\t\t</h2>
\t\t\t<div class=\"image\">
\t\t\t\t<img src=\"{{ asset('assets/assets/images/pagetitle-image-product.jpg') }}\">
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
{% block main %}
{% if search_form.category_id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
{% for item in search_form %}
<input type=\"hidden\" id=\"{{ item.vars.id }}\"
name=\"{{ item.vars.full_name }}\"
{% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
{% endfor %}
</form>
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
</li>
{% if Category is not null %}
{% for Path in Category.path %}
<li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
</li>
{% endfor %}
{% endif %}
{% if search_form.vars.value and search_form.vars.value.name %}
<li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
{% endif %}
</ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
{% if pagination.totalItemCount > 0 %}
{{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
</div>
{% endif %}
</div>
</div>
{% if pagination.totalItemCount > 0 %}
<section id=\"carender\">
{# タグ:おすすめ商品の商品を1件表示 #}
{% set recomendTag = 13 %}
{% if Category is not null %}
{# 現在のカテゴリ取得 #}
{% set lastCategoryId = null %}
{% for Path in Category.path %}
{% if loop.last %}
{% set lastCategoryId = Path.id %}
{% endif %}
{% endfor %}
{% set desiTag = repository(\"Eccube\\\\Entity\\\\Category\").find(lastCategoryId) %}
{%
set products = repository(\"Eccube\\\\Entity\\\\Product\")
.createQueryBuilder('p')
.innerJoin('p.ProductCategories', 'pc')
.where('pc.Category = :category_id')
.andWhere('p.Status = 1')
.setParameter('category_id', desiTag)
.orderBy('p.update_date', 'DESC')
.setMaxResults(9999)
.getQuery()
.getResult()
%}
{% else %}
{% set desiTag = repository(\"Eccube\\\\Entity\\\\Category\").find(recomendTag) %}
{%
set products = repository(\"Eccube\\\\Entity\\\\Product\")
.createQueryBuilder('p')
.innerJoin('p.ProductCategories', 'pc')
.where('pc.Category = :category_id')
.andWhere('p.Status = 1')
.setParameter('category_id', desiTag)
.orderBy('p.update_date', 'DESC')
.setMaxResults(9999)
.getQuery()
.getResult()
%}
{% endif %}
{% if products %}
\t\t\t\t\t\t<div class=\"recommendation\">
\t\t\t\t\t\t\t<p class=\"title\">カテゴリ別おすすめ商品</p>
\t<div class=\"contents\">
{% set break = false %}
{% for Product in products if not break %}
{% set hasCategory = Product.ProductCategories|filter(pc => pc.Category.id == recomendTag)|length > 0 %}
{% if hasCategory %}
<div class=\"block\">
\t\t\t\t\t\t\t\t <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
{% if Product.stock_find %}
\t\t\t\t\t\t\t\t\t<div class=\"image\">
\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
\t\t\t\t\t\t\t\t\t</div>
{% else %}
<div class=\"image souldout\">
\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
\t\t\t\t\t\t\t\t\t</div>
{% endif %}
\t\t\t\t\t\t\t\t\t<p class=\"title\">
\t\t\t\t\t\t\t\t\t\t{{ Product.name }}
\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t{% if Product.code_min is not empty %}<p class=\"type\">{{ Product.code_min }}</p>{% endif %}
{# 価格表示ここから #}
{# 在庫があるかどうか #}
{% if Product.stock_find %}
{# 販売価格にテキストがあるかどうか #}
{% if Product.ViewData(11) is not empty %}
<p class=\"price\"><span>{{Product.ViewData(11)}}</span></p>
{# 販売価格にテキストがない場合価格を表示 0円の場合は準備中のテキストを表示 #}
{% else %}
{% if Product.hasProductClass -%}
\t\t\t\t\t\t\t{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
\t\t\t\t\t\t\t\t<p class=\"price\"><span>{% if Product.getPrice02IncTaxMin == 0 %}{{ include('Block/textcampaign.twig') }}</span>{% else %}{{ Product.getPrice02IncTaxMin|price }}</span>/100冊{% endif %}</p>
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<p class=\"price\"><span>{{ Product.getPrice02IncTaxMin|price }}
\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMax|price }}</span>/100冊</p>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% else %}
<p class=\"price\"><span>{% if Product.getPrice02IncTaxMin == 0 %}{{ include('Block/textcampaign.twig') }}</span>{% else %}{{ Product.getPrice02IncTaxMin|price }}</span>/100冊{% endif %}</p>
\t\t\t\t\t\t{% endif %}
{% endif %}
{# 在庫がない場合 #}
{% else %}
{# 販売価格にテキストがあるかどうか #}
{% if Product.ViewData(11) is not empty %}
<p class=\"price\"><span>{{Product.ViewData(11)}}</span></p>
{# 販売価格にテキストがない場合 #}
{% else %}
<p class=\"price\"><span>{{ include('Block/textcampaign.twig') }}</span></p>
{% endif %}
{% endif %}
{# 価格表示ここまで #}
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t</div>
{% set break = true %}
{% else %}
{% endif %}
{% endfor %}
</div>
\t\t\t\t\t\t
\t\t\t\t\t\t</div>
{% endif %}
\t\t\t\t\t\t
\t\t\t\t\t\t<div class=\"contents\">
{% for Product in pagination %}
<div class=\"block\">
\t\t\t\t\t\t\t\t <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
{% if Product.stock_find %}
\t\t\t\t\t\t\t\t\t<div class=\"image\">
\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
\t\t\t\t\t\t\t\t\t</div>
{% else %}
<div class=\"image souldout\">
\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
\t\t\t\t\t\t\t\t\t</div>
{% endif %}
\t\t\t\t\t\t\t\t\t<p class=\"title\">
\t\t\t\t\t\t\t\t\t\t{{ Product.name }}
\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t{% if Product.code_min is not empty %}<p class=\"type\">{{ Product.code_min }}</p>{% endif %}
{# 価格表示ここから #}
{# 在庫があるかどうか #}
{% if Product.stock_find %}
{# 販売価格にテキストがあるかどうか #}
{% if Product.ViewData(11) is not empty %}
<p class=\"price\"><span>{{Product.ViewData(11)}}</span></p>
{# 販売価格にテキストがない場合価格を表示 0円の場合は準備中のテキストを表示 #}
{% else %}
{% if Product.hasProductClass -%}
\t\t\t\t\t\t\t{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
\t\t\t\t\t\t\t\t<p class=\"price\"><span>{% if Product.getPrice02IncTaxMin == 0 %}{{ include('Block/textcampaign.twig') }}</span>{% else %}{{ Product.getPrice02IncTaxMin|price }}</span>/100冊{% endif %}</p>
\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t<p class=\"price\"><span>{{ Product.getPrice02IncTaxMin|price }}
\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMax|price }}</span>/100冊</p>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% else %}
<p class=\"price\"><span>{% if Product.getPrice02IncTaxMin == 0 %}{{ include('Block/textcampaign.twig') }}</span>{% else %}{{ Product.getPrice02IncTaxMin|price }}</span>/100冊{% endif %}</p>
\t\t\t\t\t\t{% endif %}
{% endif %}
{# 在庫がない場合 #}
{% else %}
{# 販売価格にテキストがあるかどうか #}
{% if Product.ViewData(11) is not empty %}
<p class=\"price\"><span>{{Product.ViewData(11)}}</span></p>
{# 販売価格にテキストがない場合 #}
{% else %}
<p class=\"price\"><span>{{ include('Block/textcampaign.twig') }}</span></p>
{% endif %}
{% endif %}
{# 価格表示ここまで #}
\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t</div>
{% endfor %}
</div>
\t\t\t\t\t</section>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}", "Product/list.twig", "/home/dennou28/kinkodo-calendar.com/public_html/app/template/kinkodo/Product/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "for" => 18, "if" => 19, "include" => 446);
static $filters = array("escape" => 19, "raw" => 19, "trans" => 47, "length" => 129, "filter" => 254, "no_image_product" => 262, "price" => 291);
static $functions = array("class_categories_as_json" => 19, "url" => 75, "asset" => 114, "form_widget" => 174, "repository" => 200, "include" => 291);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'filter', 'no_image_product', 'price'],
['class_categories_as_json', 'url', 'asset', 'form_widget', 'repository', 'include']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}