var/cache/dev/twig/bb/bb48d0e71de9b3d343151054cea4c399.php line 41

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_e021d3d784c60fde604b1bd6413eb24a 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_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_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 15
  52.     public function block_javascript($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_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').text(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-wrap').on('click', function(e) {
  174.             // モーダル内の処理は外側にバブリングさせない
  175.             e.stopPropagation();
  176.         });
  177.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  178.             \$('.ec-modal').hide()
  179.         });
  180.     </script>
  181. ";
  182.         
  183.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  184.         
  185.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  186.     }
  187.     // line 100
  188.     public function block_main($context, array $blocks = [])
  189.     {
  190.         $macros $this->macros;
  191.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  192.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  193.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  194.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  195.         // line 101
  196.         echo "    ";
  197.         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.'101$this->source); })()), "category_id", [], "any"falsefalsetrue101), "vars", [], "any"falsefalsetrue101), "errors", [], "any"falsefalsetrue101)) > 0)) {
  198.             // line 102
  199.             echo "        <div class=\"ec-searchnavRole\">
  200.             <p class=\"errormsg text-danger\">";
  201.             // line 103
  202.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  203.             echo "</p>
  204.         </div>
  205.     ";
  206.         } else {
  207.             // line 106
  208.             echo "        <div class=\"ec-searchnavRole\">
  209. ";
  210.             // line 108
  211.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'108$this->source); })()))) {
  212.                 // line 109
  213.                 echo "    ";
  214.                 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.'109$this->source); })()), "id", [], "any"falsefalsetrue109) == 17) || (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.'109$this->source); })()), "id", [], "any"falsefalsetrue109) == 18)) || (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.'109$this->source); })()), "id", [], "any"falsefalsetrue109) == 19)) || (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.'109$this->source); })()), "id", [], "any"falsefalsetrue109) == 20))) {
  215.                     // line 110
  216.                     echo "        <div class=\"ec-role\">
  217.             <div class=\"category_list_title_box\">
  218.                 <div class=\"category_list_title_text\">
  219.                     <h2><span class=\"fc_bluepurple\">■</span>";
  220.                     // line 113
  221.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("おすすめ商品"), "html"nulltrue);
  222.                     echo "</h2>
  223.                 </div>
  224.             </div>
  225.         </div>
  226.     ";
  227.                 }
  228.             }
  229.             // line 120
  230.             echo "            <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  231.                 ";
  232.             // line 121
  233.             $context['_parent'] = $context;
  234.             $context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'121$this->source); })()));
  235.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  236.                 // line 122
  237.                 echo "                    <input type=\"hidden\" id=\"";
  238.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue122), "id", [], "any"falsefalsetrue122), 122$this->source), "html"nulltrue);
  239.                 echo "\"
  240.                            name=\"";
  241.                 // line 123
  242.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue123), "full_name", [], "any"falsefalsetrue123), 123$this->source), "html"nulltrue);
  243.                 echo "\"
  244.                            ";
  245.                 // line 124
  246.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue124), "value", [], "any"falsefalsetrue124))) {
  247.                     echo "value=\"";
  248.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue124), "value", [], "any"falsefalsetrue124), 124$this->source), "html"nulltrue);
  249.                     echo "\" ";
  250.                 }
  251.                 echo "/>
  252.                 ";
  253.             }
  254.             $_parent $context['_parent'];
  255.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  256.             $context array_intersect_key($context$_parent) + $_parent;
  257.             // line 126
  258.             echo "            </form>
  259.             <div class=\"ec-searchnavRole__topicpath\">
  260.                 <ol class=\"ec-topicpath\">
  261.                     <li class=\"ec-topicpath__item\"><a href=\"";
  262.             // line 129
  263.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  264.             echo "\">";
  265.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html"nulltrue);
  266.             echo "</a>
  267.                     </li>
  268.                     ";
  269.             // line 131
  270.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'131$this->source); })()))) {
  271.                 // line 132
  272.                 echo "                        ";
  273.                 $context['_parent'] = $context;
  274.                 $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.'132$this->source); })()), "path", [], "any"falsefalsetrue132));
  275.                 $context['loop'] = [
  276.                   'parent' => $context['_parent'],
  277.                   'index0' => 0,
  278.                   'index'  => 1,
  279.                   'first'  => true,
  280.                 ];
  281.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  282.                     $length count($context['_seq']);
  283.                     $context['loop']['revindex0'] = $length 1;
  284.                     $context['loop']['revindex'] = $length;
  285.                     $context['loop']['length'] = $length;
  286.                     $context['loop']['last'] = === $length;
  287.                 }
  288.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  289.                     // line 133
  290.                     echo "                            <li class=\"ec-topicpath__divider\">|</li>
  291.                             <li class=\"ec-topicpath__item";
  292.                     // line 134
  293.                     if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue134)) {
  294.                         echo "--active";
  295.                     }
  296.                     echo "\"><a
  297.                                         href=\"";
  298.                     // line 135
  299.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  300.                     echo "?category_id=";
  301.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "id", [], "any"falsefalsetrue135), 135$this->source), "html"nulltrue);
  302.                     echo "\">";
  303.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsetrue135), 135$this->source), "html"nulltrue);
  304.                     echo "</a>
  305.                             </li>
  306.                         ";
  307.                     ++$context['loop']['index0'];
  308.                     ++$context['loop']['index'];
  309.                     $context['loop']['first'] = false;
  310.                     if (isset($context['loop']['length'])) {
  311.                         --$context['loop']['revindex0'];
  312.                         --$context['loop']['revindex'];
  313.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  314.                     }
  315.                 }
  316.                 $_parent $context['_parent'];
  317.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  318.                 $context array_intersect_key($context$_parent) + $_parent;
  319.                 // line 138
  320.                 echo "                    ";
  321.             }
  322.             // line 139
  323.             echo "                    ";
  324.             if ((twig_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.'139$this->source); })()), "vars", [], "any"falsefalsetrue139), "value", [], "any"falsefalsetrue139) && twig_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.'139$this->source); })()), "vars", [], "any"falsefalsetrue139), "value", [], "any"falsefalsetrue139), "name", [], "any"falsefalsetrue139))) {
  325.                 // line 140
  326.                 echo "                        <li class=\"ec-topicpath__divider\">|</li>
  327.                         <li class=\"ec-topicpath__item\">";
  328.                 // line 141
  329.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」の検索結果", ["%name%" => twig_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.'141$this->source); })()), "vars", [], "any"falsefalsetrue141), "value", [], "any"falsefalsetrue141), "name", [], "any"falsefalsetrue141)]), "html"nulltrue);
  330.                 echo "</li>
  331.                     ";
  332.             }
  333.             // line 143
  334.             echo "                </ol>
  335.             </div>
  336.             <div class=\"ec-searchnavRole__infos\">
  337.                 <div class=\"ec-searchnavRole__counter\">
  338.                     ";
  339.             // line 147
  340.             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.'147$this->source); })()), "totalItemCount", [], "any"falsefalsetrue147) > 0)) {
  341.                 // line 148
  342.                 echo "                        ";
  343.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>", ["%count%" => twig_get_attribute($this->env$this->source, (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'148$this->source); })()), "totalItemCount", [], "any"falsefalsetrue148)]);
  344.                 echo "
  345.                     ";
  346.             } else {
  347.                 // line 150
  348.                 echo "                        <span>";
  349.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html"nulltrue);
  350.                 echo "</span>
  351.                     ";
  352.             }
  353.             // line 152
  354.             echo "                </div>
  355.                 ";
  356.             // line 153
  357.             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.'153$this->source); })()), "totalItemCount", [], "any"falsefalsetrue153) > 0)) {
  358.                 // line 154
  359.                 echo "                    <div class=\"ec-searchnavRole__actions\">
  360.                         <div class=\"ec-select\">
  361.                             ";
  362.                 // line 156
  363.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'156$this->source); })()), "disp_number", [], "any"falsefalsetrue156), 156$this->source), 'widget', ["id" => """attr" => ["class" => "disp-number"]]);
  364.                 echo "
  365.                             ";
  366.                 // line 157
  367.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'157$this->source); })()), "orderby", [], "any"falsefalsetrue157), 157$this->source), 'widget', ["id" => """attr" => ["class" => "order-by"]]);
  368.                 echo "
  369.                         </div>
  370.                     </div>
  371.                 ";
  372.             }
  373.             // line 161
  374.             echo "            </div>
  375.         </div>
  376.         ";
  377.             // line 163
  378.             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.'163$this->source); })()), "totalItemCount", [], "any"falsefalsetrue163) > 0)) {
  379.                 // line 164
  380.                 echo "            <div class=\"ec-shelfRole\">
  381.                 <ul class=\"ec-shelfGrid\">
  382.                     ";
  383.                 // line 166
  384.                 $context['_parent'] = $context;
  385.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'166$this->source); })()));
  386.                 $context['loop'] = [
  387.                   'parent' => $context['_parent'],
  388.                   'index0' => 0,
  389.                   'index'  => 1,
  390.                   'first'  => true,
  391.                 ];
  392.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  393.                     $length count($context['_seq']);
  394.                     $context['loop']['revindex0'] = $length 1;
  395.                     $context['loop']['revindex'] = $length;
  396.                     $context['loop']['length'] = $length;
  397.                     $context['loop']['last'] = === $length;
  398.                 }
  399.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  400.                     // line 167
  401.                     echo "                        <li class=\"ec-shelfGrid__item\">
  402.                             ";
  403.                     // line 168
  404.                     echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context"@DesignTag42/tag_list.twig", array(), truetrue);
  405.                     echo "
  406.                             <a href=\"";
  407.                     // line 169
  408.                     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"falsefalsetrue169)]), "html"nulltrue);
  409.                     echo "\">
  410.                                 <p class=\"ec-shelfGrid__item-image\">
  411.                                     <img src=\"";
  412.                     // line 171
  413.                     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"falsefalsetrue171), 171$this->source)), "save_image"), "html"nulltrue);
  414.                     echo "\" alt=\"";
  415.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue171), 171$this->source), "html"nulltrue);
  416.                     echo "\" ";
  417.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsetrue171) > 5)) {
  418.                         echo " loading=\"lazy\"";
  419.                     }
  420.                     echo ">
  421.                                 </p>
  422.                                 <p>";
  423.                     // line 173
  424.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue173), 173$this->source), "html"nulltrue);
  425.                     echo "</p>
  426.                                 ";
  427.                     // line 174
  428.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue174)) {
  429.                         // line 175
  430.                         echo "                                    <p>";
  431.                         echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue175), 175$this->source));
  432.                         echo "</p>
  433.                                 ";
  434.                     }
  435.                     // line 177
  436.                     echo "                                <p class=\"price02-default\">
  437.                                     ";
  438.                     // line 178
  439.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsetrue178)) {
  440.                         // line 179
  441.                         echo "                                        ";
  442.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsetrue179) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsetrue179))) {
  443.                             // line 180
  444.                             echo "                                            ";
  445.                             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"falsefalsetrue180), 180$this->source)), "html"nulltrue);
  446.                             echo "
  447.                                         ";
  448.                         } else {
  449.                             // line 182
  450.                             echo "                                            ";
  451.                             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"falsefalsetrue182), 182$this->source)), "html"nulltrue);
  452.                             echo " ~ ";
  453.                             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"falsefalsetrue182), 182$this->source)), "html"nulltrue);
  454.                             echo "
  455.                                         ";
  456.                         }
  457.                         // line 184
  458.                         echo "                                    ";
  459.                     } else {
  460.                         // line 185
  461.                         echo "                                        ";
  462.                         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"falsefalsetrue185), 185$this->source)), "html"nulltrue);
  463.                         echo "
  464.                                     ";
  465.                     }
  466.                     // line 187
  467.                     echo "                                </p>
  468.                             </a>
  469.                             ";
  470.                     // line 190
  471.                     if (twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsetrue190)) {
  472.                         // line 191
  473.                         echo "                                ";
  474.                         $context["form"] = twig_get_attribute($this->env$this->source, (isset($context["forms"]) || array_key_exists("forms"$context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.'191$this->source); })()), twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue191), [], "array"falsefalsetrue191);
  475.                         // line 193
  476.                         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  477.                             // line 195
  478.                             echo "                                <form name=\"form";
  479.                             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue195), 195$this->source), "html"nulltrue);
  480.                             echo "\" id=\"productForm";
  481.                             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue195), 195$this->source), "html"nulltrue);
  482.                             echo "\" action=\"";
  483.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue195)]), "html"nulltrue);
  484.                             echo "\" method=\"post\">
  485.                                     <div class=\"ec-productRole__actions\">
  486.                                         ";
  487.                             // line 197
  488.                             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruetrue197)) {
  489.                                 // line 198
  490.                                 echo "                                            <div class=\"ec-select\">
  491.                                                 ";
  492.                                 // line 199
  493.                                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'199$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue199), 199$this->source), 'widget');
  494.                                 echo "
  495.                                                 ";
  496.                                 // line 200
  497.                                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'200$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue200), 200$this->source), 'errors');
  498.                                 echo "
  499.                                             </div>
  500.                                             ";
  501.                                 // line 202
  502.                                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruetrue202)) {
  503.                                     // line 203
  504.                                     echo "                                                <div class=\"ec-select\">
  505.                                                     ";
  506.                                     // line 204
  507.                                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'204$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue204), 204$this->source), 'widget');
  508.                                     echo "
  509.                                                     ";
  510.                                     // line 205
  511.                                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'205$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue205), 205$this->source), 'errors');
  512.                                     echo "
  513.                                                 </div>
  514.                                             ";
  515.                                 }
  516.                                 // line 208
  517.                                 echo "                                        ";
  518.                             }
  519.                             // line 209
  520.                             echo "                                        <div class=\"ec-numberInput\"><span>";
  521.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  522.                             echo "</span>
  523.                                             ";
  524.                             // line 210
  525.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'210$this->source); })()), "quantity", [], "any"falsefalsetrue210), 210$this->source), 'widget', ["attr" => ["class" => "quantity"]]);
  526.                             echo "
  527.                                             ";
  528.                             // line 211
  529.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'211$this->source); })()), "quantity", [], "any"falsefalsetrue211), 211$this->source), 'errors');
  530.                             echo "
  531.                                         </div>
  532.                                     </div>
  533.                                     ";
  534.                             // line 214
  535.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'214$this->source); })()), 214$this->source), 'rest');
  536.                             echo "
  537.                                 </form>
  538.                                 <div class=\"ec-productRole__btn\">
  539.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"";
  540.                             // line 217
  541.                             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue217), 217$this->source), "html"nulltrue);
  542.                             echo "\" form=\"productForm";
  543.                             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue217), 217$this->source), "html"nulltrue);
  544.                             echo "\">
  545.                                         <i class=\"fas fa-shopping-cart\"></i>
  546.                                         ";
  547.                             // line 219
  548.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  549.                             echo "
  550.                                     </button>
  551.                                 </div>
  552. ";
  553.                         }
  554.                         // line 225
  555.                         echo "                            ";
  556.                     } else {
  557.                         // line 226
  558.                         echo "                                <div class=\"ec-productRole__btn\">
  559.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  560.                                         ";
  561.                         // line 228
  562.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  563.                         echo "
  564.                                     </button>
  565.                                 </div>
  566.                             ";
  567.                     }
  568.                     // line 232
  569.                     echo "                        </li>
  570.                     ";
  571.                     ++$context['loop']['index0'];
  572.                     ++$context['loop']['index'];
  573.                     $context['loop']['first'] = false;
  574.                     if (isset($context['loop']['length'])) {
  575.                         --$context['loop']['revindex0'];
  576.                         --$context['loop']['revindex'];
  577.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  578.                     }
  579.                 }
  580.                 $_parent $context['_parent'];
  581.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  582.                 $context array_intersect_key($context$_parent) + $_parent;
  583.                 // line 234
  584.                 echo "                </ul>
  585.             </div>
  586.             <div class=\"ec-modal\">
  587.                 <div class=\"ec-modal-overlay\">
  588.                     <div class=\"ec-modal-wrap\">
  589.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  590.                 // line 239
  591.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  592.                 echo "\" alt=\"\"/></span></span>
  593.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  594.                 // line 240
  595.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  596.                 echo "</div>
  597.                         <div class=\"ec-modal-box\">
  598.                             <div class=\"ec-role\">
  599.                                 <span class=\"ec-inlineBtn--cancel\">";
  600.                 // line 243
  601.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  602.                 echo "</span>
  603.                                 <a href=\"";
  604.                 // line 244
  605.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  606.                 echo "\" class=\"ec-inlineBtn--action\">";
  607.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  608.                 echo "</a>
  609.                             </div>
  610.                         </div>
  611.                     </div>
  612.                 </div>
  613.             </div>
  614.             <div class=\"ec-pagerRole\">
  615.                 ";
  616.                 // line 251
  617.                 $this->loadTemplate("pager.twig""Product/list.twig"251)->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.'251$this->source); })()), "paginationData", [], "any"falsefalsetrue251)]));
  618.                 // line 252
  619.                 echo "            </div>
  620.         ";
  621.             }
  622.             // line 254
  623.             echo "    ";
  624.         }
  625.         
  626.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  627.         
  628.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  629.     }
  630.     public function getTemplateName()
  631.     {
  632.         return "Product/list.twig";
  633.     }
  634.     public function isTraitable()
  635.     {
  636.         return false;
  637.     }
  638.     public function getDebugInfo()
  639.     {
  640.         return array (  651 => 254,  647 => 252,  645 => 251,  633 => 244,  629 => 243,  623 => 240,  619 => 239,  612 => 234,  597 => 232,  590 => 228,  586 => 226,  583 => 225,  576 => 219,  569 => 217,  563 => 214,  557 => 211,  553 => 210,  548 => 209,  545 => 208,  539 => 205,  535 => 204,  532 => 203,  530 => 202,  525 => 200,  521 => 199,  518 => 198,  516 => 197,  506 => 195,  504 => 193,  501 => 191,  499 => 190,  494 => 187,  488 => 185,  485 => 184,  477 => 182,  471 => 180,  468 => 179,  466 => 178,  463 => 177,  457 => 175,  455 => 174,  451 => 173,  440 => 171,  435 => 169,  431 => 168,  428 => 167,  411 => 166,  407 => 164,  405 => 163,  401 => 161,  394 => 157,  390 => 156,  386 => 154,  384 => 153,  381 => 152,  375 => 150,  369 => 148,  367 => 147,  361 => 143,  356 => 141,  353 => 140,  350 => 139,  347 => 138,  326 => 135,  320 => 134,  317 => 133,  299 => 132,  297 => 131,  290 => 129,  285 => 126,  273 => 124,  269 => 123,  264 => 122,  260 => 121,  257 => 120,  248 => 113,  243 => 110,  240 => 109,  238 => 108,  235 => 106,  229 => 103,  226 => 102,  223 => 101,  213 => 100,  186 => 82,  176 => 75,  145 => 47,  117 => 21,  103 => 20,  95 => 19,  78 => 18,  74 => 16,  64 => 15,  53 => 11,  51 => 13,  38 => 11,);
  641.     }
  642.     public function getSourceContext()
  643.     {
  644.         return new Source("{#
  645. This file is part of EC-CUBE
  646. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  647. http://www.ec-cube.co.jp/
  648. For the full copyright and license information, please view the LICENSE
  649. file that was distributed with this source code.
  650. #}
  651. {% extends 'default_frame.twig' %}
  652. {% set body_class = 'product_page' %}
  653. {% block javascript %}
  654.     <script>
  655.         eccube.productsClassCategories = {
  656.             {% for Product in pagination %}
  657.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  658.             {% endfor %}
  659.         };
  660.         \$(function() {
  661.             // 表示件数を変更
  662.             \$('.disp-number').change(function() {
  663.                 var dispNumber = \$(this).val();
  664.                 \$('#disp_number').val(dispNumber);
  665.                 \$('#pageno').val(1);
  666.                 \$(\"#form1\").submit();
  667.             });
  668.             // 並び順を変更
  669.             \$('.order-by').change(function() {
  670.                 var orderBy = \$(this).val();
  671.                 \$('#orderby').val(orderBy);
  672.                 \$('#pageno').val(1);
  673.                 \$(\"#form1\").submit();
  674.             });
  675.             \$('.add-cart').on('click', function(e) {
  676.                 var \$form = \$(this).parents('li').find('form');
  677.                 // 個数フォームのチェック
  678.                 var \$quantity = \$form.parent().find('.quantity');
  679.                 if (\$quantity.val() < 1) {
  680.                     \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  681.                     setTimeout(function() {
  682.                         loadingOverlay('hide');
  683.                     }, 100);
  684.                     return true;
  685.                 } else {
  686.                     \$quantity[0].setCustomValidity('');
  687.                 }
  688.                 e.preventDefault();
  689.                 \$.ajax({
  690.                     url: \$form.attr('action'),
  691.                     type: \$form.attr('method'),
  692.                     data: \$form.serialize(),
  693.                     dataType: 'json',
  694.                     beforeSend: function(xhr, settings) {
  695.                         // Buttonを無効にする
  696.                         \$('.add-cart').prop('disabled', true);
  697.                     }
  698.                 }).done(function(data) {
  699.                     // レスポンス内のメッセージをalertで表示
  700.                     \$.each(data.messages, function() {
  701.                         \$('#ec-modal-header').text(this);
  702.                     });
  703.                     \$('.ec-modal').show()
  704.                     // カートブロックを更新する
  705.                     \$.ajax({
  706.                         url: '{{ url('block_cart') }}',
  707.                         type: 'GET',
  708.                         dataType: 'html'
  709.                     }).done(function(html) {
  710.                         \$('.ec-headerRole__cart').html(html);
  711.                     });
  712.                 }).fail(function(data) {
  713.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  714.                 }).always(function(data) {
  715.                     // Buttonを有効にする
  716.                     \$('.add-cart').prop('disabled', false);
  717.                 });
  718.             });
  719.         });
  720.         \$('.ec-modal-wrap').on('click', function(e) {
  721.             // モーダル内の処理は外側にバブリングさせない
  722.             e.stopPropagation();
  723.         });
  724.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  725.             \$('.ec-modal').hide()
  726.         });
  727.     </script>
  728. {% endblock %}
  729. {% block main %}
  730.     {% if search_form.category_id.vars.errors|length > 0 %}
  731.         <div class=\"ec-searchnavRole\">
  732.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  733.         </div>
  734.     {% else %}
  735.         <div class=\"ec-searchnavRole\">
  736. {#▼RZ 2025.08.12 ADD 業種別カテゴリーはタイトル追加 ▼#}
  737. {% if Category is not null %}
  738.     {% if Category.id == 17 or Category.id == 18 or Category.id == 19 or Category.id == 20 %}
  739.         <div class=\"ec-role\">
  740.             <div class=\"category_list_title_box\">
  741.                 <div class=\"category_list_title_text\">
  742.                     <h2><span class=\"fc_bluepurple\">■</span>{{ 'おすすめ商品'|trans }}</h2>
  743.                 </div>
  744.             </div>
  745.         </div>
  746.     {% endif %}
  747. {% endif %}
  748. {#▲RZ 2025.08.12 ADD 業種別カテゴリーはタイトル追加 ▲#}
  749.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  750.                 {% for item in search_form %}
  751.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  752.                            name=\"{{ item.vars.full_name }}\"
  753.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  754.                 {% endfor %}
  755.             </form>
  756.             <div class=\"ec-searchnavRole__topicpath\">
  757.                 <ol class=\"ec-topicpath\">
  758.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
  759.                     </li>
  760.                     {% if Category is not null %}
  761.                         {% for Path in Category.path %}
  762.                             <li class=\"ec-topicpath__divider\">|</li>
  763.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  764.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  765.                             </li>
  766.                         {% endfor %}
  767.                     {% endif %}
  768.                     {% if search_form.vars.value and search_form.vars.value.name %}
  769.                         <li class=\"ec-topicpath__divider\">|</li>
  770.                         <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  771.                     {% endif %}
  772.                 </ol>
  773.             </div>
  774.             <div class=\"ec-searchnavRole__infos\">
  775.                 <div class=\"ec-searchnavRole__counter\">
  776.                     {% if pagination.totalItemCount > 0 %}
  777.                         {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  778.                     {% else %}
  779.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  780.                     {% endif %}
  781.                 </div>
  782.                 {% if pagination.totalItemCount > 0 %}
  783.                     <div class=\"ec-searchnavRole__actions\">
  784.                         <div class=\"ec-select\">
  785.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  786.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  787.                         </div>
  788.                     </div>
  789.                 {% endif %}
  790.             </div>
  791.         </div>
  792.         {% if pagination.totalItemCount > 0 %}
  793.             <div class=\"ec-shelfRole\">
  794.                 <ul class=\"ec-shelfGrid\">
  795.                     {% for Product in pagination %}
  796.                         <li class=\"ec-shelfGrid__item\">
  797.                             {{ include('@DesignTag42/tag_list.twig', ignore_missing = true) }}
  798.                             <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  799.                                 <p class=\"ec-shelfGrid__item-image\">
  800.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
  801.                                 </p>
  802.                                 <p>{{ Product.name }}</p>
  803.                                 {% if Product.description_list %}
  804.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  805.                                 {% endif %}
  806.                                 <p class=\"price02-default\">
  807.                                     {% if Product.hasProductClass %}
  808.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  809.                                             {{ Product.getPrice02IncTaxMin|price }}
  810.                                         {% else %}
  811.                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  812.                                         {% endif %}
  813.                                     {% else %}
  814.                                         {{ Product.getPrice02IncTaxMin|price }}
  815.                                     {% endif %}
  816.                                 </p>
  817.                             </a>
  818.                             {% if Product.stock_find %}
  819.                                 {% set form = forms[Product.id] %}
  820. {#▼RZ 2025.08.19 ADD ログインしていないと購入出来ないのでボタンを非表示に▼#}
  821. {% if(is_granted('ROLE_USER')) %}
  822. {#▲RZ 2025.08.19 ADD ログインしていないと購入出来ないのでボタンを非表示に▲#}
  823.                                 <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  824.                                     <div class=\"ec-productRole__actions\">
  825.                                         {% if form.classcategory_id1 is defined %}
  826.                                             <div class=\"ec-select\">
  827.                                                 {{ form_widget(form.classcategory_id1) }}
  828.                                                 {{ form_errors(form.classcategory_id1) }}
  829.                                             </div>
  830.                                             {% if form.classcategory_id2 is defined %}
  831.                                                 <div class=\"ec-select\">
  832.                                                     {{ form_widget(form.classcategory_id2) }}
  833.                                                     {{ form_errors(form.classcategory_id2) }}
  834.                                                 </div>
  835.                                             {% endif %}
  836.                                         {% endif %}
  837.                                         <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  838.                                             {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  839.                                             {{ form_errors(form.quantity) }}
  840.                                         </div>
  841.                                     </div>
  842.                                     {{ form_rest(form) }}
  843.                                 </form>
  844.                                 <div class=\"ec-productRole__btn\">
  845.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  846.                                         <i class=\"fas fa-shopping-cart\"></i>
  847.                                         {{ 'カートに入れる'|trans }}
  848.                                     </button>
  849.                                 </div>
  850. {#▼RZ 2025.08.19 ADD ログインしていないと購入出来ないのでボタンを非表示に▼#}
  851. {% endif %}
  852. {#▲RZ 2025.08.19 ADD ログインしていないと購入出来ないのでボタンを非表示に▲#}
  853.                             {% else %}
  854.                                 <div class=\"ec-productRole__btn\">
  855.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  856.                                         {{ 'ただいま品切れ中です。'|trans }}
  857.                                     </button>
  858.                                 </div>
  859.                             {% endif %}
  860.                         </li>
  861.                     {% endfor %}
  862.                 </ul>
  863.             </div>
  864.             <div class=\"ec-modal\">
  865.                 <div class=\"ec-modal-overlay\">
  866.                     <div class=\"ec-modal-wrap\">
  867.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  868.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  869.                         <div class=\"ec-modal-box\">
  870.                             <div class=\"ec-role\">
  871.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  872.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  873.                             </div>
  874.                         </div>
  875.                     </div>
  876.                 </div>
  877.             </div>
  878.             <div class=\"ec-pagerRole\">
  879.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  880.             </div>
  881.         {% endif %}
  882.     {% endif %}
  883. {% endblock %}""Product/list.twig""/home/xs031638/hieiyuba.xyz/public_html/pro/app/template/default/Product/list.twig");
  884.     }
  885.     
  886.     public function checkSecurity()
  887.     {
  888.         static $tags = array("set" => 13"for" => 18"if" => 19"include" => 251);
  889.         static $filters = array("escape" => 19"raw" => 19"trans" => 47"length" => 101"no_image_product" => 171"nl2br" => 175"price" => 180);
  890.         static $functions = array("class_categories_as_json" => 19"url" => 75"form_widget" => 156"include" => 168"asset" => 171"is_granted" => 193"form_errors" => 200"form_rest" => 214);
  891.         try {
  892.             $this->sandbox->checkSecurity(
  893.                 ['set''for''if''include'],
  894.                 ['escape''raw''trans''length''no_image_product''nl2br''price'],
  895.                 ['class_categories_as_json''url''form_widget''include''asset''is_granted''form_errors''form_rest']
  896.             );
  897.         } catch (SecurityError $e) {
  898.             $e->setSourceContext($this->source);
  899.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  900.                 $e->setTemplateLine($tags[$e->getTagName()]);
  901.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  902.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  903.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  904.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  905.             }
  906.             throw $e;
  907.         }
  908.     }
  909. }