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