var/cache/dev/twig/dd/dd731161f12827b5692d4bc1eb3e42c1.php line 42

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_c6b562bf8359bf92bf5c339266609478 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.             'sub_area' => [$this'block_sub_area'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  28.         $this->checkSecurity();
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 1
  33.         return "default_frame.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  42.         // line 3
  43.         $context["body_id"] = "product_page";
  44.         // line 1
  45.         $this->parent $this->loadTemplate("default_frame.twig""Product/list.twig"1);
  46.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 5
  53.     public function block_javascript($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  60.         // line 6
  61.         echo "<script>
  62.     ";
  63.         // line 8
  64.         echo "
  65.     \$(function () {
  66.         // 表示件数を変更
  67.         \$('.disp-number').change(function () {
  68.             console.log(\"hoge\");
  69.             var dispNumber = \$(this).val();
  70.             \$('#disp_number').val(dispNumber);
  71.             \$('#pageno').val(1);
  72.             \$(\"#form1\").submit();
  73.         });
  74.         // 並び順を変更
  75.         \$('.order-by').change(function () {
  76.             var orderBy = \$(this).val();
  77.             \$('#orderby').val(orderBy);
  78.             \$('#pageno').val(1);
  79.             \$(\"#form1\").submit();
  80.         });
  81.         \$('.add-cart').on('click', function (e) {
  82.             var \$form = \$(this).parents('li').find('form');
  83.             // 個数フォームのチェック
  84.             var \$quantity = \$form.parent().find('.quantity');
  85.             if (\$quantity.val() < 1) {
  86.                 \$quantity[0].setCustomValidity('";
  87.         // line 34
  88.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  89.         echo "');
  90.                 setTimeout(function () {
  91.                     loadingOverlay('hide');
  92.                 }, 100);
  93.                 return true;
  94.             } else {
  95.                 \$quantity[0].setCustomValidity('');
  96.             }
  97.             e.preventDefault();
  98.             \$.ajax({
  99.                 url: \$form.attr('action'),
  100.                 type: \$form.attr('method'),
  101.                 data: \$form.serialize(),
  102.                 dataType: 'json',
  103.                 beforeSend: function (xhr, settings) {
  104.                     // Buttonを無効にする
  105.                     \$('.add-cart').prop('disabled', true);
  106.                 }
  107.             }).done(function (data) {
  108.                 // レスポンス内のメッセージをalertで表示
  109.                 \$.each(data.messages, function () {
  110.                     \$('#ec-modal-header').text(this);
  111.                 });
  112.                 \$('.ec-modal').show()
  113.                 // カートブロックを更新する
  114.                 \$.ajax({
  115.                     url: '";
  116.         // line 62
  117.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  118.         echo "',
  119.                     type: 'GET',
  120.                     dataType: 'html'
  121.                 }).done(function (html) {
  122.                     \$('.ec-headerRole__cart').html(html);
  123.                 });
  124.             }).fail(function (data) {
  125.                 alert('";
  126.         // line 69
  127.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  128.         echo "');
  129.             }).always(function (data) {
  130.                 // Buttonを有効にする
  131.                 \$('.add-cart').prop('disabled', false);
  132.             });
  133.         });
  134.     });
  135.     \$('.ec-modal-wrap').on('click', function (e) {
  136.         // モーダル内の処理は外側にバブリングさせない
  137.         e.stopPropagation();
  138.     });
  139.     \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function () {
  140.         \$('.ec-modal').hide()
  141.     });
  142. </script>
  143. ";
  144.         
  145.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  146.         
  147.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  148.     }
  149.     // line 86
  150.     public function block_sub_area($context, array $blocks = [])
  151.     {
  152.         $macros $this->macros;
  153.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  154.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sub_area"));
  155.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  156.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sub_area"));
  157.         // line 87
  158.         echo "        <ul class=\"pankuzu\">
  159.             <li><a href=\"";
  160.         // line 88
  161.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
  162.         echo "\">トップ</a></li>
  163.             ";
  164.         // line 89
  165.         if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'89$this->source); })()))) {
  166.             // line 90
  167.             echo "                    ";
  168.             $context['_parent'] = $context;
  169.             $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.'90$this->source); })()), "path", [], "any"falsefalsetrue90));
  170.             foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  171.                 // line 91
  172.                 echo "                        <li>
  173.                             <a href=\"";
  174.                 // line 92
  175.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  176.                 echo "?category_id=";
  177.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "id", [], "any"falsefalsetrue92), 92$this->source), "html"nulltrue);
  178.                 echo "\">";
  179.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsetrue92), 92$this->source), "html"nulltrue);
  180.                 echo "</a>
  181.                         </li>
  182.                     ";
  183.             }
  184.             $_parent $context['_parent'];
  185.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  186.             $context array_intersect_key($context$_parent) + $_parent;
  187.             // line 95
  188.             echo "            ";
  189.         } else {
  190.             // line 96
  191.             echo "            <li>
  192.             <a href=\"";
  193.             // line 97
  194.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  195.             echo "\">";
  196.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["subtitle"]) || array_key_exists("subtitle"$context) ? $context["subtitle"] : (function () { throw new RuntimeError('Variable "subtitle" does not exist.'97$this->source); })()), 97$this->source), "html"nulltrue);
  197.             echo "</a>
  198.             </li>
  199.             ";
  200.         }
  201.         // line 100
  202.         echo "        </ul>
  203. ";
  204.         
  205.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  206.         
  207.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  208.     }
  209.     // line 103
  210.     public function block_main($context, array $blocks = [])
  211.     {
  212.         $macros $this->macros;
  213.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  214.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  215.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  216.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  217.         // line 104
  218.         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.'104$this->source); })()), "category_id", [], "any"falsefalsetrue104), "vars", [], "any"falsefalsetrue104), "errors", [], "any"falsefalsetrue104)) > 0)) {
  219.             // line 105
  220.             echo "<div class=\"ec-searchnavRole\">
  221.     <p class=\"errormsg text-danger\">";
  222.             // line 106
  223.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  224.             echo "</p>
  225. </div>
  226. ";
  227.         } else {
  228.             // line 109
  229.             echo "<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  230.     ";
  231.             // line 110
  232.             $context['_parent'] = $context;
  233.             $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.'110$this->source); })()));
  234.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  235.                 // line 111
  236.                 echo "    <input type=\"hidden\" id=\"";
  237.                 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"falsefalsetrue111), "id", [], "any"falsefalsetrue111), 111$this->source), "html"nulltrue);
  238.                 echo "\" name=\"";
  239.                 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"falsefalsetrue111), "full_name", [], "any"falsefalsetrue111), 111$this->source), "html"nulltrue);
  240.                 echo "\" ";
  241.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue111), "value", [], "any"falsefalsetrue111))) {
  242.                     // line 112
  243.                     echo "value=\"";
  244.                     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"falsefalsetrue112), "value", [], "any"falsefalsetrue112), 112$this->source), "html"nulltrue);
  245.                     echo "\" ";
  246.                 }
  247.                 echo " />
  248.     ";
  249.             }
  250.             $_parent $context['_parent'];
  251.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  252.             $context array_intersect_key($context$_parent) + $_parent;
  253.             // line 114
  254.             echo "</form>
  255. <div class=\"main_ttl_wrap\">
  256.     ";
  257.             // line 117
  258.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'117$this->source); })()))) {
  259.                 // line 118
  260.                 echo "    ";
  261.                 $context['_parent'] = $context;
  262.                 $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.'118$this->source); })()), "path", [], "any"falsefalsetrue118));
  263.                 $context['loop'] = [
  264.                   'parent' => $context['_parent'],
  265.                   'index0' => 0,
  266.                   'index'  => 1,
  267.                   'first'  => true,
  268.                 ];
  269.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  270.                     $length count($context['_seq']);
  271.                     $context['loop']['revindex0'] = $length 1;
  272.                     $context['loop']['revindex'] = $length;
  273.                     $context['loop']['length'] = $length;
  274.                     $context['loop']['last'] = === $length;
  275.                 }
  276.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  277.                     // line 119
  278.                     echo "    ";
  279.                     if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue119)) {
  280.                         // line 120
  281.                         echo "    <h2 class=\"main_ttl\">";
  282.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsetrue120), 120$this->source), "html"nulltrue);
  283.                         echo "</h2>
  284.     ";
  285.                     }
  286.                     // line 122
  287.                     echo "    ";
  288.                     ++$context['loop']['index0'];
  289.                     ++$context['loop']['index'];
  290.                     $context['loop']['first'] = false;
  291.                     if (isset($context['loop']['length'])) {
  292.                         --$context['loop']['revindex0'];
  293.                         --$context['loop']['revindex'];
  294.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  295.                     }
  296.                 }
  297.                 $_parent $context['_parent'];
  298.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  299.                 $context array_intersect_key($context$_parent) + $_parent;
  300.                 // line 123
  301.                 echo "    ";
  302.             } else {
  303.                 // line 124
  304.                 echo "    <h2 class=\"main_ttl\">商品一覧</h2>
  305.     ";
  306.             }
  307.             // line 126
  308.             echo "</div>
  309. <div class=\"sortarea_wrap\">
  310.     ";
  311.             // line 128
  312.             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.'128$this->source); })()), "totalItemCount", [], "any"falsefalsetrue128) > 0)) {
  313.                 // line 129
  314.                 echo "    <p><span class=\"txt_red\">";
  315.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(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.'129$this->source); })()), "totalItemCount", [], "any"falsefalsetrue129), 129$this->source), "html"nulltrue);
  316.                 echo "件</span>の商品がございます。</p>
  317.     ";
  318.             } else {
  319.                 // line 131
  320.                 echo "    <p>お探しの商品は見つかりませんでした</p>
  321.     ";
  322.             }
  323.             // line 133
  324.             echo "    <ul class=\"sortarea\">
  325.         <li>並び替え</li>
  326.         <li>
  327.             ";
  328.             // line 136
  329.             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.'136$this->source); })()), "disp_number", [], "any"falsefalsetrue136), 136$this->source), 'widget', ["id" => """attr" => ["class" => "disp-number"]]);
  330.             echo "
  331.         </li>
  332.         <li class=\"selectarea\">
  333.             ";
  334.             // line 139
  335.             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.'139$this->source); })()), "orderby", [], "any"falsefalsetrue139), 139$this->source), 'widget', ["id" => """attr" => ["class" => "order-by"]]);
  336.             echo "
  337.         </li>
  338.     </ul>
  339. </div>
  340. ";
  341.             // line 144
  342.             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.'144$this->source); })()), "totalItemCount", [], "any"falsefalsetrue144) > 0)) {
  343.                 // line 145
  344.                 $this->loadTemplate("pager.twig""Product/list.twig"145)->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.'145$this->source); })()), "paginationData", [], "any"falsefalsetrue145)]));
  345.                 // line 146
  346.                 echo "<ul class=\"list_item\">
  347.     ";
  348.                 // line 147
  349.                 $context['_parent'] = $context;
  350.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'147$this->source); })()));
  351.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  352.                     // line 148
  353.                     echo "    ";
  354.                     // line 150
  355.                     echo "    ";
  356.                     $context["minPrice"] = $this->extensions['Plugin\CustomPrice\Twig\Extension\EccubeExtension']->CustomProductFindWhere($this->sandbox->ensureToStringAllowed($context["Product"], 150$this->source), "min_price");
  357.                     // line 151
  358.                     echo "    ";
  359.                     $context["maxPrice"] = $this->extensions['Plugin\CustomPrice\Twig\Extension\EccubeExtension']->CustomProductFindWhere($this->sandbox->ensureToStringAllowed($context["Product"], 151$this->source), "max_price");
  360.                     // line 152
  361.                     echo "    ";
  362.                     $context["maxTotal"] = $this->extensions['Plugin\CustomPrice\Twig\Extension\EccubeExtension']->CustomProductFindWhere($this->sandbox->ensureToStringAllowed($context["Product"], 152$this->source), "max_total");
  363.                     // line 153
  364.                     echo "    <li>
  365.         <a href=\"";
  366.                     // line 154
  367.                     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"falsefalsetrue154)]), "html"nulltrue);
  368.                     echo "\">
  369.             <div class=\"list_item_img\">
  370.                 <img src=\"";
  371.                     // line 156
  372.                     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"], "MainListImage", [], "any"falsefalsetrue156), 156$this->source)), "save_image"), "html"nulltrue);
  373.                     echo "\" alt=\"";
  374.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue156), 156$this->source), "html"nulltrue);
  375.                     echo "\">
  376.             </div>
  377.         </a>
  378.         <p class=\"list_item_name\">";
  379.                     // line 159
  380.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue159), 159$this->source), "html"nulltrue);
  381.                     echo "</p>
  382.         ";
  383.                     // line 161
  384.                     if (twig_get_attribute($this->env$this->source$context["Product"], "getMinLength", [], "any"falsefalsetrue161)) {
  385.                         // line 162
  386.                         echo "        <p class=\"list_item_detail\">フレーム幅:";
  387.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getMinLength", [], "any"falsefalsetrue162), 162$this->source)), "html"nulltrue);
  388.                         echo "mm</p>
  389.         ";
  390.                     }
  391.                     // line 164
  392.                     echo "
  393.         ";
  394.                     // line 165
  395.                     if (twig_get_attribute($this->env$this->source$context["Product"], "getMaxLength", [], "any"falsefalsetrue165)) {
  396.                         // line 166
  397.                         echo "        <p class=\"list_item_detail\">フレーム厚み:";
  398.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getMaxLength", [], "any"falsefalsetrue166), 166$this->source)), "html"nulltrue);
  399.                         echo "mm</p>
  400.         ";
  401.                     }
  402.                     // line 168
  403.                     echo "
  404.         ";
  405.                     // line 170
  406.                     if ((isset($context["maxTotal"]) || array_key_exists("maxTotal"$context) ? $context["maxTotal"] : (function () { throw new RuntimeError('Variable "maxTotal" does not exist.'170$this->source); })())) {
  407.                         // line 171
  408.                         echo "        <p class=\"list_item_detail\">ヨコ・タテ合計: ";
  409.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["maxTotal"]) || array_key_exists("maxTotal"$context) ? $context["maxTotal"] : (function () { throw new RuntimeError('Variable "maxTotal" does not exist.'171$this->source); })()), 171$this->source)), "html"nulltrue);
  410.                         echo "mmまで</p>
  411.         ";
  412.                     }
  413.                     // line 173
  414.                     echo "
  415.         <p class=\"list_item_price\">
  416.             ";
  417.                     // line 175
  418.                     if ((((isset($context["minPrice"]) || array_key_exists("minPrice"$context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.'175$this->source); })()) != (isset($context["maxPrice"]) || array_key_exists("maxPrice"$context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.'175$this->source); })())) &&  !(null === (isset($context["maxPrice"]) || array_key_exists("maxPrice"$context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.'175$this->source); })())))) {
  419.                         // line 176
  420.                         echo "            ";
  421.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["minPrice"]) || array_key_exists("minPrice"$context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.'176$this->source); })()), 176$this->source)), "html"nulltrue);
  422.                         echo "~";
  423.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["maxPrice"]) || array_key_exists("maxPrice"$context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.'176$this->source); })()), 176$this->source)), "html"nulltrue);
  424.                         // line 177
  425.                         echo "
  426.             ";
  427.                     } elseif ( !(null ===                     // line 178
  428. (isset($context["minPrice"]) || array_key_exists("minPrice"$context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.'178$this->source); })()))) {
  429.                         // line 179
  430.                         echo "            ";
  431.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["minPrice"]) || array_key_exists("minPrice"$context) ? $context["minPrice"] : (function () { throw new RuntimeError('Variable "minPrice" does not exist.'179$this->source); })()), 179$this->source)), "html"nulltrue);
  432.                         echo "
  433.             ";
  434.                     } elseif ( !(null ===                     // line 180
  435. (isset($context["maxPrice"]) || array_key_exists("maxPrice"$context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.'180$this->source); })()))) {
  436.                         // line 181
  437.                         echo "            ";
  438.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["maxPrice"]) || array_key_exists("maxPrice"$context) ? $context["maxPrice"] : (function () { throw new RuntimeError('Variable "maxPrice" does not exist.'181$this->source); })()), 181$this->source)), "html"nulltrue);
  439.                         echo "
  440.         
  441.             ";
  442.                     } elseif (twig_get_attribute($this->env$this->source,                     // line 183
  443. $context["Product"], "hasProductClass", [], "any"falsefalsetrue183)) {
  444.                         // line 184
  445.                         echo "            ";
  446.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsetrue184) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsetrue184))) {
  447.                             // line 185
  448.                             echo "            ";
  449.                             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"falsefalsetrue185), 185$this->source)), "html"nulltrue);
  450.                             echo "
  451.             ";
  452.                         } else {
  453.                             // line 187
  454.                             echo "            ";
  455.                             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"falsefalsetrue187), 187$this->source)), "html"nulltrue);
  456.                             echo " ~ ";
  457.                             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"falsefalsetrue187), 187$this->source)), "html"nulltrue);
  458.                             echo "
  459.             ";
  460.                         }
  461.                         // line 189
  462.                         echo "            ";
  463.                     } else {
  464.                         // line 190
  465.                         echo "            ";
  466.                         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"falsefalsetrue190), 190$this->source)), "html"nulltrue);
  467.                         echo "
  468.             ";
  469.                     }
  470.                     // line 192
  471.                     echo "            <span>円 (税込)</span>
  472.         </p>
  473.     </li>
  474.     ";
  475.                 }
  476.                 $_parent $context['_parent'];
  477.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  478.                 $context array_intersect_key($context$_parent) + $_parent;
  479.                 // line 196
  480.                 echo "
  481. </ul>
  482. ";
  483.                 // line 199
  484.                 $this->loadTemplate("pager.twig""Product/list.twig"199)->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.'199$this->source); })()), "paginationData", [], "any"falsefalsetrue199)]));
  485.             }
  486.             // line 201
  487.             echo "
  488. ";
  489.         }
  490.         
  491.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  492.         
  493.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  494.     }
  495.     public function getTemplateName()
  496.     {
  497.         return "Product/list.twig";
  498.     }
  499.     public function isTraitable()
  500.     {
  501.         return false;
  502.     }
  503.     public function getDebugInfo()
  504.     {
  505.         return array (  523 => 201,  520 => 199,  515 => 196,  506 => 192,  500 => 190,  497 => 189,  489 => 187,  483 => 185,  480 => 184,  478 => 183,  472 => 181,  470 => 180,  465 => 179,  463 => 178,  460 => 177,  455 => 176,  453 => 175,  449 => 173,  443 => 171,  441 => 170,  437 => 168,  431 => 166,  429 => 165,  426 => 164,  420 => 162,  418 => 161,  413 => 159,  405 => 156,  400 => 154,  397 => 153,  394 => 152,  391 => 151,  388 => 150,  386 => 148,  382 => 147,  379 => 146,  377 => 145,  375 => 144,  367 => 139,  361 => 136,  356 => 133,  352 => 131,  346 => 129,  344 => 128,  340 => 126,  336 => 124,  333 => 123,  319 => 122,  313 => 120,  310 => 119,  292 => 118,  290 => 117,  285 => 114,  274 => 112,  267 => 111,  263 => 110,  260 => 109,  254 => 106,  251 => 105,  249 => 104,  239 => 103,  228 => 100,  220 => 97,  217 => 96,  214 => 95,  201 => 92,  198 => 91,  193 => 90,  191 => 89,  187 => 88,  184 => 87,  174 => 86,  147 => 69,  137 => 62,  106 => 34,  78 => 8,  75 => 6,  65 => 5,  54 => 1,  52 => 3,  39 => 1,);
  506.     }
  507.     public function getSourceContext()
  508.     {
  509.         return new Source("{% extends 'default_frame.twig' %}
  510. {% set body_id = 'product_page' %}
  511. {% block javascript %}
  512. <script>
  513.     {# eccube.productsClassCategories = {{% for Product in pagination %}\"{{ Product.id|escape('js') }}\": { { class_categories_as_json(Product) | raw } } {% if loop.last == false %}, {% endif %}{% endfor %}}; #}
  514.     \$(function () {
  515.         // 表示件数を変更
  516.         \$('.disp-number').change(function () {
  517.             console.log(\"hoge\");
  518.             var dispNumber = \$(this).val();
  519.             \$('#disp_number').val(dispNumber);
  520.             \$('#pageno').val(1);
  521.             \$(\"#form1\").submit();
  522.         });
  523.         // 並び順を変更
  524.         \$('.order-by').change(function () {
  525.             var orderBy = \$(this).val();
  526.             \$('#orderby').val(orderBy);
  527.             \$('#pageno').val(1);
  528.             \$(\"#form1\").submit();
  529.         });
  530.         \$('.add-cart').on('click', function (e) {
  531.             var \$form = \$(this).parents('li').find('form');
  532.             // 個数フォームのチェック
  533.             var \$quantity = \$form.parent().find('.quantity');
  534.             if (\$quantity.val() < 1) {
  535.                 \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  536.                 setTimeout(function () {
  537.                     loadingOverlay('hide');
  538.                 }, 100);
  539.                 return true;
  540.             } else {
  541.                 \$quantity[0].setCustomValidity('');
  542.             }
  543.             e.preventDefault();
  544.             \$.ajax({
  545.                 url: \$form.attr('action'),
  546.                 type: \$form.attr('method'),
  547.                 data: \$form.serialize(),
  548.                 dataType: 'json',
  549.                 beforeSend: function (xhr, settings) {
  550.                     // Buttonを無効にする
  551.                     \$('.add-cart').prop('disabled', true);
  552.                 }
  553.             }).done(function (data) {
  554.                 // レスポンス内のメッセージをalertで表示
  555.                 \$.each(data.messages, function () {
  556.                     \$('#ec-modal-header').text(this);
  557.                 });
  558.                 \$('.ec-modal').show()
  559.                 // カートブロックを更新する
  560.                 \$.ajax({
  561.                     url: '{{ url('block_cart') }}',
  562.                     type: 'GET',
  563.                     dataType: 'html'
  564.                 }).done(function (html) {
  565.                     \$('.ec-headerRole__cart').html(html);
  566.                 });
  567.             }).fail(function (data) {
  568.                 alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  569.             }).always(function (data) {
  570.                 // Buttonを有効にする
  571.                 \$('.add-cart').prop('disabled', false);
  572.             });
  573.         });
  574.     });
  575.     \$('.ec-modal-wrap').on('click', function (e) {
  576.         // モーダル内の処理は外側にバブリングさせない
  577.         e.stopPropagation();
  578.     });
  579.     \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function () {
  580.         \$('.ec-modal').hide()
  581.     });
  582. </script>
  583. {% endblock %}
  584. {% block sub_area %}
  585.         <ul class=\"pankuzu\">
  586.             <li><a href=\"{{ url('homepage') }}\">トップ</a></li>
  587.             {% if Category is not null %}
  588.                     {% for Path in Category.path %}
  589.                         <li>
  590.                             <a href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  591.                         </li>
  592.                     {% endfor %}
  593.             {% else %}
  594.             <li>
  595.             <a href=\"{{ url('product_list') }}\">{{subtitle}}</a>
  596.             </li>
  597.             {% endif %}
  598.         </ul>
  599. {% endblock %}
  600. {% block main %}
  601. {% if search_form.category_id.vars.errors|length > 0 %}
  602. <div class=\"ec-searchnavRole\">
  603.     <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  604. </div>
  605. {% else %}
  606. <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  607.     {% for item in search_form %}
  608.     <input type=\"hidden\" id=\"{{ item.vars.id }}\" name=\"{{ item.vars.full_name }}\" {% if item.vars.value is not empty
  609.         %}value=\"{{ item.vars.value }}\" {% endif %} />
  610.     {% endfor %}
  611. </form>
  612. <div class=\"main_ttl_wrap\">
  613.     {% if Category is not null %}
  614.     {% for Path in Category.path %}
  615.     {% if loop.last %}
  616.     <h2 class=\"main_ttl\">{{ Path.name }}</h2>
  617.     {% endif %}
  618.     {% endfor %}
  619.     {% else %}
  620.     <h2 class=\"main_ttl\">商品一覧</h2>
  621.     {% endif %}
  622. </div>
  623. <div class=\"sortarea_wrap\">
  624.     {% if pagination.totalItemCount > 0 %}
  625.     <p><span class=\"txt_red\">{{pagination.totalItemCount}}件</span>の商品がございます。</p>
  626.     {% else %}
  627.     <p>お探しの商品は見つかりませんでした</p>
  628.     {% endif %}
  629.     <ul class=\"sortarea\">
  630.         <li>並び替え</li>
  631.         <li>
  632.             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  633.         </li>
  634.         <li class=\"selectarea\">
  635.             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  636.         </li>
  637.     </ul>
  638. </div>
  639. {% if pagination.totalItemCount > 0 %}
  640. {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  641. <ul class=\"list_item\">
  642.     {% for Product in pagination %}
  643.     {# {% set frame_width = getProduct_field(Product.id,\"frame_width\") %}
  644.     {% set frame_thickness = getProduct_field(Product.id,\"frame_thickness\") %} #}
  645.     {% set minPrice = CustomProductFindWhere(Product,\"min_price\") %}
  646.     {% set maxPrice = CustomProductFindWhere(Product,\"max_price\") %}
  647.     {% set maxTotal = CustomProductFindWhere(Product,\"max_total\") %}
  648.     <li>
  649.         <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  650.             <div class=\"list_item_img\">
  651.                 <img src=\"{{ asset(Product.MainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\">
  652.             </div>
  653.         </a>
  654.         <p class=\"list_item_name\">{{ Product.name }}</p>
  655.         {% if Product.getMinLength %}
  656.         <p class=\"list_item_detail\">フレーム幅:{{Product.getMinLength|number_format()}}mm</p>
  657.         {% endif %}
  658.         {% if Product.getMaxLength %}
  659.         <p class=\"list_item_detail\">フレーム厚み:{{Product.getMaxLength|number_format()}}mm</p>
  660.         {% endif %}
  661.         {% if maxTotal %}
  662.         <p class=\"list_item_detail\">ヨコ・タテ合計: {{ maxTotal|number_format() }}mmまで</p>
  663.         {% endif %}
  664.         <p class=\"list_item_price\">
  665.             {% if minPrice != maxPrice and maxPrice is not null %}
  666.             {{ minPrice|number_format() }}~{{ maxPrice|number_format()
  667.             }}
  668.             {% elseif minPrice is not null %}
  669.             {{ minPrice|number_format() }}
  670.             {% elseif maxPrice is not null %}
  671.             {{ maxPrice|number_format() }}
  672.         
  673.             {% elseif Product.hasProductClass %}
  674.             {% if Product.getPrice02Min == Product.getPrice02Max %}
  675.             {{ Product.getPrice02IncTaxMin|number_format() }}
  676.             {% else %}
  677.             {{ Product.getPrice02IncTaxMin|number_format() }} ~ {{ Product.getPrice02IncTaxMax|number_format() }}
  678.             {% endif %}
  679.             {% else %}
  680.             {{ Product.getPrice02IncTaxMin|number_format() }}
  681.             {% endif %}
  682.             <span>円 (税込)</span>
  683.         </p>
  684.     </li>
  685.     {% endfor %}
  686. </ul>
  687. {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  688. {% endif %}
  689. {% endif %}
  690. {% endblock %}""Product/list.twig""/home/hr67ekh16/u-arts-mirror.jp/public_html/app/template/uarts/Product/list.twig");
  691.     }
  692.     
  693.     public function checkSecurity()
  694.     {
  695.         static $tags = array("set" => 3"if" => 89"for" => 90"include" => 145);
  696.         static $filters = array("escape" => 34"trans" => 34"length" => 104"no_image_product" => 156"number_format" => 162);
  697.         static $functions = array("url" => 62"form_widget" => 136"CustomProductFindWhere" => 150"asset" => 156);
  698.         try {
  699.             $this->sandbox->checkSecurity(
  700.                 ['set''if''for''include'],
  701.                 ['escape''trans''length''no_image_product''number_format'],
  702.                 ['url''form_widget''CustomProductFindWhere''asset']
  703.             );
  704.         } catch (SecurityError $e) {
  705.             $e->setSourceContext($this->source);
  706.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  707.                 $e->setTemplateLine($tags[$e->getTagName()]);
  708.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  709.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  710.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  711.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  712.             }
  713.             throw $e;
  714.         }
  715.     }
  716. }