var/cache/dev/twig/05/05d5ab78508bcbdbfd28494d14b96062797ca5903c07e95269f584fed7a7df82.php line 16

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Product/list.twig */
  14. class __TwigTemplate_f49af4555fb1373ab1f5338a84d28263763bef4a20a2709ca1d040989078beb1 extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'javascript' => [$this'block_javascript'],
  24.             'main' => [$this'block_main'],
  25.         ];
  26.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  27.         $this->checkSecurity();
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 11
  32.         return "default_frame.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  41.         // line 13
  42.         $context["body_class"] = "product_page";
  43.         // line 11
  44.         $this->parent $this->loadTemplate("default_frame.twig""Product/list.twig"11);
  45.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  48.         
  49.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  50.     }
  51.     // line 15
  52.     public function block_javascript($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  59.         // line 16
  60.         echo "    <script>
  61.         eccube.productsClassCategories = {
  62.             ";
  63.         // line 18
  64.         $context['_parent'] = $context;
  65.         $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); })()));
  66.         $context['loop'] = [
  67.           'parent' => $context['_parent'],
  68.           'index0' => 0,
  69.           'index'  => 1,
  70.           'first'  => true,
  71.         ];
  72.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  73.             $length count($context['_seq']);
  74.             $context['loop']['revindex0'] = $length 1;
  75.             $context['loop']['revindex'] = $length;
  76.             $context['loop']['length'] = $length;
  77.             $context['loop']['last'] = === $length;
  78.         }
  79.         foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  80.             // line 19
  81.             echo "            \"";
  82.             echo twig_escape_filter($this->envtwig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue19), 19$this->source), "js"), "html"nulltrue);
  83.             echo "\": ";
  84.             echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 19$this->source));
  85.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue19) == false)) {
  86.                 echo ", ";
  87.             }
  88.             // line 20
  89.             echo "            ";
  90.             ++$context['loop']['index0'];
  91.             ++$context['loop']['index'];
  92.             $context['loop']['first'] = false;
  93.             if (isset($context['loop']['length'])) {
  94.                 --$context['loop']['revindex0'];
  95.                 --$context['loop']['revindex'];
  96.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  97.             }
  98.         }
  99.         $_parent $context['_parent'];
  100.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  101.         $context array_intersect_key($context$_parent) + $_parent;
  102.         // line 21
  103.         echo "        };
  104.         \$(function() {
  105.             // 表示件数を変更
  106.             \$('.disp-number').change(function() {
  107.                 var dispNumber = \$(this).val();
  108.                 \$('#disp_number').val(dispNumber);
  109.                 \$('#pageno').val(1);
  110.                 \$(\"#form1\").submit();
  111.             });
  112.             // 並び順を変更
  113.             \$('.order-by').change(function() {
  114.                 var orderBy = \$(this).val();
  115.                 \$('#orderby').val(orderBy);
  116.                 \$('#pageno').val(1);
  117.                 \$(\"#form1\").submit();
  118.             });
  119.             \$('.add-cart').on('click', function(e) {
  120.                 var \$form = \$(this).parents('li').find('form');
  121.                 // 個数フォームのチェック
  122.                 var \$quantity = \$form.parent().find('.quantity');
  123.                 if (\$quantity.val() < 1) {
  124.                     \$quantity[0].setCustomValidity('";
  125.         // line 47
  126.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  127.         echo "');
  128.                     setTimeout(function() {
  129.                         loadingOverlay('hide');
  130.                     }, 100);
  131.                     return true;
  132.                 } else {
  133.                     \$quantity[0].setCustomValidity('');
  134.                 }
  135.                 e.preventDefault();
  136.                 \$.ajax({
  137.                     url: \$form.attr('action'),
  138.                     type: \$form.attr('method'),
  139.                     data: \$form.serialize(),
  140.                     dataType: 'json',
  141.                     beforeSend: function(xhr, settings) {
  142.                         // Buttonを無効にする
  143.                         \$('.add-cart').prop('disabled', true);
  144.                     }
  145.                 }).done(function(data) {
  146.                     // レスポンス内のメッセージをalertで表示
  147.                     \$.each(data.messages, function() {
  148.                         \$('#ec-modal-header').html(this);
  149.                     });
  150.                     \$('.ec-modal').show()
  151.                     // カートブロックを更新する
  152.                     \$.ajax({
  153.                         url: '";
  154.         // line 75
  155.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  156.         echo "',
  157.                         type: 'GET',
  158.                         dataType: 'html'
  159.                     }).done(function(html) {
  160.                         \$('.ec-headerRole__cart').html(html);
  161.                     });
  162.                 }).fail(function(data) {
  163.                     alert('";
  164.         // line 82
  165.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  166.         echo "');
  167.                 }).always(function(data) {
  168.                     // Buttonを有効にする
  169.                     \$('.add-cart').prop('disabled', false);
  170.                 });
  171.             });
  172.         });
  173.         \$('.ec-modal-overlay, .ec-modal .ec-inlineBtn--cancel').on('click', function() {
  174.             \$('.ec-modal').hide()
  175.         });
  176.     </script>
  177. ";
  178.         
  179.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  180.         
  181.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  182.     }
  183.     // line 96
  184.     public function block_main($context, array $blocks = [])
  185.     {
  186.         $macros $this->macros;
  187.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  188.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  189.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  190.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  191.         // line 97
  192.         echo "
  193.     ";
  194.         // line 99
  195.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'99$this->source); })()), "category_id", [], "any"falsefalsetrue99), "vars", [], "any"falsefalsetrue99), "errors", [], "any"falsefalsetrue99)) > 0)) {
  196.             // line 100
  197.             echo "        <div class=\"ec-searchnavRole\">
  198.             <p class=\"errormsg text-danger\">";
  199.             // line 101
  200.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  201.             echo "</p>
  202.         </div>
  203.     ";
  204.         } else {
  205.             // line 104
  206.             echo "        ";
  207.             // line 150
  208.             echo "        <div class=\"ak-header\">
  209.             <div class=\"ak-pageHeader\">
  210.                 <h1 style=\"text-align: center\">PRODUCTS</h1>
  211.             </div>
  212. ";
  213.             // line 155
  214.             $context["Categories"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method"falsefalsetrue155);
  215.             // line 156
  216.             echo "
  217. ";
  218.             // line 183
  219.             echo "
  220. ";
  221.             // line 185
  222.             $macros["__internal_parse_1"] = $this;
  223.             // line 186
  224.             echo "<div class=\"ec-headerCategoryArea\">
  225.     <div class=\"ec-itemNav\">
  226.         <ul class=\"ec-itemNav__nav\">
  227.                 ";
  228.             // line 189
  229.             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.'189$this->source); })()), "params", [], "any"falsefalsetrue189)) {
  230.                 // line 190
  231.                 echo "                <li><a href=\"";
  232.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
  233.                 echo "products/list\">全て</a></li>
  234.                 ";
  235.             } else {
  236.                 // line 192
  237.                 echo "                <li><a class=\"active\" href=\"";
  238.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
  239.                 echo "products/list\">全て</a></li>
  240.                 ";
  241.             }
  242.             // line 194
  243.             echo "                
  244.     ";
  245.             // line 196
  246.             echo "    ";
  247.             $context['_parent'] = $context;
  248.             $context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'196$this->source); })()), function ($__a__$__b__) use ($context$macros) { $context["a"] = $__a__$context["b"] = $__b__; return (twig_get_attribute($this->env$this->source, (isset($context["b"]) || array_key_exists("b"$context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.'196$this->source); })()), "sort_no", [], "any"falsefalsetrue196) <=> twig_get_attribute($this->env$this->source, (isset($context["a"]) || array_key_exists("a"$context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.'196$this->source); })()), "sort_no", [], "any"falsefalsetrue196)); }));
  249.             foreach ($context['_seq'] as $context["_key"] => $context["TopCategory"]) {
  250.                 // line 197
  251.                 echo "        ";
  252.                 if (twig_test_empty(twig_get_attribute($this->env$this->source$context["TopCategory"], "parent", [], "any"falsefalsetrue197))) {
  253.                     echo " ";
  254.                     // line 198
  255.                     echo "            <li>
  256.                 ";
  257.                     // line 199
  258.                     echo twig_call_macro($macros["__internal_parse_1"], "macro_treeCategory", [$context["TopCategory"], (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'199$this->source); })())], 199$context$this->getSourceContext());
  259.                     echo "
  260.             </li>
  261.         ";
  262.                 }
  263.                 // line 202
  264.                 echo "    ";
  265.             }
  266.             $_parent $context['_parent'];
  267.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['TopCategory'], $context['_parent'], $context['loop']);
  268.             $context array_intersect_key($context$_parent) + $_parent;
  269.             // line 203
  270.             echo "        </ul>
  271.     </div>
  272. </div>
  273. <style>
  274. #akracing .ak-header .ec-headerCategoryArea .ec-itemNav__nav a.active{
  275.     color : #f00;
  276. }
  277. </style>
  278.         </div><!-- ak-header -->
  279. ";
  280.             // line 214
  281.             $context["Categories"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method"falsefalsetrue214);
  282.             // line 215
  283.             echo "
  284. ";
  285.             // line 339
  286.             echo "
  287. ";
  288.             // line 341
  289.             $macros["__internal_parse_3"] = $this;
  290.             // line 342
  291.             echo "
  292. <div class=\"ak-body\">
  293.     <div class=\"\">
  294.             ";
  295.             // line 345
  296.             $context['_parent'] = $context;
  297.             $context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, (isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'345$this->source); })()), function ($__a__$__b__) use ($context$macros) { $context["a"] = $__a__$context["b"] = $__b__; return (twig_get_attribute($this->env$this->source, (isset($context["b"]) || array_key_exists("b"$context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.'345$this->source); })()), "sort_no", [], "any"falsefalsetrue345) <=> twig_get_attribute($this->env$this->source, (isset($context["a"]) || array_key_exists("a"$context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.'345$this->source); })()), "sort_no", [], "any"falsefalsetrue345)); }));
  298.             foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  299.                 // line 346
  300.                 echo "            
  301.             ";
  302.                 // line 347
  303.                 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.'347$this->source); })()), "params", [], "any"falsefalsetrue347) == null) ||  !twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["pagination"] ?? null), "params", [], "any"falsetruetrue347), "category_id", [], "array"truetruetrue347))) {
  304.                     // line 348
  305.                     echo "            ";
  306.                     // line 349
  307.                     echo "                    ";
  308.                     echo twig_call_macro($macros["__internal_parse_3"], "macro_tree", [$context["Category"], (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'349$this->source); })()), (isset($context["forms"]) || array_key_exists("forms"$context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.'349$this->source); })())], 349$context$this->getSourceContext());
  309.                     echo "
  310.             ";
  311.                 } else {
  312.                     // line 351
  313.                     echo "            ";
  314.                     // line 352
  315.                     echo "                ";
  316.                     // line 353
  317.                     echo "                ";
  318.                     // line 354
  319.                     echo "                ";
  320.                     $context["categoryId"] = twig_get_attribute($this->env$this->sourcetwig_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.'354$this->source); })()), "params", [], "any"falsefalsetrue354), "category_id", [], "array"falsefalsetrue354);
  321.                     // line 355
  322.                     echo "                ";
  323.                     if (((isset($context["categoryId"]) || array_key_exists("categoryId"$context) ? $context["categoryId"] : (function () { throw new RuntimeError('Variable "categoryId" does not exist.'355$this->source); })()) == twig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsetrue355))) {
  324.                         // line 356
  325.                         echo "                    ";
  326.                         echo twig_call_macro($macros["__internal_parse_3"], "macro_tree", [$context["Category"], (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'356$this->source); })()), (isset($context["forms"]) || array_key_exists("forms"$context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.'356$this->source); })())], 356$context$this->getSourceContext());
  327.                         echo "
  328.                 ";
  329.                     }
  330.                     // line 358
  331.                     echo "            ";
  332.                 }
  333.                 // line 359
  334.                 echo "            ";
  335.             }
  336.             $_parent $context['_parent'];
  337.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  338.             $context array_intersect_key($context$_parent) + $_parent;
  339.             // line 360
  340.             echo "    </div>
  341. </div>
  342.         ";
  343.             // line 363
  344.             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.'363$this->source); })()), "totalItemCount", [], "any"falsefalsetrue363) > 0)) {
  345.                 // line 364
  346.                 echo "            <div class=\"ec-modal\">
  347.                 <div class=\"ec-modal-overlay\">
  348.                     <div class=\"ec-modal-wrap\">
  349.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  350.                 // line 367
  351.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  352.                 echo "\" alt=\"\" loading=\"lazy\"/></span></span>
  353.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  354.                 // line 368
  355.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  356.                 echo "</div>
  357.                         <div class=\"ec-modal-box\">
  358.                             <div class=\"ec-role\">
  359.                                 <span class=\"ec-inlineBtn--cancel\">";
  360.                 // line 371
  361.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  362.                 echo "</span>
  363.                                 <a href=\"";
  364.                 // line 372
  365.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  366.                 echo "\" class=\"ec-inlineBtn--action\">";
  367.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  368.                 echo "</a>
  369.                             </div>
  370.                         </div>
  371.                     </div>
  372.                 </div>
  373.             </div>
  374.             <div class=\"ec-pagerRole\">
  375.                 ";
  376.                 // line 379
  377.                 $this->loadTemplate("pager.twig""Product/list.twig"379)->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.'379$this->source); })()), "paginationData", [], "any"falsefalsetrue379)]));
  378.                 // line 380
  379.                 echo "            </div>
  380.         ";
  381.             }
  382.             // line 382
  383.             echo "    ";
  384.         }
  385.         
  386.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  387.         
  388.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  389.     }
  390.     // line 157
  391.     public function macro_treeCategory($__Category__ null$__pagination__ null, ...$__varargs__)
  392.     {
  393.         $macros $this->macros;
  394.         $context $this->env->mergeGlobals([
  395.             "Category" => $__Category__,
  396.             "pagination" => $__pagination__,
  397.             "varargs" => $__varargs__,
  398.         ]);
  399.         $blocks = [];
  400.         ob_start();
  401.         try {
  402.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  403.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""treeCategory"));
  404.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  405.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""treeCategory"));
  406.             // line 158
  407.             echo "    ";
  408.             $macros["__internal_parse_0"] = $this;
  409.             // line 159
  410.             echo "    
  411.     ";
  412.             // line 161
  413.             echo "    ";
  414.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["pagination"] ?? null), "params", [], "any"falsetruetrue161), "category_id", [], "array"truetruetrue161) && (twig_get_attribute($this->env$this->sourcetwig_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.'161$this->source); })()), "params", [], "any"falsefalsetrue161), "category_id", [], "array"falsefalsetrue161) == 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.'161$this->source); })()), "id", [], "any"falsefalsetrue161)))) {
  415.                 // line 162
  416.                 echo "        <a class=\"active\" href=\"";
  417.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  418.                 echo "?category_id=";
  419.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'162$this->source); })()), "id", [], "any"falsefalsetrue162), 162$this->source), "html"nulltrue);
  420.                 echo "\">
  421.             ";
  422.                 // line 163
  423.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'163$this->source); })()), "name", [], "any"falsefalsetrue163), 163$this->source), "html"nulltrue);
  424.                 echo "
  425.         </a>
  426.     ";
  427.             } else {
  428.                 // line 166
  429.                 echo "        <a href=\"";
  430.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  431.                 echo "?category_id=";
  432.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'166$this->source); })()), "id", [], "any"falsefalsetrue166), 166$this->source), "html"nulltrue);
  433.                 echo "\">
  434.             ";
  435.                 // line 167
  436.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'167$this->source); })()), "name", [], "any"falsefalsetrue167), 167$this->source), "html"nulltrue);
  437.                 echo "
  438.         </a>
  439.     ";
  440.             }
  441.             // line 170
  442.             echo "
  443.     ";
  444.             // line 172
  445.             echo "    ";
  446.             // line 173
  447.             echo "    ";
  448.             if ((twig_length_filter($this->envtwig_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.'173$this->source); })()), "children", [], "any"falsefalsetrue173)) > 0)) {
  449.                 // line 174
  450.                 echo "        <ul>
  451.             ";
  452.                 // line 175
  453.                 $context['_parent'] = $context;
  454.                 $context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->envtwig_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.'175$this->source); })()), "children", [], "any"falsefalsetrue175), function ($__a__$__b__) use ($context$macros) { $context["a"] = $__a__$context["b"] = $__b__; return (twig_get_attribute($this->env$this->source, (isset($context["b"]) || array_key_exists("b"$context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.'175$this->source); })()), "sort_no", [], "any"falsefalsetrue175) <=> twig_get_attribute($this->env$this->source, (isset($context["a"]) || array_key_exists("a"$context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.'175$this->source); })()), "sort_no", [], "any"falsefalsetrue175)); }));
  455.                 foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
  456.                     // line 176
  457.                     echo "                <li>
  458.                     ";
  459.                     // line 177
  460.                     echo twig_call_macro($macros["__internal_parse_0"], "macro_treeCategory", [$context["ChildCategory"], (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'177$this->source); })())], 177$context$this->getSourceContext());
  461.                     echo "
  462.                 </li>
  463.             ";
  464.                 }
  465.                 $_parent $context['_parent'];
  466.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
  467.                 $context array_intersect_key($context$_parent) + $_parent;
  468.                 // line 180
  469.                 echo "        </ul>
  470.     ";
  471.             }
  472.             
  473.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  474.             
  475.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  476.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  477.         } finally {
  478.             ob_end_clean();
  479.         }
  480.     }
  481.     // line 216
  482.     public function macro_tree($__Category__ null$__pagination__ null$__forms__ null, ...$__varargs__)
  483.     {
  484.         $macros $this->macros;
  485.         $context $this->env->mergeGlobals([
  486.             "Category" => $__Category__,
  487.             "pagination" => $__pagination__,
  488.             "forms" => $__forms__,
  489.             "varargs" => $__varargs__,
  490.         ]);
  491.         $blocks = [];
  492.         ob_start();
  493.         try {
  494.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  495.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""tree"));
  496.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  497.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""tree"));
  498.             // line 217
  499.             echo "    ";
  500.             $macros["__internal_parse_2"] = $this;
  501.             // line 218
  502.             echo "                <h2><a href=\"";
  503.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  504.             echo "?category_id=";
  505.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'218$this->source); })()), "id", [], "any"falsefalsetrue218), 218$this->source), "html"nulltrue);
  506.             echo "\">";
  507.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'218$this->source); })()), "name", [], "any"falsefalsetrue218), 218$this->source), "html"nulltrue);
  508.             echo "</a></h2>
  509.                 ";
  510.             // line 220
  511.             echo "    ";
  512.             // line 221
  513.             echo "    ";
  514.             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.'221$this->source); })()), "totalItemCount", [], "any"falsefalsetrue221) > 0)) {
  515.                 // line 222
  516.                 echo "            <div class=\"ec-shelfRole\">
  517.                 <ul class=\"ec-shelfGrid\">
  518.                     ";
  519.                 // line 224
  520.                 $context['_parent'] = $context;
  521.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'224$this->source); })()));
  522.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  523.                     // line 225
  524.                     echo "                        ";
  525.                     $context["CategoryItemName"] = "";
  526.                     // line 226
  527.                     echo "                            ";
  528.                     // line 227
  529.                     echo "                            ";
  530.                     if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["Product"], "ProductCategories", [], "any"falsefalsetrue227))) {
  531.                         // line 228
  532.                         echo "                                ";
  533.                         $context['_parent'] = $context;
  534.                         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "ProductCategories", [], "any"falsefalsetrue228));
  535.                         foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  536.                             // line 229
  537.                             echo "                                
  538.                                     ";
  539.                             // line 230
  540.                             $context['_parent'] = $context;
  541.                             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsetrue230), "path", [], "any"falsefalsetrue230));
  542.                             foreach ($context['_seq'] as $context["_key"] => $context["CategoryItem"]) {
  543.                                 // line 231
  544.                                 echo "                                        ";
  545.                                 $context["CategoryItemName"] = twig_get_attribute($this->env$this->source$context["CategoryItem"], "name", [], "any"falsefalsetrue231);
  546.                                 // line 232
  547.                                 echo "                                    ";
  548.                             }
  549.                             $_parent $context['_parent'];
  550.                             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['CategoryItem'], $context['_parent'], $context['loop']);
  551.                             $context array_intersect_key($context$_parent) + $_parent;
  552.                             // line 233
  553.                             echo "
  554.                                     ";
  555.                             // line 234
  556.                             if ((twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'234$this->source); })()), "name", [], "any"falsefalsetrue234) == (isset($context["CategoryItemName"]) || array_key_exists("CategoryItemName"$context) ? $context["CategoryItemName"] : (function () { throw new RuntimeError('Variable "CategoryItemName" does not exist.'234$this->source); })()))) {
  557.                                 // line 235
  558.                                 echo "                                    ";
  559.                                 if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER") || (twig_get_attribute($this->env$this->source$context["Product"], "member", [], "any"falsefalsetrue235) != 1))) {
  560.                                     // line 236
  561.                                     echo "                                    <li class=\"ec-shelfGrid__item\">
  562.                                         ";
  563.                                     // line 238
  564.                                     echo "                                         <a href=\"";
  565.                                     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"falsefalsetrue238)]), "html"nulltrue);
  566.                                     echo "\">
  567.                                             <p class=\"ec-shelfGrid__item-image\">
  568.                                                 <img src=\"";
  569.                                     // line 240
  570.                                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "main_list_image", [], "any"falsefalsetrue240), 240$this->source)), "save_image"), "html"nulltrue);
  571.                                     echo "\" loading=\"lazy\">
  572.                                             </p>
  573.                                             <h3>";
  574.                                     // line 242
  575.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue242), 242$this->source), "html"nulltrue);
  576.                                     echo "</h3>
  577.                                             <div class=\"product_desc\">
  578. ";
  579.                                     // line 245
  580.                                     echo "                                            <p class=\"price02-default\">
  581.                                             販売価格:
  582.                                                 ";
  583.                                     // line 247
  584.                                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsetrue247)) {
  585.                                         // line 248
  586.                                         echo "                                                    ";
  587.                                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsetrue248) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsetrue248))) {
  588.                                             // line 249
  589.                                             echo "                                                        ";
  590.                                             if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue249) == 0)) {
  591.                                                 // line 250
  592.                                                 echo "                                                            オープン価格
  593.                                                         ";
  594.                                             } else {
  595.                                                 // line 252
  596.                                                 echo "                                                            ";
  597.                                                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue252), 252$this->source)), "html"nulltrue);
  598.                                                 echo "
  599.                                                         ";
  600.                                             }
  601.                                             // line 254
  602.                                             echo "                                                    ";
  603.                                         } else {
  604.                                             // line 255
  605.                                             echo "                                                        ";
  606.                                             if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue255) == 0)) {
  607.                                                 // line 256
  608.                                                 echo "                                                            オープン価格 ~ ";
  609.                                                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsetrue256), 256$this->source)), "html"nulltrue);
  610.                                                 echo "
  611.                                                         ";
  612.                                             } else {
  613.                                                 // line 258
  614.                                                 echo "                                                            ";
  615.                                                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue258), 258$this->source)), "html"nulltrue);
  616.                                                 echo " ~ ";
  617.                                                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsetrue258), 258$this->source)), "html"nulltrue);
  618.                                                 echo "
  619.                                                         ";
  620.                                             }
  621.                                             // line 260
  622.                                             echo "                                                        
  623.                                                     ";
  624.                                         }
  625.                                         // line 262
  626.                                         echo "                                                ";
  627.                                     } else {
  628.                                         // line 263
  629.                                         echo "                                                    ";
  630.                                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue263) == 0)) {
  631.                                             // line 264
  632.                                             echo "                                                        オープン価格
  633.                                                     ";
  634.                                         } else {
  635.                                             // line 266
  636.                                             echo "                                                        ";
  637.                                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue266), 266$this->source)), "html"nulltrue);
  638.                                             echo "
  639.                                                     ";
  640.                                         }
  641.                                         // line 268
  642.                                         echo "                                                ";
  643.                                     }
  644.                                     // line 269
  645.                                     echo "                                            </p>
  646.                                             ";
  647.                                     // line 271
  648.                                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue271)) {
  649.                                         // line 272
  650.                                         echo "                                                <p>";
  651.                                         echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue272), 272$this->source));
  652.                                         echo "</p>
  653.                                             ";
  654.                                     }
  655.                                     // line 274
  656.                                     echo "
  657.                                             </div><!-- .product_desc -->
  658.                                         </a>
  659.                                         ";
  660.                                     // line 280
  661.                                     if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  662.                                         // line 281
  663.                                         echo "                                        ";
  664.                                         // line 318
  665.                                         echo "                                        ";
  666.                                     }
  667.                                     // line 319
  668.                                     echo "                                    </li>
  669.                                     ";
  670.                                 }
  671.                                 // line 321
  672.                                 echo "                                    ";
  673.                             }
  674.                             // line 322
  675.                             echo "                                ";
  676.                         }
  677.                         $_parent $context['_parent'];
  678.                         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  679.                         $context array_intersect_key($context$_parent) + $_parent;
  680.                         // line 323
  681.                         echo "                            ";
  682.                     }
  683.                     // line 324
  684.                     echo "                            ";
  685.                     // line 325
  686.                     echo "                        
  687.                     ";
  688.                 }
  689.                 $_parent $context['_parent'];
  690.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  691.                 $context array_intersect_key($context$_parent) + $_parent;
  692.                 // line 327
  693.                 echo "                </ul>
  694.             </div>
  695.     ";
  696.             }
  697.             // line 330
  698.             echo "    ";
  699.             // line 331
  700.             echo "    ";
  701.             if ((twig_length_filter($this->envtwig_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.'331$this->source); })()), "children", [], "any"falsefalsetrue331)) > 0)) {
  702.                 // line 332
  703.                 echo "            ";
  704.                 $context['_parent'] = $context;
  705.                 $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.'332$this->source); })()), "children", [], "any"falsefalsetrue332));
  706.                 foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
  707.                     // line 333
  708.                     echo "                <div class=\"\">
  709.                     ";
  710.                     // line 334
  711.                     echo twig_call_macro($macros["__internal_parse_2"], "macro_tree", [(isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'334$this->source); })()), (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'334$this->source); })()), (isset($context["forms"]) || array_key_exists("forms"$context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.'334$this->source); })())], 334$context$this->getSourceContext());
  712.                     echo "
  713.                 </div>
  714.             ";
  715.                 }
  716.                 $_parent $context['_parent'];
  717.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
  718.                 $context array_intersect_key($context$_parent) + $_parent;
  719.                 // line 337
  720.                 echo "    ";
  721.             }
  722.             
  723.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  724.             
  725.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  726.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  727.         } finally {
  728.             ob_end_clean();
  729.         }
  730.     }
  731.     public function getTemplateName()
  732.     {
  733.         return "Product/list.twig";
  734.     }
  735.     public function isTraitable()
  736.     {
  737.         return false;
  738.     }
  739.     public function getDebugInfo()
  740.     {
  741.         return array (  771 => 337,  762 => 334,  759 => 333,  754 => 332,  751 => 331,  749 => 330,  744 => 327,  737 => 325,  735 => 324,  732 => 323,  726 => 322,  723 => 321,  719 => 319,  716 => 318,  714 => 281,  712 => 280,  704 => 274,  698 => 272,  696 => 271,  692 => 269,  689 => 268,  683 => 266,  679 => 264,  676 => 263,  673 => 262,  669 => 260,  661 => 258,  655 => 256,  652 => 255,  649 => 254,  643 => 252,  639 => 250,  636 => 249,  633 => 248,  631 => 247,  627 => 245,  622 => 242,  617 => 240,  611 => 238,  608 => 236,  605 => 235,  603 => 234,  600 => 233,  594 => 232,  591 => 231,  587 => 230,  584 => 229,  579 => 228,  576 => 227,  574 => 226,  571 => 225,  567 => 224,  563 => 222,  560 => 221,  558 => 220,  549 => 218,  546 => 217,  525 => 216,  508 => 180,  499 => 177,  496 => 176,  492 => 175,  489 => 174,  486 => 173,  484 => 172,  481 => 170,  475 => 167,  468 => 166,  462 => 163,  455 => 162,  452 => 161,  449 => 159,  446 => 158,  426 => 157,  415 => 382,  411 => 380,  409 => 379,  397 => 372,  393 => 371,  387 => 368,  383 => 367,  378 => 364,  376 => 363,  371 => 360,  365 => 359,  362 => 358,  356 => 356,  353 => 355,  350 => 354,  348 => 353,  346 => 352,  344 => 351,  338 => 349,  336 => 348,  334 => 347,  331 => 346,  327 => 345,  322 => 342,  320 => 341,  317 => 339,  314 => 215,  312 => 214,  299 => 203,  293 => 202,  287 => 199,  284 => 198,  280 => 197,  275 => 196,  272 => 194,  266 => 192,  260 => 190,  258 => 189,  253 => 186,  251 => 185,  248 => 183,  245 => 156,  243 => 155,  236 => 150,  234 => 104,  228 => 101,  225 => 100,  223 => 99,  219 => 97,  209 => 96,  186 => 82,  176 => 75,  145 => 47,  117 => 21,  103 => 20,  95 => 19,  78 => 18,  74 => 16,  64 => 15,  53 => 11,  51 => 13,  38 => 11,);
  742.     }
  743.     public function getSourceContext()
  744.     {
  745.         return new Source("{#
  746. This file is part of EC-CUBE
  747. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  748. http://www.ec-cube.co.jp/
  749. For the full copyright and license information, please view the LICENSE
  750. file that was distributed with this source code.
  751. #}
  752. {% extends 'default_frame.twig' %}
  753. {% set body_class = 'product_page' %}
  754. {% block javascript %}
  755.     <script>
  756.         eccube.productsClassCategories = {
  757.             {% for Product in pagination %}
  758.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  759.             {% endfor %}
  760.         };
  761.         \$(function() {
  762.             // 表示件数を変更
  763.             \$('.disp-number').change(function() {
  764.                 var dispNumber = \$(this).val();
  765.                 \$('#disp_number').val(dispNumber);
  766.                 \$('#pageno').val(1);
  767.                 \$(\"#form1\").submit();
  768.             });
  769.             // 並び順を変更
  770.             \$('.order-by').change(function() {
  771.                 var orderBy = \$(this).val();
  772.                 \$('#orderby').val(orderBy);
  773.                 \$('#pageno').val(1);
  774.                 \$(\"#form1\").submit();
  775.             });
  776.             \$('.add-cart').on('click', function(e) {
  777.                 var \$form = \$(this).parents('li').find('form');
  778.                 // 個数フォームのチェック
  779.                 var \$quantity = \$form.parent().find('.quantity');
  780.                 if (\$quantity.val() < 1) {
  781.                     \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  782.                     setTimeout(function() {
  783.                         loadingOverlay('hide');
  784.                     }, 100);
  785.                     return true;
  786.                 } else {
  787.                     \$quantity[0].setCustomValidity('');
  788.                 }
  789.                 e.preventDefault();
  790.                 \$.ajax({
  791.                     url: \$form.attr('action'),
  792.                     type: \$form.attr('method'),
  793.                     data: \$form.serialize(),
  794.                     dataType: 'json',
  795.                     beforeSend: function(xhr, settings) {
  796.                         // Buttonを無効にする
  797.                         \$('.add-cart').prop('disabled', true);
  798.                     }
  799.                 }).done(function(data) {
  800.                     // レスポンス内のメッセージをalertで表示
  801.                     \$.each(data.messages, function() {
  802.                         \$('#ec-modal-header').html(this);
  803.                     });
  804.                     \$('.ec-modal').show()
  805.                     // カートブロックを更新する
  806.                     \$.ajax({
  807.                         url: '{{ url('block_cart') }}',
  808.                         type: 'GET',
  809.                         dataType: 'html'
  810.                     }).done(function(html) {
  811.                         \$('.ec-headerRole__cart').html(html);
  812.                     });
  813.                 }).fail(function(data) {
  814.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  815.                 }).always(function(data) {
  816.                     // Buttonを有効にする
  817.                     \$('.add-cart').prop('disabled', false);
  818.                 });
  819.             });
  820.         });
  821.         \$('.ec-modal-overlay, .ec-modal .ec-inlineBtn--cancel').on('click', function() {
  822.             \$('.ec-modal').hide()
  823.         });
  824.     </script>
  825. {% endblock %}
  826. {% block main %}
  827.     {% if search_form.category_id.vars.errors|length > 0 %}
  828.         <div class=\"ec-searchnavRole\">
  829.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  830.         </div>
  831.     {% else %}{# カテゴリー表示 #}
  832.         {#
  833.         <div class=\"ec-searchnavRole\">
  834.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  835.                 {% for item in search_form %}
  836.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  837.                            name=\"{{ item.vars.full_name }}\"
  838.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  839.                 {% endfor %}
  840.             </form>
  841.             <div class=\"ec-searchnavRole__topicpath\">
  842.                 <ol class=\"ec-topicpath\">
  843.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
  844.                     </li>
  845.                     {% if Category is not null %}
  846.                         {% for Path in Category.path %}
  847.                             <li class=\"ec-topicpath__divider\">|</li>
  848.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  849.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  850.                             </li>
  851.                         {% endfor %}
  852.                     {% endif %}
  853.                     {% if search_form.vars.value and search_form.vars.value.name %}
  854.                         <li class=\"ec-topicpath__divider\">|</li>
  855.                         <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  856.                     {% endif %}
  857.                 </ol>
  858.             </div>
  859.             <div class=\"ec-searchnavRole__infos\">
  860.                 <div class=\"ec-searchnavRole__counter\">
  861.                     {% if pagination.totalItemCount > 0 %}
  862.                         {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  863.                     {% else %}
  864.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  865.                     {% endif %}
  866.                 </div>
  867.                 {% if pagination.totalItemCount > 0 %}
  868.                     <div class=\"ec-searchnavRole__actions\">
  869.                         <div class=\"ec-select\">
  870.                             {{ form_widget(disp_number_form, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  871.                             {{ form_widget(order_by_form, {'id': '', 'attr': {'class': 'order-by'}}) }}
  872.                         </div>
  873.                     </div>
  874.                 {% endif %}
  875.             </div>
  876.         </div>
  877.         #}
  878.         <div class=\"ak-header\">
  879.             <div class=\"ak-pageHeader\">
  880.                 <h1 style=\"text-align: center\">PRODUCTS</h1>
  881.             </div>
  882. {% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  883. {% macro treeCategory(Category, pagination) %}
  884.     {% from _self import treeCategory %}
  885.     
  886.     {# リンク表示部分 #}
  887.     {% if pagination.params[\"category_id\"] is defined and pagination.params[\"category_id\"] == Category.id %}
  888.         <a class=\"active\" href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">
  889.             {{ Category.name }}
  890.         </a>
  891.     {% else %}
  892.         <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">
  893.             {{ Category.name }}
  894.         </a>
  895.     {% endif %}
  896.     {# --- 子カテゴリのループ部分 --- #}
  897.     {# Category.children (その階層の子) を sort して回すのが正解です #}
  898.     {% if Category.children|length > 0 %}
  899.         <ul>
  900.             {% for ChildCategory in Category.children|sort((a, b) => b.sort_no <=> a.sort_no) %}
  901.                 <li>
  902.                     {{ treeCategory(ChildCategory, pagination) }}
  903.                 </li>
  904.             {% endfor %}
  905.         </ul>
  906.     {% endif %}
  907. {% endmacro %}
  908. {# @see https://github.com/bolt/bolt/pull/2388 #}
  909. {% from _self import treeCategory %}
  910. <div class=\"ec-headerCategoryArea\">
  911.     <div class=\"ec-itemNav\">
  912.         <ul class=\"ec-itemNav__nav\">
  913.                 {% if pagination.params %}
  914.                 <li><a href=\"{{ url('homepage') }}products/list\">全て</a></li>
  915.                 {% else %}
  916.                 <li><a class=\"active\" href=\"{{ url('homepage') }}products/list\">全て</a></li>
  917.                 {% endif %}
  918.                 
  919.     {# 最初の親カテゴリたちを sort して表示開始 #}
  920.     {% for TopCategory in Categories|sort((a, b) => b.sort_no <=> a.sort_no) %}
  921.         {% if TopCategory.parent is empty %} {# 親がいない=最上位階層のみ表示 #}
  922.             <li>
  923.                 {{ treeCategory(TopCategory, pagination) }}
  924.             </li>
  925.         {% endif %}
  926.     {% endfor %}
  927.         </ul>
  928.     </div>
  929. </div>
  930. <style>
  931. #akracing .ak-header .ec-headerCategoryArea .ec-itemNav__nav a.active{
  932.     color : #f00;
  933. }
  934. </style>
  935.         </div><!-- ak-header -->
  936. {% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  937. {% macro tree(Category , pagination ,forms) %}
  938.     {% from _self import tree %}
  939.                 <h2><a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a></h2>
  940.                 {# <h2>{{ Category.name }}</h2> #}
  941.     {# 商品情報 #}
  942.     {% if pagination.totalItemCount > 0 %}
  943.             <div class=\"ec-shelfRole\">
  944.                 <ul class=\"ec-shelfGrid\">
  945.                     {% for Product in pagination %}
  946.                         {% set CategoryItemName = \"\" %}
  947.                             {# 関連カテゴリ #}
  948.                             {% if Product.ProductCategories is not empty %}
  949.                                 {% for ProductCategory in Product.ProductCategories %}
  950.                                 
  951.                                     {% for CategoryItem in ProductCategory.Category.path %}
  952.                                         {% set CategoryItemName = CategoryItem.name %}
  953.                                     {% endfor %}
  954.                                     {% if Category.name == CategoryItemName %}
  955.                                     {% if is_granted('ROLE_USER') or Product.member != 1 %}{# 会員限定 #}
  956.                                     <li class=\"ec-shelfGrid__item\">
  957.                                         {#<p>{{Category.name}}:{{CategoryItemName}}</p>#}
  958.                                          <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  959.                                             <p class=\"ec-shelfGrid__item-image\">
  960.                                                 <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" loading=\"lazy\">
  961.                                             </p>
  962.                                             <h3>{{ Product.name }}</h3>
  963.                                             <div class=\"product_desc\">
  964. {# 20230921@hanari 非表示 #}
  965.                                             <p class=\"price02-default\">
  966.                                             販売価格:
  967.                                                 {% if Product.hasProductClass %}
  968.                                                     {% if Product.getPrice02Min == Product.getPrice02Max %}
  969.                                                         {% if Product.getPrice02IncTaxMin == 0 %}
  970.                                                             オープン価格
  971.                                                         {% else %}
  972.                                                             {{ Product.getPrice02IncTaxMin|price }}
  973.                                                         {% endif %}
  974.                                                     {% else %}
  975.                                                         {% if Product.getPrice02IncTaxMin == 0 %}
  976.                                                             オープン価格 ~ {{ Product.getPrice02IncTaxMax|price }}
  977.                                                         {% else %}
  978.                                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  979.                                                         {% endif %}
  980.                                                         
  981.                                                     {% endif %}
  982.                                                 {% else %}
  983.                                                     {% if Product.getPrice02IncTaxMin == 0 %}
  984.                                                         オープン価格
  985.                                                     {% else %}
  986.                                                         {{ Product.getPrice02IncTaxMin|price }}
  987.                                                     {% endif %}
  988.                                                 {% endif %}
  989.                                             </p>
  990.                                             {% if Product.description_list %}
  991.                                                 <p>{{ Product.description_list|raw|nl2br }}</p>
  992.                                             {% endif %}
  993.                                             </div><!-- .product_desc -->
  994.                                         </a>
  995.                                         {% if is_granted('ROLE_USER') %}{# ログイン後表示 #}
  996.                                         {#
  997.                                         {% if Product.stock_find %}
  998.                                             {% set form = forms[Product.id] %}
  999.                                             <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  1000.                                                 <div class=\"ec-productRole__actions\">
  1001.                                                     {% if form.classcategory_id1 is defined %}
  1002.                                                         <div class=\"ec-select\">
  1003.                                                             {{ form_widget(form.classcategory_id1) }}
  1004.                                                             {{ form_errors(form.classcategory_id1) }}
  1005.                                                         </div>
  1006.                                                         {% if form.classcategory_id2 is defined %}
  1007.                                                             <div class=\"ec-select\">
  1008.                                                                 {{ form_widget(form.classcategory_id2) }}
  1009.                                                                 {{ form_errors(form.classcategory_id2) }}
  1010.                                                             </div>
  1011.                                                         {% endif %}
  1012.                                                     {% endif %}
  1013.                                                     <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  1014.                                                         {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  1015.                                                         {{ form_errors(form.quantity) }}
  1016.                                                     </div>
  1017.                                                 </div>
  1018.                                                 {{ form_rest(form) }}
  1019.                                             </form>
  1020.                                             <div class=\"ec-productRole__btn\">
  1021.                                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  1022.                                                     {{ 'カートに入れる'|trans }}
  1023.                                                 </button>
  1024.                                             </div>
  1025.                                         {% else %}
  1026.                                             <div class=\"ec-productRole__btn\">
  1027.                                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1028.                                                     {{ 'ただいま品切れ中です。'|trans }}
  1029.                                                 </button>
  1030.                                             </div>
  1031.                                         {% endif %}
  1032.                                         #}
  1033.                                         {% endif %}{# ログイン後表示 #}
  1034.                                     </li>
  1035.                                     {% endif %}
  1036.                                     {% endif %}{# 会員限定 #}
  1037.                                 {% endfor %}
  1038.                             {% endif %}
  1039.                             {# 関連カテゴリ #}
  1040.                         
  1041.                     {% endfor %}
  1042.                 </ul>
  1043.             </div>
  1044.     {% endif %}
  1045.     {# 商品情報 #}
  1046.     {% if Category.children|length > 0 %}
  1047.             {% for ChildCategory in Category.children %}
  1048.                 <div class=\"\">
  1049.                     {{ tree(Category , pagination ,forms) }}
  1050.                 </div>
  1051.             {% endfor %}
  1052.     {% endif %}
  1053. {% endmacro %}
  1054. {# @see https://github.com/bolt/bolt/pull/2388 #}
  1055. {% from _self import tree %}
  1056. <div class=\"ak-body\">
  1057.     <div class=\"\">
  1058.             {% for Category in Categories|sort((a, b) => b.sort_no <=> a.sort_no) %}
  1059.             
  1060.             {% if pagination.params == null or pagination.params[\"category_id\"] is not defined %}
  1061.             {# 一覧表示 #}
  1062.                     {{ tree(Category , pagination ,forms) }}
  1063.             {% else %}
  1064.             {# カテゴリー表示 #}
  1065.                 {# dump( pagination.params[\"category_id\"] ) #}
  1066.                 {# dump(Category.id) #}
  1067.                 {% set categoryId = pagination.params[\"category_id\"] %}
  1068.                 {% if categoryId == Category.id %}
  1069.                     {{ tree(Category , pagination ,forms) }}
  1070.                 {% endif %}
  1071.             {% endif %}
  1072.             {% endfor %}
  1073.     </div>
  1074. </div>
  1075.         {% if pagination.totalItemCount > 0 %}
  1076.             <div class=\"ec-modal\">
  1077.                 <div class=\"ec-modal-overlay\">
  1078.                     <div class=\"ec-modal-wrap\">
  1079.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\" loading=\"lazy\"/></span></span>
  1080.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1081.                         <div class=\"ec-modal-box\">
  1082.                             <div class=\"ec-role\">
  1083.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1084.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1085.                             </div>
  1086.                         </div>
  1087.                     </div>
  1088.                 </div>
  1089.             </div>
  1090.             <div class=\"ec-pagerRole\">
  1091.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  1092.             </div>
  1093.         {% endif %}
  1094.     {% endif %}{# カテゴリー表示 #}
  1095. {% endblock %}
  1096. ""Product/list.twig""/home/akracing/www/akracing.dev/app/template/akracing/Product/list.twig");
  1097.     }
  1098.     
  1099.     public function checkSecurity()
  1100.     {
  1101.         static $tags = array("set" => 13"for" => 18"if" => 19"from" => 185"include" => 379"macro" => 157);
  1102.         static $filters = array("escape" => 19"raw" => 19"trans" => 47"length" => 99"sort" => 196"no_image_product" => 240"price" => 252"nl2br" => 272);
  1103.         static $functions = array("class_categories_as_json" => 19"url" => 75"repository" => 155"asset" => 367"is_granted" => 235);
  1104.         try {
  1105.             $this->sandbox->checkSecurity(
  1106.                 ['set''for''if''from''include''macro'],
  1107.                 ['escape''raw''trans''length''sort''no_image_product''price''nl2br'],
  1108.                 ['class_categories_as_json''url''repository''asset''is_granted']
  1109.             );
  1110.         } catch (SecurityError $e) {
  1111.             $e->setSourceContext($this->source);
  1112.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  1113.                 $e->setTemplateLine($tags[$e->getTagName()]);
  1114.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  1115.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  1116.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  1117.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  1118.             }
  1119.             throw $e;
  1120.         }
  1121.     }
  1122. }