var/cache/dev/twig/d7/d7079760aeba15d76a2de44073a37fc4.php line 39

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_b0cfc16ebea6007a18e8cc245c579544 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.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 11
  30.         return "default_frame.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  39.         // line 13
  40.         $context["body_class"] = "product_page";
  41.         // line 11
  42.         $this->parent $this->loadTemplate("default_frame.twig""Product/list.twig"11);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46.         
  47.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48.     }
  49.     // line 15
  50.     public function block_javascript($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  55.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         // line 16
  58.         echo "    <script>
  59.         eccube.productsClassCategories = {
  60.             ";
  61.         // line 18
  62.         $context['_parent'] = $context;
  63.         $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); })()));
  64.         $context['loop'] = [
  65.           'parent' => $context['_parent'],
  66.           'index0' => 0,
  67.           'index'  => 1,
  68.           'first'  => true,
  69.         ];
  70.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  71.             $length count($context['_seq']);
  72.             $context['loop']['revindex0'] = $length 1;
  73.             $context['loop']['revindex'] = $length;
  74.             $context['loop']['length'] = $length;
  75.             $context['loop']['last'] = === $length;
  76.         }
  77.         foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  78.             // line 19
  79.             echo "            \"";
  80.             echo twig_escape_filter($this->envtwig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse19), "js"), "html"nulltrue);
  81.             echo "\": ";
  82.             echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
  83.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse19) == false)) {
  84.                 echo ", ";
  85.             }
  86.             // line 20
  87.             echo "            ";
  88.             ++$context['loop']['index0'];
  89.             ++$context['loop']['index'];
  90.             $context['loop']['first'] = false;
  91.             if (isset($context['loop']['length'])) {
  92.                 --$context['loop']['revindex0'];
  93.                 --$context['loop']['revindex'];
  94.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  95.             }
  96.         }
  97.         $_parent $context['_parent'];
  98.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  99.         $context array_intersect_key($context$_parent) + $_parent;
  100.         // line 21
  101.         echo "        };
  102.         \$(function() {
  103.             // 表示件数を変更
  104.             \$('.disp-number').change(function() {
  105.                 var dispNumber = \$(this).val();
  106.                 \$('#disp_number').val(dispNumber);
  107.                 \$('#pageno').val(1);
  108.                 \$(\"#form1\").submit();
  109.             });
  110.             // 並び順を変更
  111.             \$('.order-by').change(function() {
  112.                 var orderBy = \$(this).val();
  113.                 \$('#orderby').val(orderBy);
  114.                 \$('#pageno').val(1);
  115.                 \$(\"#form1\").submit();
  116.             });
  117.             \$('.add-cart').on('click', function(e) {
  118.                 var \$form = \$(this).parents('li').find('form');
  119.                 // 個数フォームのチェック
  120.                 var \$quantity = \$form.parent().find('.quantity');
  121.                 if (\$quantity.val() < 1) {
  122.                     \$quantity[0].setCustomValidity('";
  123.         // line 47
  124.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  125.         echo "');
  126.                     setTimeout(function() {
  127.                         loadingOverlay('hide');
  128.                     }, 100);
  129.                     return true;
  130.                 } else {
  131.                     \$quantity[0].setCustomValidity('');
  132.                 }
  133.                 e.preventDefault();
  134.                 \$.ajax({
  135.                     url: \$form.attr('action'),
  136.                     type: \$form.attr('method'),
  137.                     data: \$form.serialize(),
  138.                     dataType: 'json',
  139.                     beforeSend: function(xhr, settings) {
  140.                         // Buttonを無効にする
  141.                         \$('.add-cart').prop('disabled', true);
  142.                     }
  143.                 }).done(function(data) {
  144.                     // レスポンス内のメッセージをalertで表示
  145.                     \$.each(data.messages, function() {
  146.                         \$('#ec-modal-header').html(this);
  147.                     });
  148.                     \$('.ec-modal').show()
  149.                     // カートブロックを更新する
  150.                     \$.ajax({
  151.                         url: '";
  152.         // line 75
  153.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  154.         echo "',
  155.                         type: 'GET',
  156.                         dataType: 'html'
  157.                     }).done(function(html) {
  158.                         \$('.ec-headerRole__cart').html(html);
  159.                     });
  160.                 }).fail(function(data) {
  161.                     alert('";
  162.         // line 82
  163.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  164.         echo "');
  165.                 }).always(function(data) {
  166.                     // Buttonを有効にする
  167.                     \$('.add-cart').prop('disabled', false);
  168.                 });
  169.             });
  170.         });
  171.         \$('.ec-modal-wrap').on('click', function(e) {
  172.             // モーダル内の処理は外側にバブリングさせない
  173.             e.stopPropagation();
  174.         });
  175.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  176.             \$('.ec-modal').hide()
  177.         });
  178.     </script>
  179. ";
  180.         
  181.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  182.         
  183.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  184.     }
  185.     // line 100
  186.     public function block_main($context, array $blocks = [])
  187.     {
  188.         $macros $this->macros;
  189.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  190.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  191.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  192.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  193.         // line 101
  194.         echo "    ";
  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.'101$this->source); })()), "category_id", [], "any"falsefalsefalse101), "vars", [], "any"falsefalsefalse101), "errors", [], "any"falsefalsefalse101)) > 0)) {
  196.             // line 102
  197.             echo "        <div class=\"ec-searchnavRole\">
  198.             <p class=\"errormsg text-danger\">";
  199.             // line 103
  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 106
  206.             echo "        <div class=\"ec-searchnavRole\">
  207.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  208.                 ";
  209.             // line 108
  210.             $context['_parent'] = $context;
  211.             $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.'108$this->source); })()));
  212.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  213.                 // line 109
  214.                 echo "                    <input type=\"hidden\" id=\"";
  215.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse109), "id", [], "any"falsefalsefalse109), "html"nulltrue);
  216.                 echo "\"
  217.                            name=\"";
  218.                 // line 110
  219.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse110), "full_name", [], "any"falsefalsefalse110), "html"nulltrue);
  220.                 echo "\"
  221.                            ";
  222.                 // line 111
  223.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse111), "value", [], "any"falsefalsefalse111))) {
  224.                     echo "value=\"";
  225.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse111), "value", [], "any"falsefalsefalse111), "html"nulltrue);
  226.                     echo "\" ";
  227.                 }
  228.                 echo "/>
  229.                 ";
  230.             }
  231.             $_parent $context['_parent'];
  232.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  233.             $context array_intersect_key($context$_parent) + $_parent;
  234.             // line 113
  235.             echo "            </form>
  236.             <div class=\"ec-searchnavRole__topicpath\">
  237.                 <ol class=\"ec-topicpath\">
  238.                     <li class=\"ec-topicpath__item\"><a href=\"";
  239.             // line 116
  240.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  241.             echo "\">";
  242.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html"nulltrue);
  243.             echo "</a>
  244.                     </li>
  245.                     ";
  246.             // line 118
  247.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'118$this->source); })()))) {
  248.                 // line 119
  249.                 echo "                        ";
  250.                 $context['_parent'] = $context;
  251.                 $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.'119$this->source); })()), "path", [], "any"falsefalsefalse119));
  252.                 $context['loop'] = [
  253.                   'parent' => $context['_parent'],
  254.                   'index0' => 0,
  255.                   'index'  => 1,
  256.                   'first'  => true,
  257.                 ];
  258.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  259.                     $length count($context['_seq']);
  260.                     $context['loop']['revindex0'] = $length 1;
  261.                     $context['loop']['revindex'] = $length;
  262.                     $context['loop']['length'] = $length;
  263.                     $context['loop']['last'] = === $length;
  264.                 }
  265.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  266.                     // line 120
  267.                     echo "                            <li class=\"ec-topicpath__divider\">|</li>
  268.                             <li class=\"ec-topicpath__item";
  269.                     // line 121
  270.                     if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse121)) {
  271.                         echo "--active";
  272.                     }
  273.                     echo "\"><a
  274.                                         href=\"";
  275.                     // line 122
  276.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  277.                     echo "?category_id=";
  278.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "id", [], "any"falsefalsefalse122), "html"nulltrue);
  279.                     echo "\">";
  280.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse122), "html"nulltrue);
  281.                     echo "</a>
  282.                             </li>
  283.                         ";
  284.                     ++$context['loop']['index0'];
  285.                     ++$context['loop']['index'];
  286.                     $context['loop']['first'] = false;
  287.                     if (isset($context['loop']['length'])) {
  288.                         --$context['loop']['revindex0'];
  289.                         --$context['loop']['revindex'];
  290.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  291.                     }
  292.                 }
  293.                 $_parent $context['_parent'];
  294.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  295.                 $context array_intersect_key($context$_parent) + $_parent;
  296.                 // line 125
  297.                 echo "                    ";
  298.             }
  299.             // line 126
  300.             echo "                    ";
  301.             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.'126$this->source); })()), "vars", [], "any"falsefalsefalse126), "value", [], "any"falsefalsefalse126) && 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.'126$this->source); })()), "vars", [], "any"falsefalsefalse126), "value", [], "any"falsefalsefalse126), "name", [], "any"falsefalsefalse126))) {
  302.                 // line 127
  303.                 echo "                        <li class=\"ec-topicpath__divider\">|</li>
  304.                         <li class=\"ec-topicpath__item\">";
  305.                 // line 128
  306.                 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.'128$this->source); })()), "vars", [], "any"falsefalsefalse128), "value", [], "any"falsefalsefalse128), "name", [], "any"falsefalsefalse128)]), "html"nulltrue);
  307.                 echo "</li>
  308.                     ";
  309.             }
  310.             // line 130
  311.             echo "                </ol>
  312.             </div>
  313.             <div class=\"ec-searchnavRole__infos\">
  314.                 <div class=\"ec-searchnavRole__counter\">
  315.                     ";
  316.             // line 134
  317.             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.'134$this->source); })()), "totalItemCount", [], "any"falsefalsefalse134) > 0)) {
  318.                 // line 135
  319.                 echo "                        ";
  320.                 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.'135$this->source); })()), "totalItemCount", [], "any"falsefalsefalse135)]);
  321.                 echo "
  322.                     ";
  323.             } else {
  324.                 // line 137
  325.                 echo "                        <span>";
  326.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html"nulltrue);
  327.                 echo "</span>
  328.                     ";
  329.             }
  330.             // line 139
  331.             echo "                </div>
  332.                 ";
  333.             // line 140
  334.             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.'140$this->source); })()), "totalItemCount", [], "any"falsefalsefalse140) > 0)) {
  335.                 // line 141
  336.                 echo "                    <div class=\"ec-searchnavRole__actions\">
  337.                         <div class=\"ec-select\">
  338.                             ";
  339.                 // line 143
  340.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'143$this->source); })()), "disp_number", [], "any"falsefalsefalse143), 'widget', ["id" => """attr" => ["class" => "disp-number"]]);
  341.                 echo "
  342.                             ";
  343.                 // line 144
  344.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'144$this->source); })()), "orderby", [], "any"falsefalsefalse144), 'widget', ["id" => """attr" => ["class" => "order-by"]]);
  345.                 echo "
  346.                         </div>
  347.                     </div>
  348.                 ";
  349.             }
  350.             // line 148
  351.             echo "            </div>
  352.         </div>
  353.         ";
  354.             // line 150
  355.             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.'150$this->source); })()), "totalItemCount", [], "any"falsefalsefalse150) > 0)) {
  356.                 // line 151
  357.                 echo "            <div class=\"ec-shelfRole\">
  358.                 <ul class=\"ec-shelfGrid\">
  359.                     ";
  360.                 // line 153
  361.                 $context['_parent'] = $context;
  362.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'153$this->source); })()));
  363.                 $context['loop'] = [
  364.                   'parent' => $context['_parent'],
  365.                   'index0' => 0,
  366.                   'index'  => 1,
  367.                   'first'  => true,
  368.                 ];
  369.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  370.                     $length count($context['_seq']);
  371.                     $context['loop']['revindex0'] = $length 1;
  372.                     $context['loop']['revindex'] = $length;
  373.                     $context['loop']['length'] = $length;
  374.                     $context['loop']['last'] = === $length;
  375.                 }
  376.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  377.                     // line 154
  378.                     echo "                        <li class=\"ec-shelfGrid__item\" data-product-id=\"";
  379.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse154), "html"nulltrue);
  380.                     echo "\">
  381. \t\t\t\t\t\t\t<div class=\"productlist_discription\">
  382. \t\t\t\t\t\t\t\t<a href=\"";
  383.                     // line 156
  384.                     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"falsefalsefalse156)]), "html"nulltrue);
  385.                     echo "\">
  386. \t\t\t\t\t\t\t\t\t<div class=\"ec-shelfGrid__item-image\">
  387. \t\t\t\t\t\t\t\t\t\t<img src=\"";
  388.                     // line 158
  389.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env$this->source$context["Product"], "main_list_image", [], "any"falsefalsefalse158)), "save_image"), "html"nulltrue);
  390.                     echo "\" alt=\"";
  391.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse158), "html"nulltrue);
  392.                     echo "\" ";
  393.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse158) > 5)) {
  394.                         echo " loading=\"lazy\"";
  395.                     }
  396.                     echo ">
  397. \t\t\t\t\t\t\t\t\t</div>
  398. \t\t\t\t\t\t\t\t\t<div class=\"product_list_productdiscription\">
  399. \t\t\t\t\t\t\t\t\t\t<h2>";
  400.                     // line 162
  401.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse162), "html"nulltrue);
  402.                     echo "</h2>
  403. \t\t\t\t\t\t\t\t\t\t";
  404.                     // line 163
  405.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsefalse163)) {
  406.                         // line 164
  407.                         echo "\t\t\t\t\t\t\t\t\t\t\t<p class=\"product_description\">";
  408.                         echo twig_nl2br(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsefalse164));
  409.                         echo "</p>
  410. \t\t\t\t\t\t\t\t\t\t";
  411.                     }
  412.                     // line 166
  413.                     echo "                    <div class=\"review-price-block flex\">
  414.                     
  415.                     ";
  416.                     // line 169
  417.                     echo "                    ";
  418.                     $context["stats"] = ((twig_get_attribute($this->env$this->source, ($context["review_stats"] ?? null), twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse169), [], "array"truetruefalse169)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["review_stats"] ?? null), twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse169), [], "array"falsefalsefalse169), null)) : (null));
  419.                     // line 170
  420.                     echo "                    <div class=\"ec-productRole__review\">
  421.                         ";
  422.                     // line 171
  423.                     if ((isset($context["stats"]) || array_key_exists("stats"$context) ? $context["stats"] : (function () { throw new RuntimeError('Variable "stats" does not exist.'171$this->source); })())) {
  424.                         // line 172
  425.                         echo "                            ";
  426.                         // line 173
  427.                         echo "                            <span class=\"ec-productRole__star\">
  428.                                 ";
  429.                         // line 174
  430.                         $context["rating"] = twig_round(twig_get_attribute($this->env$this->source, (isset($context["stats"]) || array_key_exists("stats"$context) ? $context["stats"] : (function () { throw new RuntimeError('Variable "stats" does not exist.'174$this->source); })()), "avg_rating", [], "any"falsefalsefalse174));
  431.                         // line 175
  432.                         echo "                                ";
  433.                         $context['_parent'] = $context;
  434.                         $context['_seq'] = twig_ensure_traversable(range(15));
  435.                         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  436.                             // line 176
  437.                             echo "                                    ";
  438.                             if (($context["i"] <= (isset($context["rating"]) || array_key_exists("rating"$context) ? $context["rating"] : (function () { throw new RuntimeError('Variable "rating" does not exist.'176$this->source); })()))) {
  439.                                 echo "★";
  440.                             } else {
  441.                                 echo "☆";
  442.                             }
  443.                             // line 177
  444.                             echo "                                ";
  445.                         }
  446.                         $_parent $context['_parent'];
  447.                         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  448.                         $context array_intersect_key($context$_parent) + $_parent;
  449.                         // line 178
  450.                         echo "                            </span>
  451.                             ";
  452.                         // line 180
  453.                         echo "                            <span class=\"ec-productRole__reviewScore\">";
  454.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["stats"]) || array_key_exists("stats"$context) ? $context["stats"] : (function () { throw new RuntimeError('Variable "stats" does not exist.'180$this->source); })()), "avg_rating", [], "any"falsefalsefalse180), 1), "html"nulltrue);
  455.                         echo "</span>
  456.                             <span class=\"ec-productRole__reviewCount\">(";
  457.                         // line 181
  458.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["stats"]) || array_key_exists("stats"$context) ? $context["stats"] : (function () { throw new RuntimeError('Variable "stats" does not exist.'181$this->source); })()), "review_count", [], "any"falsefalsefalse181), "html"nulltrue);
  459.                         echo "件)</span>
  460.                         ";
  461.                     } else {
  462.                         // line 183
  463.                         echo "                            ";
  464.                         // line 184
  465.                         echo "                            <span class=\"ec-productRole__star\">☆☆☆☆☆</span>
  466.                             <span class=\"ec-productRole__reviewCount\">(0件)</span>
  467.                         ";
  468.                     }
  469.                     // line 187
  470.                     echo "                    </div>
  471.                     ";
  472.                     // line 189
  473.                     echo "                      
  474. \t\t\t\t\t\t\t\t\t\t<p class=\"price02-default\">
  475. \t\t\t\t\t\t\t\t\t\t\t";
  476.                     // line 191
  477.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsefalse191)) {
  478.                         // line 192
  479.                         echo "\t\t\t\t\t\t\t\t\t\t\t\t";
  480.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsefalse192) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsefalse192))) {
  481.                             // line 193
  482.                             echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
  483.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse193)), "html"nulltrue);
  484.                             echo "
  485. \t\t\t\t\t\t\t\t\t\t\t\t";
  486.                         } else {
  487.                             // line 195
  488.                             echo "\t\t\t\t\t\t\t\t\t\t\t\t\t";
  489.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse195)), "html"nulltrue);
  490.                             echo " ~ ";
  491.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsefalse195)), "html"nulltrue);
  492.                             echo "
  493. \t\t\t\t\t\t\t\t\t\t\t\t";
  494.                         }
  495.                         // line 197
  496.                         echo "\t\t\t\t\t\t\t\t\t\t\t";
  497.                     } else {
  498.                         // line 198
  499.                         echo "\t\t\t\t\t\t\t\t\t\t\t\t";
  500.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse198)), "html"nulltrue);
  501.                         echo "
  502. \t\t\t\t\t\t\t\t\t\t\t";
  503.                     }
  504.                     // line 200
  505.                     echo "\t\t\t\t\t\t\t\t\t\t</p>
  506.                     </div>
  507. \t\t\t\t\t\t\t\t\t</div>
  508. \t\t\t\t\t\t\t\t</a>
  509. \t\t\t\t\t\t\t</div>
  510. \t\t\t\t\t\t";
  511.                     // line 205
  512.                     if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  513.                         // line 206
  514.                         echo "                            ";
  515.                         if (twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsefalse206)) {
  516.                             // line 207
  517.                             echo "                                ";
  518.                             $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.'207$this->source); })()), twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse207), [], "array"falsefalsefalse207);
  519.                             // line 208
  520.                             echo "\t\t\t\t\t\t\t<div class=\"login_cart_area\">
  521.                                 <form name=\"form";
  522.                             // line 209
  523.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse209), "html"nulltrue);
  524.                             echo "\" id=\"productForm";
  525.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse209), "html"nulltrue);
  526.                             echo "\" action=\"";
  527.                             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"falsefalsefalse209)]), "html"nulltrue);
  528.                             echo "\" method=\"post\">
  529.                                     <div class=\"ec-productRole__actions\">
  530.                                         ";
  531.                             // line 211
  532.                             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse211)) {
  533.                                 // line 212
  534.                                 echo "                                            <div class=\"ec-select\">
  535.                                                 ";
  536.                                 // line 213
  537.                                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'213$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse213), 'widget');
  538.                                 echo "
  539.                                                 ";
  540.                                 // line 214
  541.                                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'214$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse214), 'errors');
  542.                                 echo "
  543.                                             </div>
  544.                                             ";
  545.                                 // line 216
  546.                                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse216)) {
  547.                                     // line 217
  548.                                     echo "                                                <div class=\"ec-select\">
  549.                                                     ";
  550.                                     // line 218
  551.                                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'218$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse218), 'widget');
  552.                                     echo "
  553.                                                     ";
  554.                                     // line 219
  555.                                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'219$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse219), 'errors');
  556.                                     echo "
  557.                                                 </div>
  558.                                             ";
  559.                                 }
  560.                                 // line 222
  561.                                 echo "                                        ";
  562.                             }
  563.                             // line 223
  564.                             echo "                                        <div class=\"ec-numberInput\"><span>";
  565.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  566.                             echo "</span>
  567.                                             ";
  568.                             // line 224
  569.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'224$this->source); })()), "quantity", [], "any"falsefalsefalse224), 'widget', ["attr" => ["class" => "quantity"]]);
  570.                             echo "
  571.                                             ";
  572.                             // line 225
  573.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'225$this->source); })()), "quantity", [], "any"falsefalsefalse225), 'errors');
  574.                             echo "
  575.                                         </div>
  576.                                     </div>
  577.                                     ";
  578.                             // line 228
  579.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'228$this->source); })()), 'rest');
  580.                             echo "
  581.                                 </form>
  582.                                 <div class=\"ec-productRole__btn\">
  583.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"";
  584.                             // line 231
  585.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse231), "html"nulltrue);
  586.                             echo "\" form=\"productForm";
  587.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse231), "html"nulltrue);
  588.                             echo "\">
  589.                                         ";
  590.                             // line 232
  591.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  592.                             echo "
  593.                                     </button>
  594.                                 </div>
  595. \t\t\t\t\t\t\t</div>
  596.                             ";
  597.                         } else {
  598.                             // line 237
  599.                             echo "\t\t\t\t\t\t\t<div class=\"login_cart_area\">
  600.                                 <div class=\"ec-productRole__btn\">
  601.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  602.                                         ";
  603.                             // line 240
  604.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  605.                             echo "
  606.                                     </button>
  607.                                 </div>
  608. \t\t\t\t\t\t\t</div>
  609.                             ";
  610.                         }
  611.                         // line 245
  612.                         echo "\t\t\t\t\t\t";
  613.                     } else {
  614.                         // line 246
  615.                         echo "\t\t\t\t\t\t\t<div class=\"no_login\"></div>
  616. \t\t\t\t\t\t";
  617.                     }
  618.                     // line 248
  619.                     echo "                        </li>
  620.                     ";
  621.                     ++$context['loop']['index0'];
  622.                     ++$context['loop']['index'];
  623.                     $context['loop']['first'] = false;
  624.                     if (isset($context['loop']['length'])) {
  625.                         --$context['loop']['revindex0'];
  626.                         --$context['loop']['revindex'];
  627.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  628.                     }
  629.                 }
  630.                 $_parent $context['_parent'];
  631.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  632.                 $context array_intersect_key($context$_parent) + $_parent;
  633.                 // line 250
  634.                 echo "\t\t\t\t\t</ul>
  635.             </div>
  636. \t\t\t\t
  637.             <div class=\"ec-modal\">
  638.                 <div class=\"ec-modal-overlay\">
  639.                     <div class=\"ec-modal-wrap\">
  640.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  641.                 // line 256
  642.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  643.                 echo "\" alt=\"\"/></span></span>
  644.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  645.                 // line 257
  646.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  647.                 echo "</div>
  648.                         <div class=\"ec-modal-box\">
  649.                             <div class=\"ec-role\">
  650.                                 <span class=\"ec-inlineBtn--cancel\">";
  651.                 // line 260
  652.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  653.                 echo "</span>
  654.                                 <a href=\"";
  655.                 // line 261
  656.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  657.                 echo "\" class=\"ec-inlineBtn--action\">";
  658.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  659.                 echo "</a>
  660.                             </div>
  661.                         </div>
  662.                     </div>
  663.                 </div>
  664.             </div>
  665.             <div class=\"ec-pagerRole\">
  666.                 ";
  667.                 // line 268
  668.                 $this->loadTemplate("pager.twig""Product/list.twig"268)->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.'268$this->source); })()), "paginationData", [], "any"falsefalsefalse268)]));
  669.                 // line 269
  670.                 echo "            </div>
  671. \t\t\t\t                
  672.         ";
  673.             }
  674.             // line 273
  675.             echo "    ";
  676.         }
  677.         
  678.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  679.         
  680.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  681.     }
  682.     public function getTemplateName()
  683.     {
  684.         return "Product/list.twig";
  685.     }
  686.     public function isTraitable()
  687.     {
  688.         return false;
  689.     }
  690.     public function getDebugInfo()
  691.     {
  692.         return array (  704 => 273,  698 => 269,  696 => 268,  684 => 261,  680 => 260,  674 => 257,  670 => 256,  662 => 250,  647 => 248,  643 => 246,  640 => 245,  632 => 240,  627 => 237,  619 => 232,  613 => 231,  607 => 228,  601 => 225,  597 => 224,  592 => 223,  589 => 222,  583 => 219,  579 => 218,  576 => 217,  574 => 216,  569 => 214,  565 => 213,  562 => 212,  560 => 211,  551 => 209,  548 => 208,  545 => 207,  542 => 206,  540 => 205,  533 => 200,  527 => 198,  524 => 197,  516 => 195,  510 => 193,  507 => 192,  505 => 191,  501 => 189,  498 => 187,  493 => 184,  491 => 183,  486 => 181,  481 => 180,  478 => 178,  472 => 177,  465 => 176,  460 => 175,  458 => 174,  455 => 173,  453 => 172,  451 => 171,  448 => 170,  445 => 169,  441 => 166,  435 => 164,  433 => 163,  429 => 162,  416 => 158,  411 => 156,  405 => 154,  388 => 153,  384 => 151,  382 => 150,  378 => 148,  371 => 144,  367 => 143,  363 => 141,  361 => 140,  358 => 139,  352 => 137,  346 => 135,  344 => 134,  338 => 130,  333 => 128,  330 => 127,  327 => 126,  324 => 125,  303 => 122,  297 => 121,  294 => 120,  276 => 119,  274 => 118,  267 => 116,  262 => 113,  250 => 111,  246 => 110,  241 => 109,  237 => 108,  233 => 106,  227 => 103,  224 => 102,  221 => 101,  211 => 100,  184 => 82,  174 => 75,  143 => 47,  115 => 21,  101 => 20,  93 => 19,  76 => 18,  72 => 16,  62 => 15,  51 => 11,  49 => 13,  36 => 11,);
  693.     }
  694.     public function getSourceContext()
  695.     {
  696.         return new Source("{#
  697. This file is part of EC-CUBE
  698. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  699. http://www.ec-cube.co.jp/
  700. For the full copyright and license information, please view the LICENSE
  701. file that was distributed with this source code.
  702. #}
  703. {% extends 'default_frame.twig' %}
  704. {% set body_class = 'product_page' %}
  705. {% block javascript %}
  706.     <script>
  707.         eccube.productsClassCategories = {
  708.             {% for Product in pagination %}
  709.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  710.             {% endfor %}
  711.         };
  712.         \$(function() {
  713.             // 表示件数を変更
  714.             \$('.disp-number').change(function() {
  715.                 var dispNumber = \$(this).val();
  716.                 \$('#disp_number').val(dispNumber);
  717.                 \$('#pageno').val(1);
  718.                 \$(\"#form1\").submit();
  719.             });
  720.             // 並び順を変更
  721.             \$('.order-by').change(function() {
  722.                 var orderBy = \$(this).val();
  723.                 \$('#orderby').val(orderBy);
  724.                 \$('#pageno').val(1);
  725.                 \$(\"#form1\").submit();
  726.             });
  727.             \$('.add-cart').on('click', function(e) {
  728.                 var \$form = \$(this).parents('li').find('form');
  729.                 // 個数フォームのチェック
  730.                 var \$quantity = \$form.parent().find('.quantity');
  731.                 if (\$quantity.val() < 1) {
  732.                     \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  733.                     setTimeout(function() {
  734.                         loadingOverlay('hide');
  735.                     }, 100);
  736.                     return true;
  737.                 } else {
  738.                     \$quantity[0].setCustomValidity('');
  739.                 }
  740.                 e.preventDefault();
  741.                 \$.ajax({
  742.                     url: \$form.attr('action'),
  743.                     type: \$form.attr('method'),
  744.                     data: \$form.serialize(),
  745.                     dataType: 'json',
  746.                     beforeSend: function(xhr, settings) {
  747.                         // Buttonを無効にする
  748.                         \$('.add-cart').prop('disabled', true);
  749.                     }
  750.                 }).done(function(data) {
  751.                     // レスポンス内のメッセージをalertで表示
  752.                     \$.each(data.messages, function() {
  753.                         \$('#ec-modal-header').html(this);
  754.                     });
  755.                     \$('.ec-modal').show()
  756.                     // カートブロックを更新する
  757.                     \$.ajax({
  758.                         url: '{{ url('block_cart') }}',
  759.                         type: 'GET',
  760.                         dataType: 'html'
  761.                     }).done(function(html) {
  762.                         \$('.ec-headerRole__cart').html(html);
  763.                     });
  764.                 }).fail(function(data) {
  765.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  766.                 }).always(function(data) {
  767.                     // Buttonを有効にする
  768.                     \$('.add-cart').prop('disabled', false);
  769.                 });
  770.             });
  771.         });
  772.         \$('.ec-modal-wrap').on('click', function(e) {
  773.             // モーダル内の処理は外側にバブリングさせない
  774.             e.stopPropagation();
  775.         });
  776.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  777.             \$('.ec-modal').hide()
  778.         });
  779.     </script>
  780. {% endblock %}
  781. {% block main %}
  782.     {% if search_form.category_id.vars.errors|length > 0 %}
  783.         <div class=\"ec-searchnavRole\">
  784.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  785.         </div>
  786.     {% else %}
  787.         <div class=\"ec-searchnavRole\">
  788.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  789.                 {% for item in search_form %}
  790.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  791.                            name=\"{{ item.vars.full_name }}\"
  792.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  793.                 {% endfor %}
  794.             </form>
  795.             <div class=\"ec-searchnavRole__topicpath\">
  796.                 <ol class=\"ec-topicpath\">
  797.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
  798.                     </li>
  799.                     {% if Category is not null %}
  800.                         {% for Path in Category.path %}
  801.                             <li class=\"ec-topicpath__divider\">|</li>
  802.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  803.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  804.                             </li>
  805.                         {% endfor %}
  806.                     {% endif %}
  807.                     {% if search_form.vars.value and search_form.vars.value.name %}
  808.                         <li class=\"ec-topicpath__divider\">|</li>
  809.                         <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  810.                     {% endif %}
  811.                 </ol>
  812.             </div>
  813.             <div class=\"ec-searchnavRole__infos\">
  814.                 <div class=\"ec-searchnavRole__counter\">
  815.                     {% if pagination.totalItemCount > 0 %}
  816.                         {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  817.                     {% else %}
  818.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  819.                     {% endif %}
  820.                 </div>
  821.                 {% if pagination.totalItemCount > 0 %}
  822.                     <div class=\"ec-searchnavRole__actions\">
  823.                         <div class=\"ec-select\">
  824.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  825.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  826.                         </div>
  827.                     </div>
  828.                 {% endif %}
  829.             </div>
  830.         </div>
  831.         {% if pagination.totalItemCount > 0 %}
  832.             <div class=\"ec-shelfRole\">
  833.                 <ul class=\"ec-shelfGrid\">
  834.                     {% for Product in pagination %}
  835.                         <li class=\"ec-shelfGrid__item\" data-product-id=\"{{ Product.id }}\">
  836. \t\t\t\t\t\t\t<div class=\"productlist_discription\">
  837. \t\t\t\t\t\t\t\t<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  838. \t\t\t\t\t\t\t\t\t<div class=\"ec-shelfGrid__item-image\">
  839. \t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
  840. \t\t\t\t\t\t\t\t\t</div>
  841. \t\t\t\t\t\t\t\t\t<div class=\"product_list_productdiscription\">
  842. \t\t\t\t\t\t\t\t\t\t<h2>{{ Product.name }}</h2>
  843. \t\t\t\t\t\t\t\t\t\t{% if Product.description_list %}
  844. \t\t\t\t\t\t\t\t\t\t\t<p class=\"product_description\">{{ Product.description_list|raw|nl2br }}</p>
  845. \t\t\t\t\t\t\t\t\t\t{% endif %}
  846.                     <div class=\"review-price-block flex\">
  847.                     
  848.                     {# ▼▼▼ レビュー数と星評価を表示するコード ▼▼▼ #}
  849.                     {% set stats = review_stats[Product.id] | default(null) %}
  850.                     <div class=\"ec-productRole__review\">
  851.                         {% if stats %}
  852.                             {# 星評価の表示 #}
  853.                             <span class=\"ec-productRole__star\">
  854.                                 {% set rating = stats.avg_rating | round %}
  855.                                 {% for i in 1..5 %}
  856.                                     {% if i <= rating %}★{% else %}☆{% endif %}
  857.                                 {% endfor %}
  858.                             </span>
  859.                             {# 平均点とレビュー件数 #}
  860.                             <span class=\"ec-productRole__reviewScore\">{{ stats.avg_rating | number_format(1) }}</span>
  861.                             <span class=\"ec-productRole__reviewCount\">({{ stats.review_count }}件)</span>
  862.                         {% else %}
  863.                             {# レビューがない場合 #}
  864.                             <span class=\"ec-productRole__star\">☆☆☆☆☆</span>
  865.                             <span class=\"ec-productRole__reviewCount\">(0件)</span>
  866.                         {% endif %}
  867.                     </div>
  868.                     {# ▲▲▲ ここまで ▲▲▲ #}
  869.                       
  870. \t\t\t\t\t\t\t\t\t\t<p class=\"price02-default\">
  871. \t\t\t\t\t\t\t\t\t\t\t{% if Product.hasProductClass %}
  872. \t\t\t\t\t\t\t\t\t\t\t\t{% if Product.getPrice02Min == Product.getPrice02Max %}
  873. \t\t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMin|price }}
  874. \t\t\t\t\t\t\t\t\t\t\t\t{% else %}
  875. \t\t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  876. \t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
  877. \t\t\t\t\t\t\t\t\t\t\t{% else %}
  878. \t\t\t\t\t\t\t\t\t\t\t\t{{ Product.getPrice02IncTaxMin|price }}
  879. \t\t\t\t\t\t\t\t\t\t\t{% endif %}
  880. \t\t\t\t\t\t\t\t\t\t</p>
  881.                     </div>
  882. \t\t\t\t\t\t\t\t\t</div>
  883. \t\t\t\t\t\t\t\t</a>
  884. \t\t\t\t\t\t\t</div>
  885. \t\t\t\t\t\t{% if is_granted('ROLE_USER') %}
  886.                             {% if Product.stock_find %}
  887.                                 {% set form = forms[Product.id] %}
  888. \t\t\t\t\t\t\t<div class=\"login_cart_area\">
  889.                                 <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  890.                                     <div class=\"ec-productRole__actions\">
  891.                                         {% if form.classcategory_id1 is defined %}
  892.                                             <div class=\"ec-select\">
  893.                                                 {{ form_widget(form.classcategory_id1) }}
  894.                                                 {{ form_errors(form.classcategory_id1) }}
  895.                                             </div>
  896.                                             {% if form.classcategory_id2 is defined %}
  897.                                                 <div class=\"ec-select\">
  898.                                                     {{ form_widget(form.classcategory_id2) }}
  899.                                                     {{ form_errors(form.classcategory_id2) }}
  900.                                                 </div>
  901.                                             {% endif %}
  902.                                         {% endif %}
  903.                                         <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  904.                                             {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  905.                                             {{ form_errors(form.quantity) }}
  906.                                         </div>
  907.                                     </div>
  908.                                     {{ form_rest(form) }}
  909.                                 </form>
  910.                                 <div class=\"ec-productRole__btn\">
  911.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  912.                                         {{ 'カートに入れる'|trans }}
  913.                                     </button>
  914.                                 </div>
  915. \t\t\t\t\t\t\t</div>
  916.                             {% else %}
  917. \t\t\t\t\t\t\t<div class=\"login_cart_area\">
  918.                                 <div class=\"ec-productRole__btn\">
  919.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  920.                                         {{ 'ただいま品切れ中です。'|trans }}
  921.                                     </button>
  922.                                 </div>
  923. \t\t\t\t\t\t\t</div>
  924.                             {% endif %}
  925. \t\t\t\t\t\t{% else %}
  926. \t\t\t\t\t\t\t<div class=\"no_login\"></div>
  927. \t\t\t\t\t\t{% endif %}
  928.                         </li>
  929.                     {% endfor %}
  930. \t\t\t\t\t</ul>
  931.             </div>
  932. \t\t\t\t
  933.             <div class=\"ec-modal\">
  934.                 <div class=\"ec-modal-overlay\">
  935.                     <div class=\"ec-modal-wrap\">
  936.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  937.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  938.                         <div class=\"ec-modal-box\">
  939.                             <div class=\"ec-role\">
  940.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  941.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  942.                             </div>
  943.                         </div>
  944.                     </div>
  945.                 </div>
  946.             </div>
  947.             <div class=\"ec-pagerRole\">
  948.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  949.             </div>
  950. \t\t\t\t                
  951.         {% endif %}
  952.     {% endif %}
  953. {% endblock %}""Product/list.twig""/home/owl/owl-horie.com/public_html/test-eccube.owl-horie.com/app/template/cosme41/Product/list.twig");
  954.     }
  955. }