<?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_61e063a7d11ce1e21b442d25fa2aeb1cb0926c41c43bd9a1c15a11a4c8c91565 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_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 101
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 102
echo " <!-- PAGE CONTENTS -->
<div class=\"products productsIndex\">
<section class=\"sub-container\">
<!-- H1 商品カテゴリーの見出し -->
<div class=\"sub-h1--products\">
<h1 class=\"itemTitle\" style=\"color: #221613;\">
";
// line 108
if ((array_key_exists("subtitle", $context) && !twig_test_empty((isset($context["subtitle"]) || array_key_exists("subtitle", $context) ? $context["subtitle"] : (function () { throw new RuntimeError('Variable "subtitle" does not exist.', 108, $this->source); })())))) {
// line 109
echo " ";
// line 110
echo " ";
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 110, $this->source); })()))) {
// line 111
echo " ";
// line 112
echo " ";
if ( !(null === 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.', 112, $this->source); })()), "Parent", [], "any", false, false, true, 112))) {
// line 113
echo " ";
// line 114
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 114, $this->source); })()), "Parent", [], "any", false, false, true, 114), "name", [], "any", false, false, true, 114), 114, $this->source), "html", null, true);
echo "
";
}
// line 116
echo " ";
}
// line 117
echo "
";
// line 118
if (((isset($context["subtitle"]) || array_key_exists("subtitle", $context) ? $context["subtitle"] : (function () { throw new RuntimeError('Variable "subtitle" does not exist.', 118, $this->source); })()) == "全商品")) {
// line 119
echo " 商品一覧
";
} else {
// line 121
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["subtitle"]) || array_key_exists("subtitle", $context) ? $context["subtitle"] : (function () { throw new RuntimeError('Variable "subtitle" does not exist.', 121, $this->source); })()), 121, $this->source), "html", null, true);
echo "
";
}
// line 123
echo "
";
} elseif (( // line 124
array_key_exists("title", $context) && !twig_test_empty((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 124, $this->source); })())))) {
// line 125
echo " ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 125, $this->source); })()), 125, $this->source), "html", null, true);
echo "
";
}
// line 127
echo " </h1>
<div class=\"itemImg\">
<div class=\"itemImgInner\">
<img src=\"";
// line 130
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/products/sub_h1_02.jpg"), "html", null, true);
echo "\" alt=\"香り芽本舗の商品一覧\" class=\"imgObjectFitCover\">
</div>
</div>
</div>
<!-- /H1 -->
<!-- CONTENTS -->
<div class=\"l-container l-2ColumnContainer\">
<!-- MAIN-CONTENTS -->
<div class=\"l-main\">
<!-- BREAD CRUMBS -->
<div class=\"sub-breadcrumbsWrap\">
<ul class=\"sub-breadcrumbs\">
<li><a href=\"#\">TOP</a></li>
<li>商品一覧</li>
</ul>
</div>
<!-- /BREAD CRUMBS -->
<!-- MAIN CONTENTS -->
<section>
";
// line 149
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.', 149, $this->source); })()), "category_id", [], "any", false, false, true, 149), "vars", [], "any", false, false, true, 149), "errors", [], "any", false, false, true, 149)) > 0)) {
// line 150
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 151
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 154
echo "
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 157
$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.', 157, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 158
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, 158), "id", [], "any", false, false, true, 158), 158, $this->source), "html", null, true);
echo "\"
name=\"";
// line 159
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, 159), "full_name", [], "any", false, false, true, 159), 159, $this->source), "html", null, true);
echo "\"
";
// line 160
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, 160), "value", [], "any", false, false, true, 160))) {
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, 160), "value", [], "any", false, false, true, 160), 160, $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 162
echo " </form>
</div>
<!-- HED -->
<div class=\"products-listHed\">
<h2 class=\"mod-hl-01\">商品一覧</h2>
<div class=\"boxSortBtnWrap\">
";
// line 169
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.', 169, $this->source); })()), "totalItemCount", [], "any", false, false, true, 169) > 0)) {
// line 170
echo " <div class=\"boxSortBtn boxSortBtn-number\">
";
// line 171
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.', 171, $this->source); })()), "disp_number", [], "any", false, false, true, 171), 171, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number mod-form-select form-control"]]);
echo "
</div>
<div class=\"boxSortBtn boxSortBtn-orderBy\">
";
// 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); })()), "orderby", [], "any", false, false, true, 174), 174, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by mod-form-select form-control"]]);
echo "
</div>
";
}
// line 177
echo " </div>
</div>
<!-- /HED -->
<div class=\"ec-searchnavRole__infos marginBottom40\">
<div class=\"ec-searchnavRole__counter\">
";
// line 183
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.', 183, $this->source); })()), "totalItemCount", [], "any", false, false, true, 183) > 0)) {
// line 184
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.', 184, $this->source); })()), "totalItemCount", [], "any", false, false, true, 184)]);
echo "
";
} else {
// line 186
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 188
echo " </div>
</div>
<!-- LIST -->
<div class=\"products-listList mod-productsBoxContainer\">
";
// line 195
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.', 195, $this->source); })()), "totalItemCount", [], "any", false, false, true, 195) > 0)) {
// line 196
echo "
";
// line 197
$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.', 197, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 198
echo " <!-- BOX -->
<article class=\"mod-productsBox\">
<a href=\"";
// line 200
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, 200)]), "html", null, true);
echo "\" class=\"mod-productsBoxInner\">
<span class=\"boxImg\">
<span class=\"boxImgInner\">
<img src=\"";
// line 203
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, 203), 203, $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, 203), 203, $this->source), "html", null, true);
echo "\" class=\"imgObjectFitCover\" loading=\"lazy\">
</span>
</span>
<div class=\"boxData\">
<h3 class=\"name\">";
// line 207
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 207), 207, $this->source), "html", null, true);
echo "</h3>
";
// line 210
echo " <p class=\"price\">
";
// line 211
if ( !(null === twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01Min", [], "any", false, false, true, 211))) {
// line 212
echo " ";
$context["priceClass"] = "color: #f00;font-weight: bold;font-size: 17px;text-align:right;";
// line 213
echo " ";
} else {
// line 214
echo " ";
$context["priceClass"] = "";
// line 215
echo " ";
}
// line 216
echo " <div style=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["priceClass"]) || array_key_exists("priceClass", $context) ? $context["priceClass"] : (function () { throw new RuntimeError('Variable "priceClass" does not exist.', 216, $this->source); })()), 216, $this->source), "html", null, true);
echo "\">
";
// line 217
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 217)) {
// line 218
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 218) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 218))) {
// line 219
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 219), 219, $this->source)), "html", null, true);
echo "
";
} else {
// line 221
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 221), 221, $this->source)), "html", null, true);
echo "
~
";
// line 223
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 223), 223, $this->source)), "html", null, true);
echo "
";
}
// line 225
echo " 円
<small class=\"isSmall\" style=\"font-size: 15px;\">(税込)</small>
";
} else {
// line 228
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 228), 228, $this->source)), "html", null, true);
echo "
円
<small class=\"isSmall\" style=\"font-size: 15px;\">(税込)</small>
";
}
// line 232
echo " </div>
<div class=\"font13 textRight\" style=\"margin-top:10px;text-decoration: line-through;\">
";
// line 235
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 235)) {
// line 236
echo " <div>
";
// line 237
if (( !(null === twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01Min", [], "any", false, false, true, 237)) && (twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMin", [], "any", false, false, true, 237) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMax", [], "any", false, false, true, 237)))) {
// line 238
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMin", [], "any", false, false, true, 238), 238, $this->source)), "html", null, true);
echo "円
<span class=\"tax\">(税込)</span>
";
} elseif (( !(null === twig_get_attribute($this->env, $this->source, // line 240
$context["Product"], "getPrice01Min", [], "any", false, false, true, 240)) && !(null === twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01Max", [], "any", false, false, true, 240)))) {
// line 241
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMin", [], "any", false, false, true, 241), 241, $this->source)), "html", null, true);
echo "~ ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMax", [], "any", false, false, true, 241), 241, $this->source)), "html", null, true);
echo "円
<span class=\"tax\">(税込)</span>
";
}
// line 244
echo " </div>
";
} else {
// line 246
echo " ";
if ( !(null === twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01Max", [], "any", false, false, true, 246))) {
// line 247
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice01IncTaxMin", [], "any", false, false, true, 247), 247, $this->source)), "html", null, true);
echo "円
<span class=\"tax\">(税込)</span>
";
}
// line 250
echo " ";
}
// line 251
echo " </div>
</p>
";
// line 255
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 255)) {
// line 256
echo " ";
} else {
// line 257
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 259
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 263
echo " </div>
</a>
</article>
<!-- /BOX -->
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 268
echo "
";
}
// line 270
echo "
</div>
<!-- /LIST -->
<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 277
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 278
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 281
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 282
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>
";
}
// line 289
echo " </section>
<!-- /MAIN CONTENTS -->
<!-- PAGINATION -->
";
// line 294
$this->loadTemplate("pager.twig", "Product/list.twig", 294)->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.', 294, $this->source); })()), "paginationData", [], "any", false, false, true, 294)]));
// line 295
echo " <!-- /PAGINATION -->
";
// line 297
if (twig_get_attribute($this->env, $this->source, (isset($context["Layout"]) || array_key_exists("Layout", $context) ? $context["Layout"] : (function () { throw new RuntimeError('Variable "Layout" does not exist.', 297, $this->source); })()), "MainBottom", [], "any", false, false, true, 297)) {
// line 298
echo " ";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "block.twig", ["Blocks" => twig_get_attribute($this->env, $this->source, (isset($context["Layout"]) || array_key_exists("Layout", $context) ? $context["Layout"] : (function () { throw new RuntimeError('Variable "Layout" does not exist.', 298, $this->source); })()), "MainBottom", [], "any", false, false, true, 298)]);
echo "
";
}
// line 300
echo "
</div>
<!-- /MAIN-CONTENTS -->
<!-- SIDE-CONTENTS -->
";
// line 305
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/side_menu.twig");
echo "
<!-- /SIDE-CONTENTS -->
</div>
<!-- /CONTENTS -->
</section>
</div>
<!-- /PAGE CONTENTS -->
<style>
.ec-blockBtn--action {
height: 30px;
line-height: 100%;
margin-top: 15px;
font-size: 12px;
}
</style>
";
$__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 ( 640 => 305, 633 => 300, 627 => 298, 625 => 297, 621 => 295, 619 => 294, 612 => 289, 600 => 282, 596 => 281, 590 => 278, 586 => 277, 577 => 270, 573 => 268, 563 => 263, 556 => 259, 552 => 257, 549 => 256, 547 => 255, 541 => 251, 538 => 250, 531 => 247, 528 => 246, 524 => 244, 515 => 241, 513 => 240, 507 => 238, 505 => 237, 502 => 236, 500 => 235, 495 => 232, 487 => 228, 482 => 225, 477 => 223, 471 => 221, 465 => 219, 462 => 218, 460 => 217, 455 => 216, 452 => 215, 449 => 214, 446 => 213, 443 => 212, 441 => 211, 438 => 210, 433 => 207, 424 => 203, 418 => 200, 414 => 198, 410 => 197, 407 => 196, 405 => 195, 396 => 188, 390 => 186, 384 => 184, 382 => 183, 374 => 177, 368 => 174, 362 => 171, 359 => 170, 357 => 169, 348 => 162, 336 => 160, 332 => 159, 327 => 158, 323 => 157, 318 => 154, 312 => 151, 309 => 150, 307 => 149, 285 => 130, 280 => 127, 274 => 125, 272 => 124, 269 => 123, 263 => 121, 259 => 119, 257 => 118, 254 => 117, 251 => 116, 245 => 114, 243 => 113, 240 => 112, 238 => 111, 235 => 110, 233 => 109, 231 => 108, 223 => 102, 213 => 101, 186 => 82, 176 => 75, 145 => 47, 117 => 21, 103 => 20, 95 => 19, 78 => 18, 74 => 16, 64 => 15, 53 => 11, 51 => 13, 38 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% 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 main %}
<!-- PAGE CONTENTS -->
<div class=\"products productsIndex\">
<section class=\"sub-container\">
<!-- H1 商品カテゴリーの見出し -->
<div class=\"sub-h1--products\">
<h1 class=\"itemTitle\" style=\"color: #221613;\">
{% if subtitle is defined and subtitle is not empty %}
{# 「全商品」を除外 #}
{% if Category is not null %}
{# 親カテゴリ(「個人印鑑」など)を除外 #}
{% if Category.Parent is not null %}
{# 子カテゴリ(「実印」など)にのみ適用 #}
{{ Category.Parent.name }}
{% endif %}
{% endif %}
{% if(subtitle == \"全商品\") %}
商品一覧
{% else %}
{{ subtitle }}
{% endif %}
{% elseif title is defined and title is not empty %}
{{ title }}
{% endif %}
</h1>
<div class=\"itemImg\">
<div class=\"itemImgInner\">
<img src=\"{{ asset('assets/img/products/sub_h1_02.jpg') }}\" alt=\"香り芽本舗の商品一覧\" class=\"imgObjectFitCover\">
</div>
</div>
</div>
<!-- /H1 -->
<!-- CONTENTS -->
<div class=\"l-container l-2ColumnContainer\">
<!-- MAIN-CONTENTS -->
<div class=\"l-main\">
<!-- BREAD CRUMBS -->
<div class=\"sub-breadcrumbsWrap\">
<ul class=\"sub-breadcrumbs\">
<li><a href=\"#\">TOP</a></li>
<li>商品一覧</li>
</ul>
</div>
<!-- /BREAD CRUMBS -->
<!-- MAIN CONTENTS -->
<section>
{% 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>
<!-- HED -->
<div class=\"products-listHed\">
<h2 class=\"mod-hl-01\">商品一覧</h2>
<div class=\"boxSortBtnWrap\">
{% if pagination.totalItemCount > 0 %}
<div class=\"boxSortBtn boxSortBtn-number\">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number mod-form-select form-control'}}) }}
</div>
<div class=\"boxSortBtn boxSortBtn-orderBy\">
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by mod-form-select form-control'}}) }}
</div>
{% endif %}
</div>
</div>
<!-- /HED -->
<div class=\"ec-searchnavRole__infos marginBottom40\">
<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>
</div>
<!-- LIST -->
<div class=\"products-listList mod-productsBoxContainer\">
{% if pagination.totalItemCount > 0 %}
{% for Product in pagination %}
<!-- BOX -->
<article class=\"mod-productsBox\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\" class=\"mod-productsBoxInner\">
<span class=\"boxImg\">
<span class=\"boxImgInner\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" class=\"imgObjectFitCover\" loading=\"lazy\">
</span>
</span>
<div class=\"boxData\">
<h3 class=\"name\">{{ Product.name }}</h3>
{# 販売価格 #}
<p class=\"price\">
{% if Product.getPrice01Min is not null %}
{% set priceClass = \"color: #f00;font-weight: bold;font-size: 17px;text-align:right;\" %}
{% else %}
{% set priceClass = \"\" %}
{% endif %}
<div style=\"{{ priceClass }}\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|number_format }}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}
~
{{ Product.getPrice02IncTaxMax|number_format }}
{% endif %}
円
<small class=\"isSmall\" style=\"font-size: 15px;\">(税込)</small>
{% else %}
{{ Product.getPrice02IncTaxMin|number_format }}
円
<small class=\"isSmall\" style=\"font-size: 15px;\">(税込)</small>
{% endif %}
</div>
<div class=\"font13 textRight\" style=\"margin-top:10px;text-decoration: line-through;\">
{% if Product.hasProductClass %}
<div>
{% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
{{ Product.getPrice01IncTaxMin|number_format }}円
<span class=\"tax\">(税込)</span>
{% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
{{ Product.getPrice01IncTaxMin|number_format }}~ {{ Product.getPrice01IncTaxMax|number_format }}円
<span class=\"tax\">(税込)</span>
{% endif %}
</div>
{% else %}
{% if Product.getPrice01Max is not null %}
{{ Product.getPrice01IncTaxMin|number_format }}円
<span class=\"tax\">(税込)</span>
{% endif %}
{% endif %}
</div>
</p>
{% if Product.stock_find %}
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
</div>
</a>
</article>
<!-- /BOX -->
{% endfor %}
{% endif %}
</div>
<!-- /LIST -->
<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>
{% endif %}
</section>
<!-- /MAIN CONTENTS -->
<!-- PAGINATION -->
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
<!-- /PAGINATION -->
{% if Layout.MainBottom %}
{{ include('block.twig', {'Blocks': Layout.MainBottom}) }}
{% endif %}
</div>
<!-- /MAIN-CONTENTS -->
<!-- SIDE-CONTENTS -->
{{ include('Block/side_menu.twig') }}
<!-- /SIDE-CONTENTS -->
</div>
<!-- /CONTENTS -->
</section>
</div>
<!-- /PAGE CONTENTS -->
<style>
.ec-blockBtn--action {
height: 30px;
line-height: 100%;
margin-top: 15px;
font-size: 12px;
}
</style>
{% endblock %}", "Product/list.twig", "/home/kaorimehonpo/kaorime.co.jp/public_html/shop.kaorime.co.jp/app/template/kaorime/Product/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "for" => 18, "if" => 19, "include" => 294);
static $filters = array("escape" => 19, "raw" => 19, "trans" => 47, "length" => 149, "no_image_product" => 203, "number_format" => 219);
static $functions = array("class_categories_as_json" => 19, "url" => 75, "asset" => 130, "form_widget" => 171, "include" => 298);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'no_image_product', 'number_format'],
['class_categories_as_json', 'url', 'asset', 'form_widget', '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;
}
}
}