<?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_186e8d5452f3572b3c0cf8820639c5e3 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'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Product/list.twig"));
// line 14
$context["body_class"] = "product_page";
// line 92
$context["category_id"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 92, $this->source); })()), "request", [], "any", false, false, false, 92), "query", [], "any", false, false, false, 92), "get", [0 => "category_id"], "method", false, false, false, 92);
// line 94
$context["page_type_name"] = (((isset($context["category_id"]) || array_key_exists("category_id", $context) ? $context["category_id"] : (function () { throw new RuntimeError('Variable "category_id" does not exist.', 94, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [0 => (isset($context["category_id"]) || array_key_exists("category_id", $context) ? $context["category_id"] : (function () { throw new RuntimeError('Variable "category_id" does not exist.', 94, $this->source); })())], "method", false, false, false, 94)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 94, $this->source); })()), "request", [], "any", false, false, false, 94), "query", [], "any", false, false, false, 94), "get", [0 => "name"], "method", false, false, false, 94)));
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Product/list.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 16
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 17
echo "\t<script>
\t\teccube.productsClassCategories = {
";
// line 19
$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.', 19, $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 20
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, 20), "js"), "html", null, true);
echo "\" : ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
echo "
";
// line 21
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 21) == false)) {
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 22
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 46
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 70
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 74
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()
});
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 97
public function block_breadcrumb($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
// line 98
echo "\t<div class=\"breadcrumb-root\">
\t\t<div class=\"breadcrumb-wrapper container\">
\t\t\t<ul>
\t\t\t\t<li>
\t\t\t\t\t<a href=\"";
// line 102
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\">
\t\t\t\t\t\tトップ
\t\t\t\t\t</a>
\t\t\t\t\t<svg width=\"5\" height=\"8\" viewbox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
\t\t\t\t\t\t<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
\t\t\t\t\t</svg>
\t\t\t\t\t<span>
\t\t\t\t\t\t";
// line 109
echo twig_escape_filter($this->env, (isset($context["page_type_name"]) || array_key_exists("page_type_name", $context) ? $context["page_type_name"] : (function () { throw new RuntimeError('Variable "page_type_name" does not exist.', 109, $this->source); })()), "html", null, true);
echo "
\t\t\t\t\t</span>
\t\t\t\t</li>
\t\t\t</ul>
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 117
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 118
echo "\t<div class=\"xs-gutter\">
\t\t<h2 class=\"product-list-page-title\">
\t\t\t";
// line 120
echo twig_escape_filter($this->env, (isset($context["page_type_name"]) || array_key_exists("page_type_name", $context) ? $context["page_type_name"] : (function () { throw new RuntimeError('Variable "page_type_name" does not exist.', 120, $this->source); })()), "html", null, true);
echo "
\t\t</h2>
\t\t";
// line 122
if ((isset($context["category_id"]) || array_key_exists("category_id", $context) ? $context["category_id"] : (function () { throw new RuntimeError('Variable "category_id" does not exist.', 122, $this->source); })())) {
// line 123
echo "\t\t\t<p class=\"product-list-page-description\">
\t\t\t\t";
// line 124
echo twig_get_attribute($this->env, $this->source, (isset($context["page_type_name"]) || array_key_exists("page_type_name", $context) ? $context["page_type_name"] : (function () { throw new RuntimeError('Variable "page_type_name" does not exist.', 124, $this->source); })()), "description", [], "any", false, false, false, 124);
echo "
\t\t\t</p>
\t\t";
}
// line 127
echo "\t</div>
\t";
// line 130
echo "\t<div class=\"d-lg-none mt-6\">
\t\t<img src=\"";
// line 131
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/sm-toujitu-banner2.png", "user_data"), "html", null, true);
echo "\" alt=\"12時までのご注文で当日発送\" width=\"390\" height=\"auto\" class=\"w-100\"/>
\t</div>
\t";
// line 135
echo "\t<div
\t\tclass=\"page-content-root mt-9 mt-md-15\">
\t\t";
// line 138
echo "\t\t";
if ( !twig_test_empty((isset($context["category_id"]) || array_key_exists("category_id", $context) ? $context["category_id"] : (function () { throw new RuntimeError('Variable "category_id" does not exist.', 138, $this->source); })()))) {
// line 139
echo "\t\t\t";
echo twig_include($this->env, $context, "Block/category_list_child.twig", ["category" => // line 140
(isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 140, $this->source); })())]);
echo "
\t\t";
} else {
// line 142
echo "\t\t\t";
// line 143
echo "\t\t\t";
echo twig_include($this->env, $context, "Block/category_list.twig", ["label" => "カテゴリーから探す", "href_label" => "すべてのカテゴリーを見る"]);
echo "
\t\t";
}
// line 145
echo "\t\t<div>
\t\t\t";
// line 146
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.', 146, $this->source); })()), "category_id", [], "any", false, false, false, 146), "vars", [], "any", false, false, false, 146), "errors", [], "any", false, false, false, 146)) > 0)) {
// line 147
echo "\t\t\t\t<div class=\"ec-searchnavRole xs-gutter\">
\t\t\t\t\t<p class=\"errormsg text-danger\">";
// line 148
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
\t\t\t\t</div>
\t\t\t";
} else {
// line 151
echo "\t\t\t\t<div>
\t\t\t\t\t<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
\t\t\t\t\t\t";
// line 153
$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.', 153, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 154
echo "\t\t\t\t\t\t\t<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, 154), "id", [], "any", false, false, false, 154), "html", null, true);
echo "\" name=\"";
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, 154), "full_name", [], "any", false, false, false, 154), "html", null, true);
echo "\" ";
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, 154), "value", [], "any", false, false, false, 154))) {
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, 154), "value", [], "any", false, false, false, 154), "html", null, true);
echo "\" ";
}
echo "/>
\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 156
echo "\t\t\t\t\t</form>
\t\t\t\t\t";
// line 159
echo "\t\t\t\t\t<div>
\t\t\t\t\t\t<h2 class=\"section-heading mb-4 xs-gutter\">";
// line 160
echo twig_escape_filter($this->env, (isset($context["page_type_name"]) || array_key_exists("page_type_name", $context) ? $context["page_type_name"] : (function () { throw new RuntimeError('Variable "page_type_name" does not exist.', 160, $this->source); })()), "html", null, true);
echo "商品一覧</h2>
\t\t\t\t\t\t<div class=\"product-list-page-list-header\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t検索結果
\t\t\t\t\t\t\t\t";
// line 164
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.', 164, $this->source); })()), "category_id", [], "any", false, false, false, 164), "vars", [], "any", false, false, false, 164), "errors", [], "any", false, false, false, 164)) > 0)) {
// line 165
echo "\t\t\t\t\t\t\t\t\t<span class=\"product-list-page-list-header-label\">0</span>
\t\t\t\t\t\t\t\t";
} else {
// line 167
echo "\t\t\t\t\t\t\t\t\t<span class=\"product-list-page-list-header-label\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 167, $this->source); })()), "totalItemCount", [], "any", false, false, false, 167), "html", null, true);
echo "</span>
\t\t\t\t\t\t\t\t";
}
// line 169
echo "\t\t\t\t\t\t\t\t件
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
// 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, false, 171) > 0)) {
// line 172
echo "\t\t\t\t\t\t\t\t<div class=\"ec-select-custom\">
\t\t\t\t\t\t\t\t\t";
// line 173
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.', 173, $this->source); })()), "disp_number", [], "any", false, false, false, 173), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
\t\t\t\t\t\t\t\t\t";
// line 174
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.', 174, $this->source); })()), "orderby", [], "any", false, false, false, 174), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
}
// line 177
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t";
// line 180
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.', 180, $this->source); })()), "totalItemCount", [], "any", false, false, false, 180) > 0)) {
// line 181
echo "\t\t\t\t\t<div class=\"product-list-page-products-container\">
\t\t\t\t\t\t";
// line 182
$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.', 182, $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 183
echo "\t\t\t\t\t\t\t<a href=\"";
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, 183)]), "html", null, true);
echo "\" class=\"product-list-page-products-item\">
\t\t\t\t\t\t\t\t<div class=\"product-list-page-products-item__image\">
\t\t\t\t\t\t\t\t\t<img src=\"";
// line 185
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, 185)), "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, 185), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 185) > 5)) {
echo " loading=\"lazy\" ";
}
echo ">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"flex-1\">
\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item__name\">";
// line 188
echo twig_escape_filter($this->env, twig_striptags(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 188)), "html", null, true);
echo "</p>
\t\t\t\t\t\t\t\t\t";
// line 189
if (twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 189)) {
// line 190
echo "\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item__description_list\">";
echo twig_escape_filter($this->env, twig_striptags(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 190)), "html", null, true);
echo "</p>
\t\t\t\t\t\t\t\t\t";
}
// line 193
echo "\t\t\t\t\t\t\t\t\t<div class=\"product-list-page-products-item-price\">
\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item-price__number \">
\t\t\t\t\t\t\t\t\t\t\t";
// line 195
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, false, 195)) {
// line 196
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, false, 196) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, false, 196))) {
// line 197
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
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, 197)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 199
echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 199)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 201
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, 201)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 203
echo "\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 204
echo "\t\t\t\t\t\t\t\t\t\t\t\t";
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, 204)), "html", null, true);
echo "
\t\t\t\t\t\t\t\t\t\t\t";
}
// line 206
echo "\t\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item-price__yen\">
\t\t\t\t\t\t\t\t\t\t\t円
\t\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t\t";
// line 211
echo "\t\t\t\t\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 211) > twig_get_attribute($this->env, $this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo", $context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.', 211, $this->source); })()), "delivery_free_amount", [], "any", false, false, false, 211))) {
// line 212
echo "\t\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item-price__freeship\">
\t\t\t\t\t\t\t\t\t\t\t\t送料無料
\t\t\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t\t";
}
// line 216
echo "\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t";
++$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 220
echo "\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"ec-pagerRole mt-7 mt-lg-10\">
\t\t\t\t\t\t";
// line 223
$this->loadTemplate("Block/pager.twig", "Product/list.twig", 223)->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.', 223, $this->source); })()), "paginationData", [], "any", false, false, false, 223)]));
// line 224
echo "\t\t\t\t\t</div>
\t\t\t\t";
} else {
// line 226
echo "\t\t\t\t\t<div class=\"ec-searchnavRole xs-gutter\">
\t\t\t\t\t\t<p class=\"errormsg text-danger mt-4\">";
// line 227
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("検索条件に該当する商品はありませんでした。"), "html", null, true);
echo "</p>
\t\t\t\t\t</div>
\t\t\t\t";
}
// line 230
echo "\t\t\t";
}
// line 231
echo "\t\t</div>
\t\t";
// line 234
echo "\t\t<div class=\"d-none d-md-block\">
\t\t\t";
// line 235
echo twig_include($this->env, $context, "Block/large-banners.twig");
echo "
\t\t</div>
\t\t";
// line 238
echo "\t\t";
echo twig_include($this->env, $context, "Block/recommend_list.twig", ["label" => "おすすめ当店在庫品", "category_id" => 32]);
echo "
\t\t";
// line 240
echo "\t\t<div class=\"d-none d-md-block\">
\t\t\t";
// line 241
echo twig_include($this->env, $context, "Block/makers.twig");
echo "
\t\t</div>
\t\t<div class=\"d-md-none\">
\t\t\t";
// line 245
echo twig_include($this->env, $context, "Block/large-banners.twig");
echo "
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Product/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 573 => 245, 566 => 241, 563 => 240, 558 => 238, 553 => 235, 550 => 234, 546 => 231, 543 => 230, 537 => 227, 534 => 226, 530 => 224, 528 => 223, 523 => 220, 506 => 216, 500 => 212, 497 => 211, 491 => 206, 485 => 204, 482 => 203, 477 => 201, 471 => 199, 465 => 197, 462 => 196, 460 => 195, 456 => 193, 449 => 190, 447 => 189, 443 => 188, 431 => 185, 425 => 183, 408 => 182, 405 => 181, 403 => 180, 398 => 177, 392 => 174, 388 => 173, 385 => 172, 383 => 171, 379 => 169, 373 => 167, 369 => 165, 367 => 164, 360 => 160, 357 => 159, 353 => 156, 336 => 154, 332 => 153, 328 => 151, 322 => 148, 319 => 147, 317 => 146, 314 => 145, 308 => 143, 306 => 142, 301 => 140, 299 => 139, 296 => 138, 292 => 135, 286 => 131, 283 => 130, 279 => 127, 273 => 124, 270 => 123, 268 => 122, 263 => 120, 259 => 118, 249 => 117, 232 => 109, 222 => 102, 216 => 98, 206 => 97, 181 => 74, 174 => 70, 147 => 46, 121 => 22, 105 => 21, 98 => 20, 81 => 19, 77 => 17, 67 => 16, 56 => 11, 54 => 94, 52 => 92, 50 => 14, 37 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block javascript %}
\t<script>
\t\teccube.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()
});
\t</script>
{% endblock %}
{# カテゴリページ #}
{% set category_id = app.request.query.get('category_id') %}
{# カテゴリまたは検索クエリ #}
{% set page_type_name = category_id ? repository('Eccube\\\\Entity\\\\Category').find(category_id) : app.request.query.get('name') %}
{% block breadcrumb %}
\t<div class=\"breadcrumb-root\">
\t\t<div class=\"breadcrumb-wrapper container\">
\t\t\t<ul>
\t\t\t\t<li>
\t\t\t\t\t<a href=\"{{ url('homepage') }}\">
\t\t\t\t\t\tトップ
\t\t\t\t\t</a>
\t\t\t\t\t<svg width=\"5\" height=\"8\" viewbox=\"0 0 5 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
\t\t\t\t\t\t<path d=\"M0.90918 1L3.63645 4L0.90918 7\" stroke=\"#1A1A1A\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>
\t\t\t\t\t</svg>
\t\t\t\t\t<span>
\t\t\t\t\t\t{{ page_type_name }}
\t\t\t\t\t</span>
\t\t\t\t</li>
\t\t\t</ul>
\t\t</div>
\t</div>
{% endblock %}
{% block main %}
\t<div class=\"xs-gutter\">
\t\t<h2 class=\"product-list-page-title\">
\t\t\t{{ page_type_name }}
\t\t</h2>
\t\t{% if category_id %}
\t\t\t<p class=\"product-list-page-description\">
\t\t\t\t{{ page_type_name.description|raw }}
\t\t\t</p>
\t\t{% endif %}
\t</div>
\t{# SP用バナー #}
\t<div class=\"d-lg-none mt-6\">
\t\t<img src=\"{{ asset('assets/img/sm-toujitu-banner2.png','user_data') }}\" alt=\"12時までのご注文で当日発送\" width=\"390\" height=\"auto\" class=\"w-100\"/>
\t</div>
\t{# コンテンツ #}
\t<div
\t\tclass=\"page-content-root mt-9 mt-md-15\">
\t\t{# カテゴリページなら子カテゴリ用のテンプレートを読み込む - カテゴリページならばcategory_idがURLに含まれている #}
\t\t{% if category_id is not empty %}
\t\t\t{{ include('Block/category_list_child.twig', {
category: Category}) }}
\t\t{% else %}
\t\t\t{# 検索結果ページの場合はデフォルトのカテゴリリストを表示 #}
\t\t\t{{ include('Block/category_list.twig', {label: 'カテゴリーから探す', href_label: 'すべてのカテゴリーを見る'}) }}
\t\t{% endif %}
\t\t<div>
\t\t\t{% if search_form.category_id.vars.errors|length > 0 %}
\t\t\t\t<div class=\"ec-searchnavRole xs-gutter\">
\t\t\t\t\t<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
\t\t\t\t</div>
\t\t\t{% else %}
\t\t\t\t<div>
\t\t\t\t\t<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
\t\t\t\t\t\t{% for item in search_form %}
\t\t\t\t\t\t\t<input type=\"hidden\" id=\"{{ item.vars.id }}\" name=\"{{ item.vars.full_name }}\" {% if item.vars.value is not empty %} value=\"{{ item.vars.value }}\" {% endif %}/>
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t</form>
\t\t\t\t\t{# 商品一覧のタイトルと件数とSelect #}
\t\t\t\t\t<div>
\t\t\t\t\t\t<h2 class=\"section-heading mb-4 xs-gutter\">{{ page_type_name }}商品一覧</h2>
\t\t\t\t\t\t<div class=\"product-list-page-list-header\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t検索結果
\t\t\t\t\t\t\t\t{% if search_form.category_id.vars.errors|length > 0 %}
\t\t\t\t\t\t\t\t\t<span class=\"product-list-page-list-header-label\">0</span>
\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t<span class=\"product-list-page-list-header-label\">{{ pagination.totalItemCount }}</span>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t件
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% if pagination.totalItemCount > 0 %}
\t\t\t\t\t\t\t\t<div class=\"ec-select-custom\">
\t\t\t\t\t\t\t\t\t{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
\t\t\t\t\t\t\t\t\t{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t{% if pagination.totalItemCount > 0 %}
\t\t\t\t\t<div class=\"product-list-page-products-container\">
\t\t\t\t\t\t{% for Product in pagination %}
\t\t\t\t\t\t\t<a href=\"{{ url('product_detail', {'id': Product.id}) }}\" class=\"product-list-page-products-item\">
\t\t\t\t\t\t\t\t<div class=\"product-list-page-products-item__image\">
\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</div>
\t\t\t\t\t\t\t\t<div class=\"flex-1\">
\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item__name\">{{ Product.name|striptags }}</p>
\t\t\t\t\t\t\t\t\t{% if Product.description_list %}
\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item__description_list\">{{ Product.description_list|striptags }}</p>
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t<div class=\"product-list-page-products-item-price\">
\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item-price__number \">
\t\t\t\t\t\t\t\t\t\t\t{% if Product.hasProductClass %}
\t\t\t\t\t\t\t\t\t\t\t\t{% if Product.getPrice02Min == Product.getPrice02Max %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMin|number_format }}
\t\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMin|price }}
\t\t\t\t\t\t\t\t\t\t\t\t\t~
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMax|number_format }}
\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMin|number_format }}
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item-price__yen\">
\t\t\t\t\t\t\t\t\t\t\t円
\t\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t\t{# 送料無料条件よりも商品価格が上だったら表示 9,800 #}
\t\t\t\t\t\t\t\t\t\t{% if Product.getPrice02IncTaxMin > BaseInfo.delivery_free_amount %}
\t\t\t\t\t\t\t\t\t\t\t<p class=\"product-list-page-products-item-price__freeship\">
\t\t\t\t\t\t\t\t\t\t\t\t送料無料
\t\t\t\t\t\t\t\t\t\t\t</p>
\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"ec-pagerRole mt-7 mt-lg-10\">
\t\t\t\t\t\t{% include \"Block/pager.twig\" with {'pages': pagination.paginationData} %}
\t\t\t\t\t</div>
\t\t\t\t{% else %}
\t\t\t\t\t<div class=\"ec-searchnavRole xs-gutter\">
\t\t\t\t\t\t<p class=\"errormsg text-danger mt-4\">{{ '検索条件に該当する商品はありませんでした。'|trans }}</p>
\t\t\t\t\t</div>
\t\t\t\t{% endif %}
\t\t\t{% endif %}
\t\t</div>
\t\t{# 当日発送・送料無料 PC only #}
\t\t<div class=\"d-none d-md-block\">
\t\t\t{{ include('Block/large-banners.twig') }}
\t\t</div>
\t\t{# おすすめ当店在庫品 #}
\t\t{{ include('Block/recommend_list.twig', {label: 'おすすめ当店在庫品', category_id: 32}) }}
\t\t{# 取り扱いメーカー #}
\t\t<div class=\"d-none d-md-block\">
\t\t\t{{ include('Block/makers.twig') }}
\t\t</div>
\t\t<div class=\"d-md-none\">
\t\t\t{{ include('Block/large-banners.twig') }}
\t\t</div>
\t</div>
{% endblock %}
", "Product/list.twig", "/home/xs804421/stg.denzai-bluewood.com/public_html/app/template/default/Product/list.twig");
}
}