<?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_c6b562bf8359bf92bf5c339266609478 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'],
'sub_area' => [$this, 'block_sub_area'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
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 3
$context["body_id"] = "product_page";
// line 1
$this->parent = $this->loadTemplate("default_frame.twig", "Product/list.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
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 6
echo "<script>
";
// line 8
echo "
\$(function () {
// 表示件数を変更
\$('.disp-number').change(function () {
console.log(\"hoge\");
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 34
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 62
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 69
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_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 86
public function block_sub_area($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", "sub_area"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sub_area"));
// line 87
echo " <ul class=\"pankuzu\">
<li><a href=\"";
// line 88
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\">トップ</a></li>
";
// line 89
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 89, $this->source); })()))) {
// line 90
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.', 90, $this->source); })()), "path", [], "any", false, false, true, 90));
foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
// line 91
echo " <li>
<a href=\"";
// line 92
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, 92), 92, $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, 92), 92, $this->source), "html", null, true);
echo "</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 95
echo " ";
} else {
// line 96
echo " <li>
<a href=\"";
// line 97
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
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.', 97, $this->source); })()), 97, $this->source), "html", null, true);
echo "</a>
</li>
";
}
// line 100
echo " </ul>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 103
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 104
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.', 104, $this->source); })()), "category_id", [], "any", false, false, true, 104), "vars", [], "any", false, false, true, 104), "errors", [], "any", false, false, true, 104)) > 0)) {
// line 105
echo "<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 106
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 109
echo "<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 110
$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.', 110, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 111
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, 111), "id", [], "any", false, false, true, 111), 111, $this->source), "html", null, true);
echo "\" name=\"";
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, 111), "full_name", [], "any", false, false, true, 111), 111, $this->source), "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, true, 111), "value", [], "any", false, false, true, 111))) {
// line 112
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, 112), "value", [], "any", false, false, true, 112), 112, $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 114
echo "</form>
<div class=\"main_ttl_wrap\">
";
// line 117
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 117, $this->source); })()))) {
// line 118
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.', 118, $this->source); })()), "path", [], "any", false, false, true, 118));
$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 119
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 119)) {
// line 120
echo " <h2 class=\"main_ttl\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, true, 120), 120, $this->source), "html", null, true);
echo "</h2>
";
}
// line 122
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 123
echo " ";
} else {
// line 124
echo " <h2 class=\"main_ttl\">商品一覧</h2>
";
}
// line 126
echo "</div>
<div class=\"sortarea_wrap\">
";
// line 128
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.', 128, $this->source); })()), "totalItemCount", [], "any", false, false, true, 128) > 0)) {
// line 129
echo " <p><span class=\"txt_red\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 129, $this->source); })()), "totalItemCount", [], "any", false, false, true, 129), 129, $this->source), "html", null, true);
echo "件</span>の商品がございます。</p>
";
} else {
// line 131
echo " <p>お探しの商品は見つかりませんでした</p>
";
}
// line 133
echo " <ul class=\"sortarea\">
<li>並び替え</li>
<li>
";
// line 136
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.', 136, $this->source); })()), "disp_number", [], "any", false, false, true, 136), 136, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
</li>
<li class=\"selectarea\">
";
// line 139
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.', 139, $this->source); })()), "orderby", [], "any", false, false, true, 139), 139, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</li>
</ul>
</div>
";
// line 144
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.', 144, $this->source); })()), "totalItemCount", [], "any", false, false, true, 144) > 0)) {
// line 145
$this->loadTemplate("pager.twig", "Product/list.twig", 145)->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.', 145, $this->source); })()), "paginationData", [], "any", false, false, true, 145)]));
// line 146
echo "<ul class=\"list_item\">
";
// line 147
$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.', 147, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 148
echo " ";
// line 150
echo " ";
$context["minPrice"] = $this->extensions['Plugin\CustomPrice\Twig\Extension\EccubeExtension']->CustomProductFindWhere($this->sandbox->ensureToStringAllowed($context["Product"], 150, $this->source), "min_price");
// line 151
echo " ";
$context["maxPrice"] = $this->extensions['Plugin\CustomPrice\Twig\Extension\EccubeExtension']->CustomProductFindWhere($this->sandbox->ensureToStringAllowed($context["Product"], 151, $this->source), "max_price");
// line 152
echo " ";
$context["maxTotal"] = $this->extensions['Plugin\CustomPrice\Twig\Extension\EccubeExtension']->CustomProductFindWhere($this->sandbox->ensureToStringAllowed($context["Product"], 152, $this->source), "max_total");
// line 153
echo " <li>
<a href=\"";
// line 154
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, 154)]), "html", null, true);
echo "\">
<div class=\"list_item_img\">
<img src=\"";
// line 156
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"], "MainListImage", [], "any", false, false, true, 156), 156, $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, 156), 156, $this->source), "html", null, true);
echo "\">
</div>
</a>
<p class=\"list_item_name\">";
// line 159
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 159), 159, $this->source), "html", null, true);
echo "</p>
";
// line 161
if (twig_get_attribute($this->env, $this->source, $context["Product"], "getMinLength", [], "any", false, false, true, 161)) {
// line 162
echo " <p class=\"list_item_detail\">フレーム幅:";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getMinLength", [], "any", false, false, true, 162), 162, $this->source)), "html", null, true);
echo "mm</p>
";
}
// line 164
echo "
";
// line 165
if (twig_get_attribute($this->env, $this->source, $context["Product"], "getMaxLength", [], "any", false, false, true, 165)) {
// line 166
echo " <p class=\"list_item_detail\">フレーム厚み:";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getMaxLength", [], "any", false, false, true, 166), 166, $this->source)), "html", null, true);
echo "mm</p>
";
}
// line 168
echo "
";
// line 170
if ((isset($context["maxTotal"]) || array_key_exists("maxTotal", $context) ? $context["maxTotal"] : (function () { throw new RuntimeError('Variable "maxTotal" does not exist.', 170, $this->source); })())) {
// line 171
echo " <p class=\"list_item_detail\">ヨコ・タテ合計: ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["maxTotal"]) || array_key_exists("maxTotal", $context) ? $context["maxTotal"] : (function () { throw new RuntimeError('Variable "maxTotal" does not exist.', 171, $this->source); })()), 171, $this->source)), "html", null, true);
echo "mmまで</p>
";
}
// line 173
echo "
<p class=\"list_item_price\">
";
// line 175
if ((((isset($context["minPrice"]) || array_key_exists("minPrice", $context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.', 175, $this->source); })()) != (isset($context["maxPrice"]) || array_key_exists("maxPrice", $context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.', 175, $this->source); })())) && !(null === (isset($context["maxPrice"]) || array_key_exists("maxPrice", $context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.', 175, $this->source); })())))) {
// line 176
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["minPrice"]) || array_key_exists("minPrice", $context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.', 176, $this->source); })()), 176, $this->source)), "html", null, true);
echo "~";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["maxPrice"]) || array_key_exists("maxPrice", $context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.', 176, $this->source); })()), 176, $this->source)), "html", null, true);
// line 177
echo "
";
} elseif ( !(null === // line 178
(isset($context["minPrice"]) || array_key_exists("minPrice", $context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.', 178, $this->source); })()))) {
// line 179
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["minPrice"]) || array_key_exists("minPrice", $context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.', 179, $this->source); })()), 179, $this->source)), "html", null, true);
echo "
";
} elseif ( !(null === // line 180
(isset($context["maxPrice"]) || array_key_exists("maxPrice", $context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.', 180, $this->source); })()))) {
// line 181
echo " ";
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["maxPrice"]) || array_key_exists("maxPrice", $context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.', 181, $this->source); })()), 181, $this->source)), "html", null, true);
echo "
";
} elseif (twig_get_attribute($this->env, $this->source, // line 183
$context["Product"], "hasProductClass", [], "any", false, false, true, 183)) {
// line 184
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 184) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 184))) {
// line 185
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, 185), 185, $this->source)), "html", null, true);
echo "
";
} else {
// line 187
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, 187), 187, $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"], "getPrice02IncTaxMax", [], "any", false, false, true, 187), 187, $this->source)), "html", null, true);
echo "
";
}
// line 189
echo " ";
} else {
// line 190
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, 190), 190, $this->source)), "html", null, true);
echo "
";
}
// line 192
echo " <span>円 (税込)</span>
</p>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 196
echo "
</ul>
";
// line 199
$this->loadTemplate("pager.twig", "Product/list.twig", 199)->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.', 199, $this->source); })()), "paginationData", [], "any", false, false, true, 199)]));
}
// line 201
echo "
";
}
$__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 ( 523 => 201, 520 => 199, 515 => 196, 506 => 192, 500 => 190, 497 => 189, 489 => 187, 483 => 185, 480 => 184, 478 => 183, 472 => 181, 470 => 180, 465 => 179, 463 => 178, 460 => 177, 455 => 176, 453 => 175, 449 => 173, 443 => 171, 441 => 170, 437 => 168, 431 => 166, 429 => 165, 426 => 164, 420 => 162, 418 => 161, 413 => 159, 405 => 156, 400 => 154, 397 => 153, 394 => 152, 391 => 151, 388 => 150, 386 => 148, 382 => 147, 379 => 146, 377 => 145, 375 => 144, 367 => 139, 361 => 136, 356 => 133, 352 => 131, 346 => 129, 344 => 128, 340 => 126, 336 => 124, 333 => 123, 319 => 122, 313 => 120, 310 => 119, 292 => 118, 290 => 117, 285 => 114, 274 => 112, 267 => 111, 263 => 110, 260 => 109, 254 => 106, 251 => 105, 249 => 104, 239 => 103, 228 => 100, 220 => 97, 217 => 96, 214 => 95, 201 => 92, 198 => 91, 193 => 90, 191 => 89, 187 => 88, 184 => 87, 174 => 86, 147 => 69, 137 => 62, 106 => 34, 78 => 8, 75 => 6, 65 => 5, 54 => 1, 52 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% set body_id = '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 () {
console.log(\"hoge\");
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 sub_area %}
<ul class=\"pankuzu\">
<li><a href=\"{{ url('homepage') }}\">トップ</a></li>
{% if Category is not null %}
{% for Path in Category.path %}
<li>
<a href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
</li>
{% endfor %}
{% else %}
<li>
<a href=\"{{ url('product_list') }}\">{{subtitle}}</a>
</li>
{% endif %}
</ul>
{% 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 %}
<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=\"main_ttl_wrap\">
{% if Category is not null %}
{% for Path in Category.path %}
{% if loop.last %}
<h2 class=\"main_ttl\">{{ Path.name }}</h2>
{% endif %}
{% endfor %}
{% else %}
<h2 class=\"main_ttl\">商品一覧</h2>
{% endif %}
</div>
<div class=\"sortarea_wrap\">
{% if pagination.totalItemCount > 0 %}
<p><span class=\"txt_red\">{{pagination.totalItemCount}}件</span>の商品がございます。</p>
{% else %}
<p>お探しの商品は見つかりませんでした</p>
{% endif %}
<ul class=\"sortarea\">
<li>並び替え</li>
<li>
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
</li>
<li class=\"selectarea\">
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
</li>
</ul>
</div>
{% if pagination.totalItemCount > 0 %}
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
<ul class=\"list_item\">
{% for Product in pagination %}
{# {% set frame_width = getProduct_field(Product.id,\"frame_width\") %}
{% set frame_thickness = getProduct_field(Product.id,\"frame_thickness\") %} #}
{% set minPrice = CustomProductFindWhere(Product,\"min_price\") %}
{% set maxPrice = CustomProductFindWhere(Product,\"max_price\") %}
{% set maxTotal = CustomProductFindWhere(Product,\"max_total\") %}
<li>
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<div class=\"list_item_img\">
<img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\">
</div>
</a>
<p class=\"list_item_name\">{{ Product.name }}</p>
{% if Product.getMinLength %}
<p class=\"list_item_detail\">フレーム幅:{{Product.getMinLength|number_format()}}mm</p>
{% endif %}
{% if Product.getMaxLength %}
<p class=\"list_item_detail\">フレーム厚み:{{Product.getMaxLength|number_format()}}mm</p>
{% endif %}
{% if maxTotal %}
<p class=\"list_item_detail\">ヨコ・タテ合計: {{ maxTotal|number_format() }}mmまで</p>
{% endif %}
<p class=\"list_item_price\">
{% if minPrice != maxPrice and maxPrice is not null %}
{{ minPrice|number_format() }}~{{ maxPrice|number_format()
}}
{% elseif minPrice is not null %}
{{ minPrice|number_format() }}
{% elseif maxPrice is not null %}
{{ maxPrice|number_format() }}
{% elseif Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|number_format() }}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format() }} ~ {{ Product.getPrice02IncTaxMax|number_format() }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|number_format() }}
{% endif %}
<span>円 (税込)</span>
</p>
</li>
{% endfor %}
</ul>
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
{% endif %}
{% endif %}
{% endblock %}", "Product/list.twig", "/home/hr67ekh16/u-arts-mirror.jp/public_html/app/template/uarts/Product/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 3, "if" => 89, "for" => 90, "include" => 145);
static $filters = array("escape" => 34, "trans" => 34, "length" => 104, "no_image_product" => 156, "number_format" => 162);
static $functions = array("url" => 62, "form_widget" => 136, "CustomProductFindWhere" => 150, "asset" => 156);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for', 'include'],
['escape', 'trans', 'length', 'no_image_product', 'number_format'],
['url', 'form_widget', 'CustomProductFindWhere', 'asset']
);
} 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;
}
}
}