<?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_bc6d773d6475bc3fa2bf348778e40dfc extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'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_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 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_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 15
public function block_stylesheet($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", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 16
echo " <link rel=\"stylesheet\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/productlist.css", "user_data"), "html", null, true);
echo "\">
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 19
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 20
echo " <script>
eccube.productsClassCategories = {
";
// line 22
$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.', 22, $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 23
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, 23), 23, $this->source), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 23, $this->source));
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 23) == false)) {
echo ", ";
}
// line 24
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 25
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()
\$('.ec-modal').fadeIn(800);
scrollPos = \$(window).scrollTop();
\t\t\t \$('body').addClass('have_ec-modal').css('top',-scrollPos + 'px');
// カートブロックを更新する
\$.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()
\$('.ec-modal').fadeOut(800)
\$('body').removeClass('have_ec-modal').css('top',0 + 'px');
\t\t\twindow.scrollTo( 0 , scrollPos );
});
</script>
<script>
\$(function() {
\$('.form-control').each(function() {
var el = \$(this);
var add = \$('.spinner-add');
var sub = \$('.spinner-sub');
// substract
el.parent().on('click', '.spinner-sub', function() {
if (el.val() > parseInt(el.attr('min'))) {
el.val(function(i, oldval) {
return --oldval;
});
}
// disabled
if (el.val() == parseInt(el.attr('min'))) {
el.prev(sub).addClass('disabled');
}
if (el.val() < parseInt(el.attr('max'))) {
el.next(add).removeClass('disabled');
}
});
// increment
el.parent().on('click', '.spinner-add', function() {
el.val(function(i, oldval) {
return ++oldval;
});
// disabled
if (el.val() > parseInt(el.attr('min'))) {
el.prev(sub).removeClass('disabled');
}
if (el.val() == parseInt(el.attr('max'))) {
el.next(add).addClass('disabled');
}
});
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 140
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 141
echo " ";
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.', 141, $this->source); })()), "category_id", [], "any", false, false, true, 141), "vars", [], "any", false, false, true, 141), "errors", [], "any", false, false, true, 141)) > 0)) {
// line 142
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 143
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 146
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 148
$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.', 148, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 149
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, 149), "id", [], "any", false, false, true, 149), 149, $this->source), "html", null, true);
echo "\"
name=\"";
// line 150
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, 150), "full_name", [], "any", false, false, true, 150), 150, $this->source), "html", null, true);
echo "\"
";
// line 151
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, 151), "value", [], "any", false, false, true, 151))) {
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, 151), "value", [], "any", false, false, true, 151), 151, $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 153
echo " </form>
";
// line 154
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 154, $this->source); })()))) {
// line 155
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.', 155, $this->source); })()), "path", [], "any", false, false, true, 155));
$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 156
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 156)) {
// line 157
echo " <h1>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, true, 157), 157, $this->source), "html", null, true);
echo "</h1>
";
}
// line 159
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 160
echo " ";
} else {
// line 161
echo " ";
if ((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.', 161, $this->source); })()), "request", [], "any", false, false, true, 161), "get", [0 => "name"], "method", false, false, true, 161) != "")) {
// line 162
echo " <h1>";
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["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 162, $this->source); })()), "request", [], "any", false, false, true, 162), "get", [0 => "name"], "method", false, false, true, 162), 162, $this->source), "html", null, true);
echo "</h1>
";
} else {
// line 164
echo " <h1>宇宙グッズ一覧</h1>
";
}
// line 166
echo " ";
}
// line 167
echo " <div class=\"ec-searchnavRole__infos\">
";
// line 168
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.', 168, $this->source); })()), "totalItemCount", [], "any", false, false, true, 168) > 0)) {
// line 169
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<div class=\"product_count\"><span>%count%</span>件</div>", ["%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.', 169, $this->source); })()), "totalItemCount", [], "any", false, false, true, 169)]);
echo "
<div class=\"ec-select\">
";
// 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); })()), "orderby", [], "any", false, false, true, 171), 171, $this->source), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
";
// line 177
echo " ";
}
// line 178
echo " </div>
</div>
";
// line 181
if (((array_key_exists("Category", $context) && !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 181, $this->source); })()))) && twig_get_attribute($this->env, $this->source, ($context["Category"] ?? null), "file_name", [], "any", true, true, true, 181))) {
// line 182
echo " <div class=\"apg_category_content\">
";
// line 183
if (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 183, $this->source); })()), "file_name", [], "any", false, false, true, 183)) {
// line 184
echo " <div class=\"apg_category_image\" style=\"background-image:url(";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("rich_category/" . $this->sandbox->ensureToStringAllowed(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.', 184, $this->source); })()), "file_name", [], "any", false, false, true, 184), 184, $this->source)), "save_image"), "html", null, true);
echo ");\"></div>
";
}
// line 186
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 186, $this->source); })()), "content", [], "any", false, false, true, 186)) {
// line 187
echo " <div class=\"apg_category_description\">
";
// line 188
echo twig_nl2br($this->sandbox->ensureToStringAllowed(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.', 188, $this->source); })()), "content", [], "any", false, false, true, 188), 188, $this->source));
echo "
</div>
";
}
// line 191
echo " </div>
";
}
// line 193
echo "
";
// line 194
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.', 194, $this->source); })()), "totalItemCount", [], "any", false, false, true, 194) > 0)) {
// line 195
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// 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); })()));
$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 198
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 199
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, 199)]), "html", null, true);
echo "\">
<div class=\"item_img\"><img src=\"";
// line 200
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, 200), 200, $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, 200), 200, $this->source), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 200) > 5)) {
echo " loading=\"lazy\"";
}
echo "></div>
<p class=\"item_name\">";
// line 201
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 201), 201, $this->source), "html", null, true);
echo "</p>
";
// line 202
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, true, 202)) {
// line 203
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, true, 203) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, true, 203))) {
// line 204
echo " <p class=\"price02-default\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 204), 204, $this->source)), "html", null, true);
echo "</p>
";
} else {
// line 206
echo " <p class=\"price02-default price_multiple\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 206), 206, $this->source)), "html", null, true);
echo "~";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 206), 206, $this->source)), "html", null, true);
echo "</p>
";
}
// line 208
echo " ";
} else {
// line 209
echo " <p class=\"price02-default\">";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, true, 209), 209, $this->source)), "html", null, true);
echo "</p>
";
}
// line 211
echo " </a>
";
// line 212
if (twig_get_attribute($this->env, $this->source, $context["Product"], "stock_find", [], "any", false, false, true, 212)) {
// line 213
echo " ";
$context["form"] = twig_get_attribute($this->env, $this->source, (isset($context["forms"]) || array_key_exists("forms", $context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.', 213, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 213), [], "array", false, false, true, 213);
// line 214
echo " <form name=\"form";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 214), 214, $this->source), "html", null, true);
echo "\" id=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 214), 214, $this->source), "html", null, true);
echo "\" action=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 214)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
";
// line 216
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, true, 216)) {
// line 217
echo " <div class=\"ec-select\">
";
// line 218
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 218, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 218), 218, $this->source), 'widget');
echo "
";
// line 219
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 219, $this->source); })()), "classcategory_id1", [], "any", false, false, true, 219), 219, $this->source), 'errors');
echo "
</div>
";
// line 221
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, true, 221)) {
// line 222
echo " <div class=\"ec-select\">
";
// line 223
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 223, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 223), 223, $this->source), 'widget');
echo "
";
// line 224
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 224, $this->source); })()), "classcategory_id2", [], "any", false, false, true, 224), 224, $this->source), 'errors');
echo "
</div>
";
}
// line 227
echo " ";
}
// line 228
echo " <div class=\"ec-numberInput\">
<div class=\"number_wrap\">
<span class=\"spinner-sub disabled\"><i class=\"fas fa-minus-circle\"></i></span>
";
// line 231
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 231, $this->source); })()), "quantity", [], "any", false, false, true, 231), 231, $this->source), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 232
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 232, $this->source); })()), "quantity", [], "any", false, false, true, 232), 232, $this->source), 'errors');
echo "
<span class=\"spinner-add\"><i class=\"fas fa-plus-circle\"></i></span>
</div>
</div>
</div>
";
// line 237
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 237, $this->source); })()), 237, $this->source), 'rest');
echo "
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"";
// line 240
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 240), 240, $this->source), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 240), 240, $this->source), "html", null, true);
echo "\">
";
// line 241
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 245
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
";
// line 247
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html", null, true);
echo "
</button>
</div>
";
}
// line 251
echo " </li>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 253
echo " </ul>
</div>
<div class=\"ec-pagerRole\">
";
// line 256
$this->loadTemplate("pager.twig", "Product/list.twig", 256)->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.', 256, $this->source); })()), "paginationData", [], "any", false, false, true, 256)]));
// line 257
echo " </div>
<div class=\"productlist_bottom\">
<div class=\"productlist_number ec-select\">
<div>";
// line 260
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("表示件数", ["%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.', 260, $this->source); })()), "totalItemCount", [], "any", false, false, true, 260)]);
echo "</div>
";
// line 261
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.', 261, $this->source); })()), "disp_number", [], "any", false, false, true, 261), 261, $this->source), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
</div>
<div class=\"ec-searchnavRole__category\">
<p><a href=\"";
// line 264
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"all_category\">宇宙グッズ一覧</a></p>
";
// line 265
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 265, $this->source); })()))) {
// line 266
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.', 266, $this->source); })()), "path", [], "any", false, false, true, 266));
$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 267
echo " <p><a href=\"";
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, 267), 267, $this->source), "html", null, true);
echo "\" class=\"list_category_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 267), 267, $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, 267), 267, $this->source), "html", null, true);
echo "</a></p>
<script>
\$(\".category_id_";
// line 269
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, true, 269), 269, $this->source), "html", null, true);
echo "\").addClass(\"is-active\").css(\"display\",\"block\");
";
// line 270
if (twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, true, 270)) {
// line 271
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, 271), 271, $this->source), "html", null, true);
echo "\").addClass(\"is-active_last\");
";
}
// line 273
echo " </script>
";
++$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 275
echo " ";
}
// line 276
echo " </div>
</div>
";
} else {
// line 279
echo " <div class=\"error_content\">
<p><img src=\"";
// line 280
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/pages/error_character.png", "user_data"), "html", null, true);
echo "\" alt=\"申し訳ございません。該当する宇宙グッズは見付かりませんでした。\" width=\"112\" height=\"169\" /></p>
<p>申し訳ございません。</p>
<p>お探しの宇宙グッズは見付かりませんでした。</p>
</div>
<div class=\"productlist_bottom error\">
<div class=\"ec-searchnavRole__category\">
<p><a href=\"";
// line 286
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"all_category\">宇宙グッズ一覧</a></p>
</div>
</div>
";
}
// line 290
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 ( 741 => 290, 734 => 286, 725 => 280, 722 => 279, 717 => 276, 714 => 275, 699 => 273, 693 => 271, 691 => 270, 687 => 269, 675 => 267, 657 => 266, 655 => 265, 651 => 264, 645 => 261, 641 => 260, 636 => 257, 634 => 256, 629 => 253, 614 => 251, 607 => 247, 603 => 245, 596 => 241, 590 => 240, 584 => 237, 576 => 232, 572 => 231, 567 => 228, 564 => 227, 558 => 224, 554 => 223, 551 => 222, 549 => 221, 544 => 219, 540 => 218, 537 => 217, 535 => 216, 525 => 214, 522 => 213, 520 => 212, 517 => 211, 511 => 209, 508 => 208, 500 => 206, 494 => 204, 491 => 203, 489 => 202, 485 => 201, 475 => 200, 471 => 199, 468 => 198, 451 => 197, 447 => 195, 445 => 194, 442 => 193, 438 => 191, 432 => 188, 429 => 187, 426 => 186, 420 => 184, 418 => 183, 415 => 182, 413 => 181, 408 => 178, 405 => 177, 400 => 171, 394 => 169, 392 => 168, 389 => 167, 386 => 166, 382 => 164, 376 => 162, 373 => 161, 370 => 160, 356 => 159, 350 => 157, 347 => 156, 329 => 155, 327 => 154, 324 => 153, 312 => 151, 308 => 150, 303 => 149, 299 => 148, 295 => 146, 289 => 143, 286 => 142, 283 => 141, 273 => 140, 206 => 82, 196 => 75, 164 => 46, 141 => 25, 127 => 24, 119 => 23, 102 => 22, 98 => 20, 88 => 19, 75 => 16, 65 => 15, 54 => 11, 52 => 13, 39 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block stylesheet %}
<link rel=\"stylesheet\" href=\"{{ asset('assets/css/productlist.css', 'user_data') }}\">
{% endblock %}
{% 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()
\$('.ec-modal').fadeIn(800);
scrollPos = \$(window).scrollTop();
\t\t\t \$('body').addClass('have_ec-modal').css('top',-scrollPos + 'px');
// カートブロックを更新する
\$.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()
\$('.ec-modal').fadeOut(800)
\$('body').removeClass('have_ec-modal').css('top',0 + 'px');
\t\t\twindow.scrollTo( 0 , scrollPos );
});
</script>
<script>
\$(function() {
\$('.form-control').each(function() {
var el = \$(this);
var add = \$('.spinner-add');
var sub = \$('.spinner-sub');
// substract
el.parent().on('click', '.spinner-sub', function() {
if (el.val() > parseInt(el.attr('min'))) {
el.val(function(i, oldval) {
return --oldval;
});
}
// disabled
if (el.val() == parseInt(el.attr('min'))) {
el.prev(sub).addClass('disabled');
}
if (el.val() < parseInt(el.attr('max'))) {
el.next(add).removeClass('disabled');
}
});
// increment
el.parent().on('click', '.spinner-add', function() {
el.val(function(i, oldval) {
return ++oldval;
});
// disabled
if (el.val() > parseInt(el.attr('min'))) {
el.prev(sub).removeClass('disabled');
}
if (el.val() == parseInt(el.attr('max'))) {
el.next(add).addClass('disabled');
}
});
});
});
</script>
{% endblock %}
{% block main %}
{% if search_form.category_id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
{% for item in search_form %}
<input type=\"hidden\" id=\"{{ item.vars.id }}\"
name=\"{{ item.vars.full_name }}\"
{% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
{% endfor %}
</form>
{% if Category is not null %}
{% for Path in Category.path %}
{% if loop.last %}
<h1>{{ Path.name }}</h1>
{% endif %}
{% endfor %}
{% else %}
{% if app.request.get('name') != \"\" %}
<h1>{{app.request.get('name')}}</h1>
{% else %}
<h1>宇宙グッズ一覧</h1>
{% endif %}
{% endif %}
<div class=\"ec-searchnavRole__infos\">
{% if pagination.totalItemCount > 0 %}
{{ '<div class=\"product_count\"><span>%count%</span>件</div>'|trans({ '%count%': pagination.totalItemCount })|raw }}
<div class=\"ec-select\">
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
{#
{% else %}
<div class=\"product_count\">{{ '0件'|trans }}</div>
#}
{% endif %}
</div>
</div>
{% if Category is defined and Category is not null and attribute(Category, 'file_name') is defined %}
<div class=\"apg_category_content\">
{% if Category.file_name %}
<div class=\"apg_category_image\" style=\"background-image:url({{ asset('rich_category/'~Category.file_name,'save_image') }});\"></div>
{% endif %}
{% if Category.content %}
<div class=\"apg_category_description\">
{{ Category.content|raw|nl2br }}
</div>
{% endif %}
</div>
{% endif %}
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
{% for Product in pagination %}
<li class=\"ec-shelfGrid__item\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<div class=\"item_img\"><img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}></div>
<p class=\"item_name\">{{ Product.name }}</p>
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
<p class=\"price02-default\">{{ Product.getPrice02IncTaxMin|price }}</p>
{% else %}
<p class=\"price02-default price_multiple\">{{ Product.getPrice02IncTaxMin|price }}~{{ Product.getPrice02IncTaxMax|price }}</p>
{% endif %}
{% else %}
<p class=\"price02-default\">{{ Product.getPrice02IncTaxMin|price }}</p>
{% endif %}
</a>
{% if Product.stock_find %}
{% set form = forms[Product.id] %}
<form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
<div class=\"ec-productRole__actions\">
{% if form.classcategory_id1 is defined %}
<div class=\"ec-select\">
{{ form_widget(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class=\"ec-select\">
{{ form_widget(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class=\"ec-numberInput\">
<div class=\"number_wrap\">
<span class=\"spinner-sub disabled\"><i class=\"fas fa-minus-circle\"></i></span>
{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
{{ form_errors(form.quantity) }}
<span class=\"spinner-add\"><i class=\"fas fa-plus-circle\"></i></span>
</div>
</div>
</div>
{{ form_rest(form) }}
</form>
<div class=\"ec-productRole__btn\">
<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% else %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
<div class=\"productlist_bottom\">
<div class=\"productlist_number ec-select\">
<div>{{ '表示件数'|trans({ '%count%': pagination.totalItemCount })|raw }}</div>
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
</div>
<div class=\"ec-searchnavRole__category\">
<p><a href=\"{{ url('product_list') }}\" class=\"all_category\">宇宙グッズ一覧</a></p>
{% if Category is not null %}
{% for Path in Category.path %}
<p><a href=\"{{ url('product_list') }}?category_id={{ Path.id }}\" class=\"list_category_{{loop.index}}\">{{ Path.name }}</a></p>
<script>
\$(\".category_id_{{ Path.id }}\").addClass(\"is-active\").css(\"display\",\"block\");
{% if loop.last %}
\$(\".category_id_{{ Path.id }}\").addClass(\"is-active_last\");
{% endif %}
</script>
{% endfor %}
{% endif %}
</div>
</div>
{% else %}
<div class=\"error_content\">
<p><img src=\"{{ asset('assets/img/pages/error_character.png', 'user_data') }}\" alt=\"申し訳ございません。該当する宇宙グッズは見付かりませんでした。\" width=\"112\" height=\"169\" /></p>
<p>申し訳ございません。</p>
<p>お探しの宇宙グッズは見付かりませんでした。</p>
</div>
<div class=\"productlist_bottom error\">
<div class=\"ec-searchnavRole__category\">
<p><a href=\"{{ url('product_list') }}\" class=\"all_category\">宇宙グッズ一覧</a></p>
</div>
</div>
{% endif %}
{% endif %}
{% endblock %}", "Product/list.twig", "/home/unibo-test/www/html/app/template/default/Product/list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "for" => 22, "if" => 23, "include" => 256);
static $filters = array("escape" => 16, "raw" => 23, "trans" => 46, "length" => 141, "nl2br" => 188, "no_image_product" => 200, "price" => 204);
static $functions = array("asset" => 16, "class_categories_as_json" => 23, "url" => 75, "form_widget" => 171, "form_errors" => 219, "form_rest" => 237);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if', 'include'],
['escape', 'raw', 'trans', 'length', 'nl2br', 'no_image_product', 'price'],
['asset', 'class_categories_as_json', 'url', 'form_widget', 'form_errors', 'form_rest'],
$this->source
);
} 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;
}
}
}