<?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_95832afebacb1698ac1c51f50e3783621acf2ba7626afb1f3b438d888c51df75 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'],
];
}
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, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 19), "js"), "html", null, true);
echo "\": ";
echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 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();
});
var modalTimer;
\$('.add-cart').on('click', function(e) {
var self = \$(this);
onAddCart(e, \$(this), 1, function() {
var \$form = self.parents('li');
\$form.find(\".ec-productRole__btn--only\").addClass(\"d-none\");
\$form.find(\".ec-productRole__btn--group\").removeClass(\"d-none\");
window.clearTimeout(modalTimer);
\$('.ec-modal').show()
modalTimer = window.setTimeout(function() {
\$('.ec-modal').hide();
}, 1500)
});
});
\$('.minus__btn').on('click', function(e) {
onAddCart(e, \$(this), -1);
})
\$('.plus__btn').on('click', function(e) {
onAddCart(e, \$(this));
})
function onAddCart(e, self, quantity = 1, callback) {
var \$form = \$(self).parents('li').find('form.productForm');
// 個数フォームのチェック
\$form.parent().find('.quantity').val(quantity);
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$(self).prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
var \$quantityLabelEl = \$(self).parents('li').find('.quantity_label');
\$quantityLabelEl.text(\$quantityLabelEl.text() * 1 + quantity * 1);
if(callback) {
callback();
}
// カートブロックを更新する
\$.ajax({
url: '";
// line 91
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 98
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
\$(self).prop('disabled', false);
}).always(function(data) {
var \$parent = \$(self).parents('li');
let stockVal = \$parent.find('.stock').val() * 1;
var \$quantityLabelEl = \$parent.find('.quantity_label');
var _quantity = \$quantityLabelEl.text() * 1;
if(_quantity == 0) {
// enable minus button
\$(self).prop('disabled', false);
\$parent.find(\".ec-productRole__btn--only\").removeClass(\"d-none\");
\$parent.find(\".ec-productRole__btn--group\").addClass(\"d-none\");
}
if(_quantity > 0 && _quantity < stockVal) {
// Buttonを有効にする
\$(self).prop('disabled', false);
\$parent.find('.plus__btn').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 133
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 134
echo " <div class=\"ec-searchnavRole__topicpath\">
<ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"";
// line 137
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"breadcrumb__item__link\">
ホーム
</a>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
<li class=\"breadcrumb__item\">
<a href=\"";
// line 145
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\" class=\"breadcrumb__item__link\">
商品一覧
</a>
</li>
";
// line 149
if ( !(null === (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 149, $this->source); })()))) {
// line 150
echo " <li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
";
// line 153
$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.', 153, $this->source); })()), "path", [], "any", false, false, false, 153));
$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 154
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, false, 154) != twig_constant("Customize\\Common\\Constant::MANUFACTURER_CATEGORY_ID")) && (twig_get_attribute($this->env, $this->source, // line 155
$context["Path"], "id", [], "any", false, false, false, 155) != twig_constant("Customize\\Common\\Constant::DEFAULT_CATEGORY_ID")))) {
// line 156
echo " <li class=\"breadcrumb__item\">
<a class=\"breadcrumb__item__link\" href=\"";
// line 157
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "id", [], "any", false, false, false, 157), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Path"], "name", [], "any", false, false, false, 157), "html", null, true);
echo "</a>
</li>";
// line 159
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 159) == false)) {
// line 160
echo " <li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
";
}
}
// line 165
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 166
echo " ";
}
// line 167
echo " ";
// line 171
echo " </ul>
</div>
<div class=\"ec-pageHeader contentHeader\">
<h1>";
// line 174
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品一覧"), "html", null, true);
echo "</h1>
</div>
";
// line 176
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.', 176, $this->source); })()), "category_id", [], "any", false, false, false, 176), "vars", [], "any", false, false, false, 176), "errors", [], "any", false, false, false, 176)) > 0)) {
// line 177
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 178
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 181
echo " <div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 183
$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.', 183, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 184
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 184), "id", [], "any", false, false, false, 184), "html", null, true);
echo "\"
name=\"";
// line 185
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 185), "full_name", [], "any", false, false, false, 185), "html", null, true);
echo "\"
";
// line 186
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 186), "value", [], "any", false, false, false, 186))) {
echo "value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 186), "value", [], "any", false, false, false, 186), "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 188
echo " </form>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 191
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.', 191, $this->source); })()), "totalItemCount", [], "any", false, false, false, 191) > 0)) {
// line 192
echo " <p class=\"ec-searchnavRole__counter__title\">検索結果</p>
";
// line 193
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<p class=\"ec-searchnavRole__counter__number\">%count%件</p>", ["%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.', 193, $this->source); })()), "totalItemCount", [], "any", false, false, false, 193)]);
echo "
";
} else {
// line 195
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 197
echo " </div>
";
// line 198
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.', 198, $this->source); })()), "totalItemCount", [], "any", false, false, false, 198) > 0)) {
// line 199
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 201
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 201, $this->source); })()), "disp_number", [], "any", false, false, false, 201), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 202
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 202, $this->source); })()), "orderby", [], "any", false, false, false, 202), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 206
echo " </div>
</div>
<ul class=\"stockList\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
";
// line 222
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.', 222, $this->source); })()), "totalItemCount", [], "any", false, false, false, 222) > 0)) {
// line 223
echo " ";
if ((isset($context["isShowProductImage"]) || array_key_exists("isShowProductImage", $context) ? $context["isShowProductImage"] : (function () { throw new RuntimeError('Variable "isShowProductImage" does not exist.', 223, $this->source); })())) {
// line 224
echo " <div class=\"ec-shelfRole\">
<ul class=\"ec-shelfGrid\">
";
// line 226
$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.', 226, $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 227
echo " <li class=\"ec-shelfGrid__item\">
<a href=\"";
// line 228
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 228)]), "html", null, true);
echo "\">
<div class=\"ec-shelfGrid__item-image\">
<img src=\"";
// line 230
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, false, 230)), "save_image"), "resize", ["thumbnail" => ["size" => [0 => 250, 1 => 250]]]), "html", null, true);
// line 231
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 231), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 231) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
";
// line 232
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 232)) > 0)) {
// line 233
echo " <ul class=\"ec-shelfGrid__item-tags\">
";
// line 234
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, false, 234));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 235
echo " <li class=\"ec-shelfGrid__item-tags__tag tag_";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, false, 235), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["Tag"], "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 237
echo " </ul>
";
}
// line 239
echo " </div>
<p class=\"ec-shelfGrid__item-name\">";
// line 240
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 240), "html", null, true);
echo "</p>
";
// line 241
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 242
echo "
<div class=\"ec-shelfGrid__item-stock\">
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【発送目安】
</p>
<p class=\"ec-shelfGrid__item-stock__block__detail\">
";
// line 249
if (twig_get_attribute($this->env, $this->source, $context["Product"], "getDeliveryDuration", [], "any", false, false, false, 249)) {
// line 250
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Product"], "getDeliveryDuration", [], "any", false, false, false, 250), "name", [], "any", false, false, false, 250), "html", null, true);
echo "
";
} else {
// line 252
echo " 指定なし
";
}
// line 254
echo " </p>
</div>
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【在庫】
</p>
";
// line 261
echo " <p class=\"ec-shelfGrid__item-stock__block__detail\">
";
// line 262
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockUnlimitedMin", [], "any", false, false, false, 262) || (twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 262) >= 10))) {
// line 263
echo " ◎
";
} else {
// line 265
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 265) >= 1) && (twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 265) <= 9))) {
// line 266
echo " ○
";
}
// line 268
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 268) <= 0)) {
// line 269
echo " ■
";
}
// line 271
echo " ";
}
// line 272
echo " </p>
</div>
</div>
";
// line 280
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 280)) {
// line 281
echo " <p>";
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["Product"], "description_list", [], "any", false, false, false, 281));
echo "</p>
";
}
// line 283
echo " <div class=\"ec-shelfGrid__item-flex\">
<p class=\"price02-default ec-shelfGrid__item-price\">
";
// line 285
if (twig_get_attribute($this->env, $this->source, $context["Product"], "isInSale", [], "any", false, false, false, 285)) {
// line 286
echo " <span class=\"ec-shelfGrid__item-price__sale\">セール商品</span>
";
}
// line 288
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, false, 288)) {
// line 289
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, false, 289) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, false, 289))) {
// line 290
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 290)), "html", null, true);
echo "
";
} else {
// line 292
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 292)), "html", null, true);
echo " ~ ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, false, 292)), "html", null, true);
echo "
";
}
// line 294
echo " ";
} else {
// line 295
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMin", [], "any", false, false, false, 295)), "html", null, true);
echo "
";
}
// line 297
echo " </p>
<div class=\"ec-shelfGrid__item-flex__favorite\">
<form class=\"ec-favoriteForm\" action=\"?\" method=\"?\">
<div class=\"ec-productRole__btn\">
<button data-method=\"POST\" data-action=\"";
// line 301
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_favorite", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 301)]), "html", null, true);
echo "\" id=\"favorite\" class=\"";
if ((twig_get_attribute($this->env, $this->source, ($context["isFavorite"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 301), [], "array", true, true, false, 301) && (twig_get_attribute($this->env, $this->source, (isset($context["isFavorite"]) || array_key_exists("isFavorite", $context) ? $context["isFavorite"] : (function () { throw new RuntimeError('Variable "isFavorite" does not exist.', 301, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 301), [], "array", false, false, false, 301) == true))) {
echo " d-none ";
}
echo " ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"";
// line 302
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/favorite/before.svg"), "html", null, true);
echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
<button data-method=\"DELETE\" data-action=\"";
// line 304
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_favorite_delete", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 304)]), "html", null, true);
echo "\" id=\"favorite\" class=\"";
if ((twig_get_attribute($this->env, $this->source, ($context["isFavorite"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 304), [], "array", true, true, false, 304) && (twig_get_attribute($this->env, $this->source, (isset($context["isFavorite"]) || array_key_exists("isFavorite", $context) ? $context["isFavorite"] : (function () { throw new RuntimeError('Variable "isFavorite" does not exist.', 304, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 304), [], "array", false, false, false, 304) == false))) {
echo " d-none ";
}
echo "ec-blockFavoriteBtnDisable ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"";
// line 305
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/favorite/after.svg"), "html", null, true);
echo "\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
</div>
</form>
</div>
</div>
";
}
// line 312
echo " </a>
";
// line 313
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 314
echo " ";
if ((( !twig_get_attribute($this->env, $this->source, $context["Product"], "getStockUnlimitedMin", [], "any", false, false, false, 314) && (twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 314) <= 0)) && twig_get_attribute($this->env, $this->source, $context["Product"], "isStockDiscontinued", [], "any", false, false, false, 314))) {
// line 315
echo " <div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
";
// line 317
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("在庫なし"), "html", null, true);
echo "
</button>
</div>
";
} else {
// line 321
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.', 321, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 321), [], "array", false, false, false, 321);
// line 322
echo " <form class=\"productForm\" name=\"form";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 322), "html", null, true);
echo "\" id=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 322), "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, false, 322)]), "html", null, true);
echo "\" method=\"post\">
<div class=\"ec-productRole__actions\">
";
// line 324
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id1", [], "any", true, true, false, 324)) {
// line 325
echo " <div class=\"ec-select\">
";
// line 326
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 326, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 326), 'widget');
echo "
";
// line 327
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 327, $this->source); })()), "classcategory_id1", [], "any", false, false, false, 327), 'errors');
echo "
</div>
";
// line 329
if (twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "classcategory_id2", [], "any", true, true, false, 329)) {
// line 330
echo " <div class=\"ec-select\">
";
// line 331
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 331, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 331), 'widget');
echo "
";
// line 332
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 332, $this->source); })()), "classcategory_id2", [], "any", false, false, false, 332), 'errors');
echo "
</div>
";
}
// line 335
echo " ";
}
// line 336
echo " <div class=\"ec-numberInput d-none\"><span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html", null, true);
echo "</span>
";
// line 337
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 337, $this->source); })()), "quantity", [], "any", false, false, false, 337), 'widget', ["attr" => ["class" => "quantity"]]);
echo "
";
// line 338
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.', 338, $this->source); })()), "quantity", [], "any", false, false, false, 338), 'errors');
echo "
</div>
</div>
";
// line 342
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 342, $this->source); })()), 'rest');
echo "
</form>
";
// line 344
$context["default"] = 0;
// line 345
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 345), [], "array", true, true, false, 345)) {
// line 346
echo " ";
$context["default"] = twig_get_attribute($this->env, $this->source, (isset($context["itemInCart"]) || array_key_exists("itemInCart", $context) ? $context["itemInCart"] : (function () { throw new RuntimeError('Variable "itemInCart" does not exist.', 346, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 346), [], "array", false, false, false, 346);
// line 347
echo " ";
}
// line 348
echo " ";
$context["disabled"] = false;
// line 349
echo " ";
if ( !twig_get_attribute($this->env, $this->source, $context["Product"], "isStockDiscontinued", [], "any", false, false, false, 349)) {
// line 350
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
";
} else {
// line 352
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 352) <= (isset($context["default"]) || array_key_exists("default", $context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.', 352, $this->source); })()))) {
// line 353
echo " ";
$context["disabled"] = true;
// line 354
echo " ";
}
// line 355
echo " <input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "getStockMin", [], "any", false, false, false, 355), "html", null, true);
echo "\">
";
}
// line 357
echo " <div class=\"ec-productRole__btn--group ec-productRole__btn ";
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 357), [], "array", true, true, false, 357)) {
echo " d-block ";
} else {
echo " d-none ";
}
echo "\">
<div class=\"d-flex align-items-center ec-productRole__btn-wrapper\">
<button class=\"minus__btn\" data-cartid=\"";
// line 359
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 359), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 359), "html", null, true);
echo "\">
<span>−</span>
</button>
<span class=\"quantity_label\">";
// line 362
echo twig_escape_filter($this->env, (isset($context["default"]) || array_key_exists("default", $context) ? $context["default"] : (function () { throw new RuntimeError('Variable "default" does not exist.', 362, $this->source); })()), "html", null, true);
echo "</span>
<button class=\"plus__btn\" data-cartid=\"";
// line 363
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 363), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 363), "html", null, true);
echo "\" ";
if ((isset($context["disabled"]) || array_key_exists("disabled", $context) ? $context["disabled"] : (function () { throw new RuntimeError('Variable "disabled" does not exist.', 363, $this->source); })())) {
echo "disabled";
}
echo ">
<span>+</span>
</button>
</div>
</div>
<div class=\"ec-productRole__btn--only ec-productRole__btn ";
// line 368
if (twig_get_attribute($this->env, $this->source, ($context["itemInCart"] ?? null), twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 368), [], "array", true, true, false, 368)) {
echo " d-none ";
} else {
echo " d-block ";
}
echo "\">
<button type=\"submit\" class=\"ec-regular__btn add-cart\" data-cartid=\"";
// line 369
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 369), "html", null, true);
echo "\" form=\"productForm";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, false, 369), "html", null, true);
echo "\">
";
// line 370
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html", null, true);
echo "
</button>
</div>
";
}
// line 374
echo " ";
} else {
// line 375
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("entry_contact");
echo "\" class=\"ec-blockProductBtn--action\">会員登録はこちら</a>
";
}
// line 377
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 379
echo " </ul>
</div>
";
} else {
// line 382
echo " <div class=\"ec-shelfRole\">
";
// line 383
$this->loadTemplate("Block/product_table.twig", "Product/list.twig", 383)->display(twig_array_merge($context, ["pagination" => (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 383, $this->source); })()), "itemInCart" => (isset($context["itemInCart"]) || array_key_exists("itemInCart", $context) ? $context["itemInCart"] : (function () { throw new RuntimeError('Variable "itemInCart" does not exist.', 383, $this->source); })()), "forms" => (isset($context["forms"]) || array_key_exists("forms", $context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.', 383, $this->source); })())]));
// line 384
echo " </div>
";
}
// line 386
echo " <div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<div class=\"ec-modal-icon\">
<img src=\"";
// line 392
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/icon_cart.png", "user_data"), "html", null, true);
echo "\" alt=\"\">
</div>
</div>
</div>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 396
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
</div>
</div>
</div>
<ul class=\"stockList bottom\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
<div class=\"ec-pagerRole\">
";
// line 415
$this->loadTemplate("pager.twig", "Product/list.twig", 415)->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.', 415, $this->source); })()), "paginationData", [], "any", false, false, false, 415)]));
// line 416
echo " </div>
";
}
// line 418
echo " ";
}
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Product/list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 932 => 418, 928 => 416, 926 => 415, 904 => 396, 897 => 392, 889 => 386, 885 => 384, 883 => 383, 880 => 382, 875 => 379, 860 => 377, 854 => 375, 851 => 374, 844 => 370, 838 => 369, 830 => 368, 816 => 363, 812 => 362, 804 => 359, 794 => 357, 788 => 355, 785 => 354, 782 => 353, 779 => 352, 775 => 350, 772 => 349, 769 => 348, 766 => 347, 763 => 346, 760 => 345, 758 => 344, 753 => 342, 746 => 338, 742 => 337, 737 => 336, 734 => 335, 728 => 332, 724 => 331, 721 => 330, 719 => 329, 714 => 327, 710 => 326, 707 => 325, 705 => 324, 695 => 322, 692 => 321, 685 => 317, 681 => 315, 678 => 314, 676 => 313, 673 => 312, 663 => 305, 655 => 304, 650 => 302, 642 => 301, 636 => 297, 630 => 295, 627 => 294, 619 => 292, 613 => 290, 610 => 289, 607 => 288, 603 => 286, 601 => 285, 597 => 283, 591 => 281, 588 => 280, 583 => 272, 580 => 271, 576 => 269, 573 => 268, 569 => 266, 566 => 265, 562 => 263, 560 => 262, 557 => 261, 549 => 254, 545 => 252, 539 => 250, 537 => 249, 528 => 242, 526 => 241, 522 => 240, 519 => 239, 515 => 237, 504 => 235, 500 => 234, 497 => 233, 495 => 232, 486 => 231, 484 => 230, 479 => 228, 476 => 227, 459 => 226, 455 => 224, 452 => 223, 450 => 222, 432 => 206, 425 => 202, 421 => 201, 417 => 199, 415 => 198, 412 => 197, 406 => 195, 401 => 193, 398 => 192, 396 => 191, 391 => 188, 379 => 186, 375 => 185, 370 => 184, 366 => 183, 362 => 181, 356 => 178, 353 => 177, 351 => 176, 346 => 174, 341 => 171, 339 => 167, 336 => 166, 322 => 165, 315 => 160, 313 => 159, 305 => 157, 302 => 156, 300 => 155, 298 => 154, 281 => 153, 276 => 150, 274 => 149, 267 => 145, 256 => 137, 251 => 134, 241 => 133, 197 => 98, 187 => 91, 115 => 21, 101 => 20, 93 => 19, 76 => 18, 72 => 16, 62 => 15, 51 => 11, 49 => 13, 36 => 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();
});
var modalTimer;
\$('.add-cart').on('click', function(e) {
var self = \$(this);
onAddCart(e, \$(this), 1, function() {
var \$form = self.parents('li');
\$form.find(\".ec-productRole__btn--only\").addClass(\"d-none\");
\$form.find(\".ec-productRole__btn--group\").removeClass(\"d-none\");
window.clearTimeout(modalTimer);
\$('.ec-modal').show()
modalTimer = window.setTimeout(function() {
\$('.ec-modal').hide();
}, 1500)
});
});
\$('.minus__btn').on('click', function(e) {
onAddCart(e, \$(this), -1);
})
\$('.plus__btn').on('click', function(e) {
onAddCart(e, \$(this));
})
function onAddCart(e, self, quantity = 1, callback) {
var \$form = \$(self).parents('li').find('form.productForm');
// 個数フォームのチェック
\$form.parent().find('.quantity').val(quantity);
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$(self).prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
var \$quantityLabelEl = \$(self).parents('li').find('.quantity_label');
\$quantityLabelEl.text(\$quantityLabelEl.text() * 1 + quantity * 1);
if(callback) {
callback();
}
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
\$(self).prop('disabled', false);
}).always(function(data) {
var \$parent = \$(self).parents('li');
let stockVal = \$parent.find('.stock').val() * 1;
var \$quantityLabelEl = \$parent.find('.quantity_label');
var _quantity = \$quantityLabelEl.text() * 1;
if(_quantity == 0) {
// enable minus button
\$(self).prop('disabled', false);
\$parent.find(\".ec-productRole__btn--only\").removeClass(\"d-none\");
\$parent.find(\".ec-productRole__btn--group\").addClass(\"d-none\");
}
if(_quantity > 0 && _quantity < stockVal) {
// Buttonを有効にする
\$(self).prop('disabled', false);
\$parent.find('.plus__btn').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 %}
<div class=\"ec-searchnavRole__topicpath\">
<ul class=\"breadcrumb w-p\">
<li class=\"breadcrumb__item\">
<a href=\"{{ url('product_list') }}\" class=\"breadcrumb__item__link\">
ホーム
</a>
</li>
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
<li class=\"breadcrumb__item\">
<a href=\"{{ url('product_list') }}\" class=\"breadcrumb__item__link\">
商品一覧
</a>
</li>
{% if Category is not null %}
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
{% for Path in Category.path %}
{% if Path.id != constant('Customize\\\\Common\\\\Constant::MANUFACTURER_CATEGORY_ID')
and Path.id != constant('Customize\\\\Common\\\\Constant::DEFAULT_CATEGORY_ID') %}
<li class=\"breadcrumb__item\">
<a class=\"breadcrumb__item__link\" href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
</li>
{%- if loop.last == false %}
<li class=\"breadcrumb__item\">
<p class=\"breadcrumb__item__arrow\">></p>
</li>
{% endif -%}
{% endif %}
{% endfor %}
{% endif %}
{# {% if search_form.vars.value and search_form.vars.value.name %}
<li class=\"ec-topicpath__divider\">|</li>
<li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
{% endif %} #}
</ul>
</div>
<div class=\"ec-pageHeader contentHeader\">
<h1>{{ '商品一覧'|trans }}</h1>
</div>
{% if search_form.category_id.vars.errors|length > 0 %}
<div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
</div>
{% else %}
<div class=\"ec-searchnavRole\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
{% for item in search_form %}
<input type=\"hidden\" id=\"{{ item.vars.id }}\"
name=\"{{ item.vars.full_name }}\"
{% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
{% endfor %}
</form>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
{% if pagination.totalItemCount > 0 %}
<p class=\"ec-searchnavRole__counter__title\">検索結果</p>
{{ '<p class=\"ec-searchnavRole__counter__number\">%count%件</p>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
{{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
</div>
{% endif %}
</div>
</div>
<ul class=\"stockList\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
{% if pagination.totalItemCount > 0 %}
{% if isShowProductImage %}
<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=\"ec-shelfGrid__item-image\">
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') | imagine_filter('resize', {
\"thumbnail\": {\"size\": [250, 250] }}) }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
{% if Product.Tags|length > 0 %}
<ul class=\"ec-shelfGrid__item-tags\">
{% for Tag in Product.Tags %}
<li class=\"ec-shelfGrid__item-tags__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
<p class=\"ec-shelfGrid__item-name\">{{ Product.name }}</p>
{% if is_granted('ROLE_USER') %}
<div class=\"ec-shelfGrid__item-stock\">
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【発送目安】
</p>
<p class=\"ec-shelfGrid__item-stock__block__detail\">
{% if Product.getDeliveryDuration %}
{{Product.getDeliveryDuration.name}}
{% else %}
指定なし
{% endif %}
</p>
</div>
<div class=\"ec-shelfGrid__item-stock__block\">
<p class=\"ec-shelfGrid__item-stock__block__title\">
【在庫】
</p>
{# 在庫をマークで表示何個から何個か◎等はこれから確認 #}
<p class=\"ec-shelfGrid__item-stock__block__detail\">
{% if Product.getStockUnlimitedMin or Product.getStockMin >= 10 %}
◎
{% else %}
{% if Product.getStockMin >= 1 and Product.getStockMin <= 9 %}
○
{% endif %}
{% if Product.getStockMin <= 0 %}
■
{% endif %}
{% endif %}
</p>
</div>
</div>
{# {% if not Product.getStockUnlimitedMin %}
<p>
発送可能{{Product.getStockMin}}個
</p>
{% endif %} #}
{% if Product.description_list %}
<p>{{ Product.description_list|raw|nl2br }}</p>
{% endif %}
<div class=\"ec-shelfGrid__item-flex\">
<p class=\"price02-default ec-shelfGrid__item-price\">
{% if Product.isInSale %}
<span class=\"ec-shelfGrid__item-price__sale\">セール商品</span>
{% endif %}
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}
</p>
<div class=\"ec-shelfGrid__item-flex__favorite\">
<form class=\"ec-favoriteForm\" action=\"?\" method=\"?\">
<div class=\"ec-productRole__btn\">
<button data-method=\"POST\" data-action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" id=\"favorite\" class=\"{% if isFavorite[Product.id] is defined and isFavorite[Product.id] == true %} d-none {% endif %} ec-blockFavoriteBtn ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"{{ asset('assets/img/favorite/before.svg') }}\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
<button data-method=\"DELETE\" data-action=\"{{ url('product_favorite_delete', {id:Product.id}) }}\" id=\"favorite\" class=\"{% if isFavorite[Product.id] is defined and isFavorite[Product.id] == false %} d-none {% endif %}ec-blockFavoriteBtnDisable ec-blockBtn--cancel ec-shelfGrid__item-flex__favorite__btn\">
<img src=\"{{ asset('assets/img/favorite/after.svg') }}\" alt=\"お気に入り\" width=\"24\" height=\"24\" loading=\"lazy\">
</button>
</div>
</form>
</div>
</div>
{% endif %}
</a>
{% if is_granted('ROLE_USER') %}
{% if not Product.getStockUnlimitedMin and Product.getStockMin <= 0 and Product.isStockDiscontinued %}
<div class=\"ec-productRole__btn\">
<button type=\"button\" class=\"ec-disabled__btn\" disabled=\"disabled\">
{{ '在庫なし'|trans }}
</button>
</div>
{% else %}
{% set form = forms[Product.id] %}
<form class=\"productForm\" 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 d-none\"><span>{{ '数量'|trans }}</span>
{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}} ) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{{ form_rest(form) }}
</form>
{% set default = 0 %}
{% if itemInCart[Product.id] is defined %}
{% set default = itemInCart[Product.id] %}
{% endif %}
{% set disabled = false %}
{% if not Product.isStockDiscontinued %}
<input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"999999999999\">
{% else %}
{% if Product.getStockMin <= default %}
{% set disabled = true %}
{% endif %}
<input type=\"hidden\" name=\"stock\" class=\"stock\" value=\"{{Product.getStockMin}}\">
{% endif %}
<div class=\"ec-productRole__btn--group ec-productRole__btn {% if itemInCart[Product.id] is defined %} d-block {% else %} d-none {% endif %}\">
<div class=\"d-flex align-items-center ec-productRole__btn-wrapper\">
<button class=\"minus__btn\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
<span>−</span>
</button>
<span class=\"quantity_label\">{{ default }}</span>
<button class=\"plus__btn\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\" {% if disabled %}disabled{% endif %}>
<span>+</span>
</button>
</div>
</div>
<div class=\"ec-productRole__btn--only ec-productRole__btn {% if itemInCart[Product.id] is defined %} d-none {% else %} d-block {% endif %}\">
<button type=\"submit\" class=\"ec-regular__btn add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% endif %}
{% else %}
<a href=\"{{ url('entry_contact') }}\" class=\"ec-blockProductBtn--action\">会員登録はこちら</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class=\"ec-shelfRole\">
{% include \"Block/product_table.twig\" with {'pagination': pagination, 'itemInCart': itemInCart, 'forms': forms} %}
</div>
{% endif %}
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<div class=\"ec-modal-icon\">
<img src=\"{{ asset('assets/img/icon/icon_cart.png', 'user_data') }}\" alt=\"\">
</div>
</div>
</div>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
</div>
</div>
</div>
<ul class=\"stockList bottom\">
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">在庫あり:</p>
<p class=\"stockList__block__mark\">◎</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">残りわずか:</p>
<p class=\"stockList__block__mark\">○</p>
</li>
<li class=\"stockList__block\">
<p class=\"stockList__block__text\">取り寄せ:</p>
<p class=\"stockList__block__mark\">■</p>
</li>
</ul>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
{% endif %}
{% endif %}
{% endblock %}
", "Product/list.twig", "/home/bravers/bravers.xbiz.jp/public_html/app/template/bravers/Product/list.twig");
}
}