<?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_1a563437a63fdbe176520530a139777849cc175d7e43ea68077c99a4c317c63a 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 ", ";
}
++$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 orderbySubmit (orderId) {
\$('#orderby').val(orderId);
\$('#pageno').val(1);
\$(\"#form1\").submit();
}
\$(document).mouseup(function(e)
{
var container = \$(\".orderbyLabel\");
// if the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0)
{
\$('.dropdownOrderbyList').css('visibility', 'hidden');
}
});
\$(function() {
var url_string = location.href;
var url = new URL(url_string);
var product_name = url.searchParams.get(\"name\");
var details_title = \"商品一覧\";
if (product_name)
details_title = product_name + \"の商品一覧\";
details_title = `<span>\${details_title}</span>`
\$('#list_name').html(details_title);
if (url.href.indexOf('orderby') < 0) {
\$('#orderby > div:first-child input').prop('checked', true);
\$('.orderbyLabel').text('並び替え');
\$('.dropdownOrderbyList > li:first-child').addClass('active');
} else {
var orderid = url.searchParams.get(\"orderby\");
\$(`.dropdownOrderbyList__item#orderby__\${orderid}`).addClass('active');
var orderLabel = \$(`.dropdownOrderbyList__item#orderby__\${orderid}`).text();
\$('.orderbyLabel').text(orderLabel);
}
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// sp 並び順を変更
\$('.orderbyLabel').on('click', function (e) {
e.preventDefault();
const element = document.querySelector('.dropdownOrderbyList');
const visibility = element.style.visibility;
if (visibility == 'visible') {
\$('.dropdownOrderbyList').css('visibility', 'hidden');
} else {
\$('.dropdownOrderbyList').css('visibility', 'visible');
}
});
// 並び順を変更
\$('.order-by input[name=\"orderby\"]').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 98
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html", null, true);
echo "');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '";
// line 126
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 133
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html", null, true);
echo "');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 151
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 152
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.', 152, $this->source); })()), "category_id", [], "any", false, false, false, 152), "vars", [], "any", false, false, false, 152), "errors", [], "any", false, false, false, 152)) > 0)) {
// line 153
echo " <div class=\"ec-searchnavRole\">
<p class=\"errormsg text-danger\">";
// line 154
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html", null, true);
echo "</p>
</div>
";
} else {
// line 157
echo " <div class=\"ec-searchnavRole\">
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
";
// line 160
if ((isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 160, $this->source); })())) {
// line 161
echo " <li class=\"ec-topicpath__item\">
<span>";
// line 162
echo twig_escape_filter($this->env, (isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 162, $this->source); })()), "html", null, true);
echo "の商品一覧";
echo "</span>
</li>
";
} else {
// line 165
echo " <li class=\"ec-topicpath__item\" id=\"list_name\">
";
// line 167
echo " </li>
";
}
// line 169
echo " </ol>
</div>
</div>
<div class=\"ec-blockspliter\"></div>
<div class=\"ec-searchnavRole ec-searchnavRole-height ec-productListSPSearchNav\">
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 175
$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.', 175, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 176
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, 176), "id", [], "any", false, false, false, 176), "html", null, true);
echo "\"
name=\"";
// line 177
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, 177), "full_name", [], "any", false, false, false, 177), "html", null, true);
echo "\"
";
// line 178
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, 178), "value", [], "any", false, false, false, 178))) {
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, 178), "value", [], "any", false, false, false, 178), "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 180
echo " </form>
<div class=\"ec-searchnavRole__infospace show-resultPC\">
";
// line 183
echo " ";
// line 184
echo " ";
// line 185
echo " ";
// line 186
echo " ";
// line 187
echo " ";
// line 188
echo " ";
// line 189
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("並び替え"), "html", null, true);
echo "</span>
</div>
<div class=\"ec-searchnavRole__infos ec-spOrderby show-resultSP\">
<div class=\"orderbyLabel\"></div>
<ul class=\"dropdownOrderbyList\">
";
// line 194
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["OrderList"]) || array_key_exists("OrderList", $context) ? $context["OrderList"] : (function () { throw new RuntimeError('Variable "OrderList" does not exist.', 194, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["orderitem"]) {
// line 195
echo " <li class=\"dropdownOrderbyList__item\" id=\"orderby__";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["orderitem"], "id", [], "any", false, false, false, 195), "html", null, true);
echo "\" onclick=\"orderbySubmit(";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["orderitem"], "id", [], "any", false, false, false, 195), "html", null, true);
echo ")\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["orderitem"], "name", [], "any", false, false, false, 195), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['orderitem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 197
echo " </ul>
</div>
<div class=\"ec-searchnavRole__infos show-resultPC\">
";
// line 200
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.', 200, $this->source); })()), "orderby", [], "any", false, false, false, 200), 'widget', ["attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
<div class=\"ec-blockspliter\"></div>
";
// line 204
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.', 204, $this->source); })()), "totalItemCount", [], "any", false, false, false, 204) > 0)) {
// line 205
echo " <div class=\"ec-role\">
<div class=\"ec-newItemRole\">
<div class=\"ec-newItemRole__list\">
";
// line 208
$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.', 208, $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 209
echo " <div class=\"ec-newItemRole__listItem\">
<a href=\"";
// line 210
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, 210)]), "html", null, true);
echo "\">
<figure>
<img src=\"";
// line 212
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, false, 212)), "save_image"), "html", null, true);
echo "\"
alt=\"";
// line 213
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 213), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 213) > 5)) {
echo " loading=\"lazy\"";
}
echo ">
</figure>
";
// line 215
if (twig_get_attribute($this->env, $this->source, $context["Product"], "new_arrival", [], "any", false, false, false, 215)) {
// line 216
echo " <span class=\"newitembadge\">NEW</span>
";
} else {
// line 218
echo " <span class=\"newitembadge\" style=\"background-color: unset;\"></span>
";
}
// line 220
echo " <div>
<p class=\"ec-newItemRole__listItemTitle\">";
// line 221
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, false, 221)), "html", null, true);
echo "</p>
<p class=\"ec-newItemRole__listItemPrice\">
";
// line 223
if (twig_get_attribute($this->env, $this->source, $context["Product"], "hasProductClass", [], "any", false, false, false, 223)) {
// line 224
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Min", [], "any", false, false, false, 224) == twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02Max", [], "any", false, false, false, 224))) {
// line 225
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, 225)), "html", null, true);
echo "
";
} else {
// line 227
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, 227)), "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, 227)), "html", null, true);
echo "
";
}
// line 229
echo " ";
} else {
// line 230
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, 230)), "html", null, true);
echo "
";
}
// line 231
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html", null, true);
echo "
</p>
</div>
</a>
</div>
";
++$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 237
echo " </div>
</div>
";
// line 239
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.', 239, $this->source); })()), "pageCount", [], "any", false, false, false, 239) > 1)) {
// line 240
echo " <div class=\"ec-blockspliter\"></div>
";
}
// line 242
echo " </div>
";
// line 243
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.', 243, $this->source); })()), "pageCount", [], "any", false, false, false, 243) > 1)) {
// line 244
echo " <div class=\"ec-role\">
<div class=\"ec-pagerRole ec-newsPagination\">
";
// line 246
$this->loadTemplate("pager.twig", "Product/list.twig", 246)->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.', 246, $this->source); })()), "paginationData", [], "any", false, false, false, 246)]));
// line 247
echo " </div>
</div>
";
}
// line 250
echo " <div class=\"ec-blockspliter productListSpliter\"></div>
<div class=\"ec-blockempty\"></div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
src=\"";
// line 256
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html", null, true);
echo "\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">";
// line 257
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html", null, true);
echo "</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">";
// line 260
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html", null, true);
echo "</span>
<a href=\"";
// line 261
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"ec-inlineBtn--action\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
</div>
";
}
// line 268
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 ( 564 => 268, 552 => 261, 548 => 260, 542 => 257, 538 => 256, 530 => 250, 525 => 247, 523 => 246, 519 => 244, 517 => 243, 514 => 242, 510 => 240, 508 => 239, 504 => 237, 484 => 231, 478 => 230, 475 => 229, 467 => 227, 461 => 225, 458 => 224, 456 => 223, 451 => 221, 448 => 220, 444 => 218, 440 => 216, 438 => 215, 429 => 213, 425 => 212, 420 => 210, 417 => 209, 400 => 208, 395 => 205, 393 => 204, 386 => 200, 381 => 197, 368 => 195, 364 => 194, 355 => 189, 353 => 188, 351 => 187, 349 => 186, 347 => 185, 345 => 184, 343 => 183, 339 => 180, 327 => 178, 323 => 177, 318 => 176, 314 => 175, 306 => 169, 302 => 167, 299 => 165, 292 => 162, 289 => 161, 287 => 160, 282 => 157, 276 => 154, 273 => 153, 270 => 152, 260 => 151, 233 => 133, 223 => 126, 192 => 98, 113 => 21, 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 orderbySubmit (orderId) {
\$('#orderby').val(orderId);
\$('#pageno').val(1);
\$(\"#form1\").submit();
}
\$(document).mouseup(function(e)
{
var container = \$(\".orderbyLabel\");
// if the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0)
{
\$('.dropdownOrderbyList').css('visibility', 'hidden');
}
});
\$(function() {
var url_string = location.href;
var url = new URL(url_string);
var product_name = url.searchParams.get(\"name\");
var details_title = \"商品一覧\";
if (product_name)
details_title = product_name + \"の商品一覧\";
details_title = `<span>\${details_title}</span>`
\$('#list_name').html(details_title);
if (url.href.indexOf('orderby') < 0) {
\$('#orderby > div:first-child input').prop('checked', true);
\$('.orderbyLabel').text('並び替え');
\$('.dropdownOrderbyList > li:first-child').addClass('active');
} else {
var orderid = url.searchParams.get(\"orderby\");
\$(`.dropdownOrderbyList__item#orderby__\${orderid}`).addClass('active');
var orderLabel = \$(`.dropdownOrderbyList__item#orderby__\${orderid}`).text();
\$('.orderbyLabel').text(orderLabel);
}
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// sp 並び順を変更
\$('.orderbyLabel').on('click', function (e) {
e.preventDefault();
const element = document.querySelector('.dropdownOrderbyList');
const visibility = element.style.visibility;
if (visibility == 'visible') {
\$('.dropdownOrderbyList').css('visibility', 'hidden');
} else {
\$('.dropdownOrderbyList').css('visibility', 'visible');
}
});
// 並び順を変更
\$('.order-by input[name=\"orderby\"]').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
\$('.add-cart').on('click', function(e) {
var \$form = \$(this).parents('li').find('form');
// 個数フォームのチェック
var \$quantity = \$form.parent().find('.quantity');
if (\$quantity.val() < 1) {
\$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
setTimeout(function() {
loadingOverlay('hide');
}, 100);
return true;
} else {
\$quantity[0].setCustomValidity('');
}
e.preventDefault();
\$.ajax({
url: \$form.attr('action'),
type: \$form.attr('method'),
data: \$form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
\$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
\$.each(data.messages, function() {
\$('#ec-modal-header').text(this);
});
\$('.ec-modal').show()
// カートブロックを更新する
\$.ajax({
url: '{{ url('block_cart') }}',
type: 'GET',
dataType: 'html'
}).done(function(html) {
\$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
\$('.add-cart').prop('disabled', false);
});
});
});
\$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
\$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
\$('.ec-modal').hide()
});
</script>
{% endblock %}
{% block main %}
{% 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\">
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
{% if Category %}
<li class=\"ec-topicpath__item\">
<span>{{ Category }}{{ 'の商品一覧' }}</span>
</li>
{% else %}
<li class=\"ec-topicpath__item\" id=\"list_name\">
{# <span>{{ subtitle }}{{ 'の商品一覧' }}</span> #}
</li>
{% endif %}
</ol>
</div>
</div>
<div class=\"ec-blockspliter\"></div>
<div class=\"ec-searchnavRole ec-searchnavRole-height ec-productListSPSearchNav\">
<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__infospace show-resultPC\">
{# {% if pagination.totalItemCount > 0 %} #}
{# <div class=\"ec-searchnavRole__actions\"> #}
{# <div class=\"ec-select\"> #}
{# {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }} #}
{# </div> #}
{# </div> #}
{# {% endif %} #}
<span>{{ '並び替え'|trans }}</span>
</div>
<div class=\"ec-searchnavRole__infos ec-spOrderby show-resultSP\">
<div class=\"orderbyLabel\"></div>
<ul class=\"dropdownOrderbyList\">
{% for orderitem in OrderList %}
<li class=\"dropdownOrderbyList__item\" id=\"orderby__{{ orderitem.id }}\" onclick=\"orderbySubmit({{ orderitem.id }})\">{{ orderitem.name }}</li>
{% endfor %}
</ul>
</div>
<div class=\"ec-searchnavRole__infos show-resultPC\">
{{ form_widget(search_form.orderby, {'attr': {'class': 'order-by'}}) }}
</div>
</div>
<div class=\"ec-blockspliter\"></div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-role\">
<div class=\"ec-newItemRole\">
<div class=\"ec-newItemRole__list\">
{% for Product in pagination %}
<div class=\"ec-newItemRole__listItem\">
<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
<figure>
<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\"
alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
</figure>
{% if Product.new_arrival %}
<span class=\"newitembadge\">NEW</span>
{% else %}
<span class=\"newitembadge\" style=\"background-color: unset;\"></span>
{% endif %}
<div>
<p class=\"ec-newItemRole__listItemTitle\">{{ Product.name|trans }}</p>
<p class=\"ec-newItemRole__listItemPrice\">
{% if Product.hasProductClass %}
{% if Product.getPrice02Min == Product.getPrice02Max %}
{{ Product.getPrice02IncTaxMin|price }}
{% else %}
{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
{% endif %}
{% else %}
{{ Product.getPrice02IncTaxMin|price }}
{% endif %}{{ '(税込)'|trans }}
</p>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
{% if pagination.pageCount > 1 %}
<div class=\"ec-blockspliter\"></div>
{% endif %}
</div>
{% if pagination.pageCount > 1 %}
<div class=\"ec-role\">
<div class=\"ec-pagerRole ec-newsPagination\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
</div>
{% endif %}
<div class=\"ec-blockspliter productListSpliter\"></div>
<div class=\"ec-blockempty\"></div>
<div class=\"ec-modal\">
<div class=\"ec-modal-overlay\">
<div class=\"ec-modal-wrap\">
<span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
<div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
<div class=\"ec-modal-box\">
<div class=\"ec-role\">
<span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
<a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endblock %}
", "Product/list.twig", "/home/snowtiger27/www/three-m.online/app/template/default/Product/list.twig");
}
}