var/cache/dev/twig/45/45804243ad0e004192064da6af514222.php line 397

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