var/cache/dev/twig/9f/9f50ff4a1e25ae858b5a0f402ec0236e.php line 41

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Product/list.twig */
  14. class __TwigTemplate_f202ed2ad9c814ac6866cd33e8907d75 extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'javascript' => [$this'block_javascript'],
  24.             'main' => [$this'block_main'],
  25.         ];
  26.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  27.         $this->checkSecurity();
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 11
  32.         return "default_frame.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  41.         // line 13
  42.         $context["body_class"] = "product_page";
  43.         // line 11
  44.         $this->parent $this->loadTemplate("default_frame.twig""Product/list.twig"11);
  45.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 15
  52.     public function block_javascript($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  59.         // line 16
  60.         echo "    <script>
  61.         eccube.productsClassCategories = {
  62.             ";
  63.         // line 18
  64.         $context['_parent'] = $context;
  65.         $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'18$this->source); })()));
  66.         $context['loop'] = [
  67.           'parent' => $context['_parent'],
  68.           'index0' => 0,
  69.           'index'  => 1,
  70.           'first'  => true,
  71.         ];
  72.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  73.             $length count($context['_seq']);
  74.             $context['loop']['revindex0'] = $length 1;
  75.             $context['loop']['revindex'] = $length;
  76.             $context['loop']['length'] = $length;
  77.             $context['loop']['last'] = === $length;
  78.         }
  79.         foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  80.             // line 19
  81.             echo "            \"";
  82.             echo twig_escape_filter($this->envtwig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue19), 19$this->source), "js"), "html"nulltrue);
  83.             echo "\": ";
  84.             echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 19$this->source));
  85.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue19) == false)) {
  86.                 echo ", ";
  87.             }
  88.             // line 20
  89.             echo "            ";
  90.             ++$context['loop']['index0'];
  91.             ++$context['loop']['index'];
  92.             $context['loop']['first'] = false;
  93.             if (isset($context['loop']['length'])) {
  94.                 --$context['loop']['revindex0'];
  95.                 --$context['loop']['revindex'];
  96.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  97.             }
  98.         }
  99.         $_parent $context['_parent'];
  100.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  101.         $context array_intersect_key($context$_parent) + $_parent;
  102.         // line 21
  103.         echo "        };
  104.         \$(function() {
  105.             // 表示件数を変更
  106.             \$('.disp-number').change(function() {
  107.                 var dispNumber = \$(this).val();
  108.                 \$('#disp_number').val(dispNumber);
  109.                 \$('#pageno').val(1);
  110.                 \$(\"#form1\").submit();
  111.             });
  112.             // 並び順を変更
  113.             \$('.order-by').change(function() {
  114.                 var orderBy = \$(this).val();
  115.                 \$('#orderby').val(orderBy);
  116.                 \$('#pageno').val(1);
  117.                 \$(\"#form1\").submit();
  118.             });
  119.             \$('.add-cart').on('click', function(e) {
  120.                 var \$form = \$(this).parents('li').find('form');
  121.                 // 個数フォームのチェック
  122.                 var \$quantity = \$form.parent().find('.quantity');
  123.                 if (\$quantity.val() < 1) {
  124.                     \$quantity[0].setCustomValidity('";
  125.         // line 47
  126.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.invalid_quantity"), "html"nulltrue);
  127.         echo "');
  128.                     setTimeout(function() {
  129.                         loadingOverlay('hide');
  130.                     }, 100);
  131.                     return true;
  132.                 } else {
  133.                     \$quantity[0].setCustomValidity('');
  134.                 }
  135.                 e.preventDefault();
  136.                 \$.ajax({
  137.                     url: \$form.attr('action'),
  138.                     type: \$form.attr('method'),
  139.                     data: \$form.serialize(),
  140.                     dataType: 'json',
  141.                     beforeSend: function(xhr, settings) {
  142.                         // Buttonを無効にする
  143.                         \$('.add-cart').prop('disabled', true);
  144.                     }
  145.                 }).done(function(data) {
  146.                     // レスポンス内のメッセージをalertで表示
  147.                     \$.each(data.messages, function() {
  148.                         \$('#ec-modal-header').text(this);
  149.                     });
  150.                     \$('.ec-modal').show()
  151.                     // カートブロックを更新する
  152.                     \$.ajax({
  153.                         url: '";
  154.         // line 75
  155.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  156.         echo "',
  157.                         type: 'GET',
  158.                         dataType: 'html'
  159.                     }).done(function(html) {
  160.                         \$('.ec-headerRole__cart').html(html);
  161.                     });
  162.                 }).fail(function(data) {
  163.                     alert('";
  164.         // line 82
  165.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.add_cart_error"), "html"nulltrue);
  166.         echo "');
  167.                 }).always(function(data) {
  168.                     // Buttonを有効にする
  169.                     \$('.add-cart').prop('disabled', false);
  170.                 });
  171.             });
  172.         });
  173.         \$('.ec-modal-wrap').on('click', function(e) {
  174.             // モーダル内の処理は外側にバブリングさせない
  175.             e.stopPropagation();
  176.         });
  177.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  178.             \$('.ec-modal').hide()
  179.         });
  180.     </script>
  181. ";
  182.         
  183.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  184.         
  185.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  186.     }
  187.     // line 100
  188.     public function block_main($context, array $blocks = [])
  189.     {
  190.         $macros $this->macros;
  191.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  192.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  193.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  194.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  195.         // line 101
  196.         echo "    ";
  197.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'101$this->source); })()), "category_id", [], "any"falsefalsetrue101), "vars", [], "any"falsefalsetrue101), "errors", [], "any"falsefalsetrue101)) > 0)) {
  198.             // line 102
  199.             echo "        <div class=\"ec-searchnavRole\">
  200.             <p class=\"errormsg text-danger\">";
  201.             // line 103
  202.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.search__category_not_found"), "html"nulltrue);
  203.             echo "</p>
  204.         </div>
  205.     ";
  206.         } else {
  207.             // line 106
  208.             echo "        <div class=\"ec-searchnavRole\">
  209.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  210.                 ";
  211.             // line 108
  212.             $context['_parent'] = $context;
  213.             $context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'108$this->source); })()));
  214.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  215.                 // line 109
  216.                 echo "                    <input type=\"hidden\" id=\"";
  217.                 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"falsefalsetrue109), "id", [], "any"falsefalsetrue109), 109$this->source), "html"nulltrue);
  218.                 echo "\"
  219.                            name=\"";
  220.                 // line 110
  221.                 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"falsefalsetrue110), "full_name", [], "any"falsefalsetrue110), 110$this->source), "html"nulltrue);
  222.                 echo "\"
  223.                            ";
  224.                 // line 111
  225.                 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))) {
  226.                     echo "value=\"";
  227.                     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), "value", [], "any"falsefalsetrue111), 111$this->source), "html"nulltrue);
  228.                     echo "\" ";
  229.                 }
  230.                 echo "/>
  231.                 ";
  232.             }
  233.             $_parent $context['_parent'];
  234.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  235.             $context array_intersect_key($context$_parent) + $_parent;
  236.             // line 113
  237.             echo "            </form>
  238.             ";
  239.             // line 132
  240.             echo "            ";
  241.             // line 149
  242.             echo "        </div>
  243.         ";
  244.             // line 150
  245.             if ((twig_get_attribute($this->env$this->source, (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'150$this->source); })()), "totalItemCount", [], "any"falsefalsetrue150) > 0)) {
  246.                 // line 151
  247.                 echo "            <div class=\"ec-shelfRole\" style=\"margin-top:100px;\">
  248.                 <ul class=\"ec-shelfGrid\">
  249.                     ";
  250.                 // line 154
  251.                 echo "                    ";
  252.                 $context['_parent'] = $context;
  253.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'154$this->source); })()));
  254.                 $context['loop'] = [
  255.                   'parent' => $context['_parent'],
  256.                   'index0' => 0,
  257.                   'index'  => 1,
  258.                   'first'  => true,
  259.                 ];
  260.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  261.                     $length count($context['_seq']);
  262.                     $context['loop']['revindex0'] = $length 1;
  263.                     $context['loop']['revindex'] = $length;
  264.                     $context['loop']['length'] = $length;
  265.                     $context['loop']['last'] = === $length;
  266.                 }
  267.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  268.                     // line 155
  269.                     echo "                        <li class=\"ec-shelfGrid__item\" style=\"width:33%;\">
  270.                             <div style=\"text-align:center;white-space: nowrap;\">
  271.                                 <p class=\"ec-shelfGrid__item-image\">
  272.                                     <img src=\"";
  273.                     // line 158
  274.                     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"falsefalsetrue158), 158$this->source)), "save_image"), "html"nulltrue);
  275.                     echo "\" alt=\"";
  276.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue158), 158$this->source), "html"nulltrue);
  277.                     echo "\" ";
  278.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsetrue158) > 5)) {
  279.                         echo " loading=\"lazy\"";
  280.                     }
  281.                     echo ">
  282.                                 </p>
  283.                                 <p><strong>";
  284.                     // line 160
  285.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue160), 160$this->source), "html"nulltrue);
  286.                     echo "</strong></p>
  287.                                 ";
  288.                     // line 161
  289.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue161)) {
  290.                         // line 162
  291.                         echo "                                    <p>";
  292.                         echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue162), 162$this->source));
  293.                         echo "</p>
  294.                                 ";
  295.                     }
  296.                     // line 164
  297.                     echo "                                <p class=\"price02-default\">
  298.                                     ";
  299.                     // line 165
  300.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsetrue165)) {
  301.                         // line 166
  302.                         echo "                                        ";
  303.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsetrue166) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsetrue166))) {
  304.                             // line 167
  305.                             echo "                                            ";
  306.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue167), 167$this->source)), "html"nulltrue);
  307.                             echo "
  308.                                         ";
  309.                         } else {
  310.                             // line 169
  311.                             echo "                                            ";
  312.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue169), 169$this->source)), "html"nulltrue);
  313.                             echo " ~ ";
  314.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsetrue169), 169$this->source)), "html"nulltrue);
  315.                             echo "
  316.                                         ";
  317.                         }
  318.                         // line 171
  319.                         echo "                                    ";
  320.                     } else {
  321.                         // line 172
  322.                         echo "                                        ";
  323.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsetrue172), 172$this->source)), "html"nulltrue);
  324.                         echo "
  325.                                     ";
  326.                     }
  327.                     // line 174
  328.                     echo "                                </p>
  329.                                 <p style=\"white-space: normal;word-break: auto-phrase;font-size:14px;\">";
  330.                     // line 175
  331.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "description_detail", [], "any"falsefalsetrue175), 175$this->source), "html"nulltrue);
  332.                     echo "</p>
  333.                             </div>
  334.                             ";
  335.                     // line 178
  336.                     if (twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsetrue178)) {
  337.                         // line 179
  338.                         echo "                                ";
  339.                         $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.'179$this->source); })()), twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue179), [], "array"falsefalsetrue179);
  340.                         // line 180
  341.                         echo "                                <form name=\"form";
  342.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue180), 180$this->source), "html"nulltrue);
  343.                         echo "\" id=\"productForm";
  344.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue180), 180$this->source), "html"nulltrue);
  345.                         echo "\" action=\"";
  346.                         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"falsefalsetrue180)]), "html"nulltrue);
  347.                         echo "\" method=\"post\">
  348.                                     <div class=\"ec-productRole__actions\">
  349.                                         ";
  350.                         // line 182
  351.                         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruetrue182)) {
  352.                             // line 183
  353.                             echo "                                            <div class=\"ec-select\">
  354.                                                 ";
  355.                             // line 184
  356.                             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.'184$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue184), 184$this->source), 'widget');
  357.                             echo "
  358.                                                 ";
  359.                             // line 185
  360.                             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.'185$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue185), 185$this->source), 'errors');
  361.                             echo "
  362.                                             </div>
  363.                                             ";
  364.                             // line 187
  365.                             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruetrue187)) {
  366.                                 // line 188
  367.                                 echo "                                                <div class=\"ec-select\">
  368.                                                     ";
  369.                                 // line 189
  370.                                 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.'189$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue189), 189$this->source), 'widget');
  371.                                 echo "
  372.                                                     ";
  373.                                 // line 190
  374.                                 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.'190$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue190), 190$this->source), 'errors');
  375.                                 echo "
  376.                                                 </div>
  377.                                             ";
  378.                             }
  379.                             // line 193
  380.                             echo "                                        ";
  381.                         }
  382.                         // line 194
  383.                         echo "                                        <div class=\"ec-numberInput\"><span>";
  384.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("common.quantity"), "html"nulltrue);
  385.                         echo "</span>
  386.                                             ";
  387.                         // line 195
  388.                         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.'195$this->source); })()), "quantity", [], "any"falsefalsetrue195), 195$this->source), 'widget', ["attr" => ["class" => "quantity"]]);
  389.                         echo "
  390.                                             ";
  391.                         // line 196
  392.                         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.'196$this->source); })()), "quantity", [], "any"falsefalsetrue196), 196$this->source), 'errors');
  393.                         echo "
  394.                                         </div>
  395.                                     </div>
  396.                                     ";
  397.                         // line 199
  398.                         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.'199$this->source); })()), 199$this->source), 'rest');
  399.                         echo "
  400.                                 </form>
  401.                                 <div class=\"ec-productRole__btn\">
  402.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"";
  403.                         // line 202
  404.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue202), 202$this->source), "html"nulltrue);
  405.                         echo "\" form=\"productForm";
  406.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue202), 202$this->source), "html"nulltrue);
  407.                         echo "\">
  408.                                         ";
  409.                         // line 203
  410.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.add_cart"), "html"nulltrue);
  411.                         echo "
  412.                                     </button>
  413.                                 </div>
  414.                             ";
  415.                     } else {
  416.                         // line 207
  417.                         echo "                                <div class=\"ec-productRole__btn\">
  418.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  419.                                         ";
  420.                         // line 209
  421.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.out_of_stock"), "html"nulltrue);
  422.                         echo "
  423.                                     </button>
  424.                                 </div>
  425.                             ";
  426.                     }
  427.                     // line 213
  428.                     echo "                        </li>
  429.                     ";
  430.                     ++$context['loop']['index0'];
  431.                     ++$context['loop']['index'];
  432.                     $context['loop']['first'] = false;
  433.                     if (isset($context['loop']['length'])) {
  434.                         --$context['loop']['revindex0'];
  435.                         --$context['loop']['revindex'];
  436.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  437.                     }
  438.                 }
  439.                 $_parent $context['_parent'];
  440.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  441.                 $context array_intersect_key($context$_parent) + $_parent;
  442.                 // line 215
  443.                 echo "                </ul>
  444.             </div>
  445.             <div class=\"ec-modal\">
  446.                 <div class=\"ec-modal-overlay\">
  447.                     <div class=\"ec-modal-wrap\">
  448.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  449.                 // line 220
  450.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  451.                 echo "\" alt=\"\"/></span></span>
  452.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  453.                 // line 221
  454.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.add_cart_complete"), "html"nulltrue);
  455.                 echo "</div>
  456.                         <div class=\"ec-modal-box\">
  457.                             <div class=\"ec-role\">
  458.                                 <span class=\"ec-inlineBtn--cancel\">";
  459.                 // line 224
  460.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("front.product.continue"), "html"nulltrue);
  461.                 echo "</span>
  462.                                 <a href=\"";
  463.                 // line 225
  464.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  465.                 echo "\" class=\"ec-inlineBtn--action\">";
  466.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("common.go_to_cart"), "html"nulltrue);
  467.                 echo "</a>
  468.                             </div>
  469.                         </div>
  470.                     </div>
  471.                 </div>
  472.             </div>
  473.             <div class=\"ec-pagerRole\">
  474.                 ";
  475.                 // line 232
  476.                 $this->loadTemplate("pager.twig""Product/list.twig"232)->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.'232$this->source); })()), "paginationData", [], "any"falsefalsetrue232)]));
  477.                 // line 233
  478.                 echo "            </div>
  479.         ";
  480.             }
  481.             // line 235
  482.             echo "    ";
  483.         }
  484.         
  485.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  486.         
  487.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  488.     }
  489.     public function getTemplateName()
  490.     {
  491.         return "Product/list.twig";
  492.     }
  493.     public function isTraitable()
  494.     {
  495.         return false;
  496.     }
  497.     public function getDebugInfo()
  498.     {
  499.         return array (  510 => 235,  506 => 233,  504 => 232,  492 => 225,  488 => 224,  482 => 221,  478 => 220,  471 => 215,  456 => 213,  449 => 209,  445 => 207,  438 => 203,  432 => 202,  426 => 199,  420 => 196,  416 => 195,  411 => 194,  408 => 193,  402 => 190,  398 => 189,  395 => 188,  393 => 187,  388 => 185,  384 => 184,  381 => 183,  379 => 182,  369 => 180,  366 => 179,  364 => 178,  358 => 175,  355 => 174,  349 => 172,  346 => 171,  338 => 169,  332 => 167,  329 => 166,  327 => 165,  324 => 164,  318 => 162,  316 => 161,  312 => 160,  301 => 158,  296 => 155,  278 => 154,  274 => 151,  272 => 150,  269 => 149,  267 => 132,  264 => 113,  252 => 111,  248 => 110,  243 => 109,  239 => 108,  235 => 106,  229 => 103,  226 => 102,  223 => 101,  213 => 100,  186 => 82,  176 => 75,  145 => 47,  117 => 21,  103 => 20,  95 => 19,  78 => 18,  74 => 16,  64 => 15,  53 => 11,  51 => 13,  38 => 11,);
  500.     }
  501.     public function getSourceContext()
  502.     {
  503.         return new Source("{#
  504. This file is part of EC-CUBE
  505. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  506. http://www.ec-cube.co.jp/
  507. For the full copyright and license information, please view the LICENSE
  508. file that was distributed with this source code.
  509. #}
  510. {% extends 'default_frame.twig' %}
  511. {% set body_class = 'product_page' %}
  512. {% block javascript %}
  513.     <script>
  514.         eccube.productsClassCategories = {
  515.             {% for Product in pagination %}
  516.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  517.             {% endfor %}
  518.         };
  519.         \$(function() {
  520.             // 表示件数を変更
  521.             \$('.disp-number').change(function() {
  522.                 var dispNumber = \$(this).val();
  523.                 \$('#disp_number').val(dispNumber);
  524.                 \$('#pageno').val(1);
  525.                 \$(\"#form1\").submit();
  526.             });
  527.             // 並び順を変更
  528.             \$('.order-by').change(function() {
  529.                 var orderBy = \$(this).val();
  530.                 \$('#orderby').val(orderBy);
  531.                 \$('#pageno').val(1);
  532.                 \$(\"#form1\").submit();
  533.             });
  534.             \$('.add-cart').on('click', function(e) {
  535.                 var \$form = \$(this).parents('li').find('form');
  536.                 // 個数フォームのチェック
  537.                 var \$quantity = \$form.parent().find('.quantity');
  538.                 if (\$quantity.val() < 1) {
  539.                     \$quantity[0].setCustomValidity('{{ 'front.product.invalid_quantity'|trans }}');
  540.                     setTimeout(function() {
  541.                         loadingOverlay('hide');
  542.                     }, 100);
  543.                     return true;
  544.                 } else {
  545.                     \$quantity[0].setCustomValidity('');
  546.                 }
  547.                 e.preventDefault();
  548.                 \$.ajax({
  549.                     url: \$form.attr('action'),
  550.                     type: \$form.attr('method'),
  551.                     data: \$form.serialize(),
  552.                     dataType: 'json',
  553.                     beforeSend: function(xhr, settings) {
  554.                         // Buttonを無効にする
  555.                         \$('.add-cart').prop('disabled', true);
  556.                     }
  557.                 }).done(function(data) {
  558.                     // レスポンス内のメッセージをalertで表示
  559.                     \$.each(data.messages, function() {
  560.                         \$('#ec-modal-header').text(this);
  561.                     });
  562.                     \$('.ec-modal').show()
  563.                     // カートブロックを更新する
  564.                     \$.ajax({
  565.                         url: '{{ url('block_cart') }}',
  566.                         type: 'GET',
  567.                         dataType: 'html'
  568.                     }).done(function(html) {
  569.                         \$('.ec-headerRole__cart').html(html);
  570.                     });
  571.                 }).fail(function(data) {
  572.                     alert('{{ 'front.product.add_cart_error'|trans }}');
  573.                 }).always(function(data) {
  574.                     // Buttonを有効にする
  575.                     \$('.add-cart').prop('disabled', false);
  576.                 });
  577.             });
  578.         });
  579.         \$('.ec-modal-wrap').on('click', function(e) {
  580.             // モーダル内の処理は外側にバブリングさせない
  581.             e.stopPropagation();
  582.         });
  583.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  584.             \$('.ec-modal').hide()
  585.         });
  586.     </script>
  587. {% endblock %}
  588. {% block main %}
  589.     {% if search_form.category_id.vars.errors|length > 0 %}
  590.         <div class=\"ec-searchnavRole\">
  591.             <p class=\"errormsg text-danger\">{{ 'front.product.search__category_not_found'|trans }}</p>
  592.         </div>
  593.     {% else %}
  594.         <div class=\"ec-searchnavRole\">
  595.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  596.                 {% for item in search_form %}
  597.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  598.                            name=\"{{ item.vars.full_name }}\"
  599.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  600.                 {% endfor %}
  601.             </form>
  602.             {# <div class=\"ec-searchnavRole__topicpath\">
  603.                 <ol class=\"ec-topicpath\">
  604.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ 'front.product.all_category'|trans }}</a>
  605.                     </li>
  606.                     {% if Category is not null %}
  607.                         {% for Path in Category.path %}
  608.                             <li class=\"ec-topicpath__divider\">|</li>
  609.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  610.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  611.                             </li>
  612.                         {% endfor %}
  613.                     {% endif %}
  614.                     {% if search_form.vars.value and search_form.vars.value.name %}
  615.                         <li class=\"ec-topicpath__divider\">|</li>
  616.                         <li class=\"ec-topicpath__item\">{{ 'front.product.search_result__keyword'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  617.                     {% endif %}
  618.                 </ol>
  619.             </div> #}
  620.             {# <div class=\"ec-searchnavRole__infos\">
  621.                 <div class=\"ec-searchnavRole__counter\">
  622.                     {% if pagination.totalItemCount > 0 %}
  623.                         {{ 'front.product.search_result__detail'|trans({ '%count%': pagination.totalItemCount })|raw }}
  624.                     {% else %}
  625.                         <span>{{ 'front.product.search__product_not_found'|trans }}</span>
  626.                     {% endif %}
  627.                 </div>
  628.                 {% if pagination.totalItemCount > 0 %}
  629.                     <div class=\"ec-searchnavRole__actions\">
  630.                         <div class=\"ec-select\">
  631.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  632.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  633.                         </div>
  634.                     </div>
  635.                 {% endif %}
  636.             </div> #}
  637.         </div>
  638.         {% if pagination.totalItemCount > 0 %}
  639.             <div class=\"ec-shelfRole\" style=\"margin-top:100px;\">
  640.                 <ul class=\"ec-shelfGrid\">
  641.                     {# {{dump(pagination)}} #}
  642.                     {% for Product in pagination %}
  643.                         <li class=\"ec-shelfGrid__item\" style=\"width:33%;\">
  644.                             <div style=\"text-align:center;white-space: nowrap;\">
  645.                                 <p class=\"ec-shelfGrid__item-image\">
  646.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
  647.                                 </p>
  648.                                 <p><strong>{{ Product.name }}</strong></p>
  649.                                 {% if Product.description_list %}
  650.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  651.                                 {% endif %}
  652.                                 <p class=\"price02-default\">
  653.                                     {% if Product.hasProductClass %}
  654.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  655.                                             {{ Product.getPrice02IncTaxMin|price }}
  656.                                         {% else %}
  657.                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  658.                                         {% endif %}
  659.                                     {% else %}
  660.                                         {{ Product.getPrice02IncTaxMin|price }}
  661.                                     {% endif %}
  662.                                 </p>
  663.                                 <p style=\"white-space: normal;word-break: auto-phrase;font-size:14px;\">{{ Product.description_detail }}</p>
  664.                             </div>
  665.                             {% if Product.stock_find %}
  666.                                 {% set form = forms[Product.id] %}
  667.                                 <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  668.                                     <div class=\"ec-productRole__actions\">
  669.                                         {% if form.classcategory_id1 is defined %}
  670.                                             <div class=\"ec-select\">
  671.                                                 {{ form_widget(form.classcategory_id1) }}
  672.                                                 {{ form_errors(form.classcategory_id1) }}
  673.                                             </div>
  674.                                             {% if form.classcategory_id2 is defined %}
  675.                                                 <div class=\"ec-select\">
  676.                                                     {{ form_widget(form.classcategory_id2) }}
  677.                                                     {{ form_errors(form.classcategory_id2) }}
  678.                                                 </div>
  679.                                             {% endif %}
  680.                                         {% endif %}
  681.                                         <div class=\"ec-numberInput\"><span>{{ 'common.quantity'|trans }}</span>
  682.                                             {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  683.                                             {{ form_errors(form.quantity) }}
  684.                                         </div>
  685.                                     </div>
  686.                                     {{ form_rest(form) }}
  687.                                 </form>
  688.                                 <div class=\"ec-productRole__btn\">
  689.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  690.                                         {{ 'front.product.add_cart'|trans }}
  691.                                     </button>
  692.                                 </div>
  693.                             {% else %}
  694.                                 <div class=\"ec-productRole__btn\">
  695.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  696.                                         {{ 'front.product.out_of_stock'|trans }}
  697.                                     </button>
  698.                                 </div>
  699.                             {% endif %}
  700.                         </li>
  701.                     {% endfor %}
  702.                 </ul>
  703.             </div>
  704.             <div class=\"ec-modal\">
  705.                 <div class=\"ec-modal-overlay\">
  706.                     <div class=\"ec-modal-wrap\">
  707.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  708.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'front.product.add_cart_complete'|trans }}</div>
  709.                         <div class=\"ec-modal-box\">
  710.                             <div class=\"ec-role\">
  711.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'front.product.continue'|trans }}</span>
  712.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'common.go_to_cart'|trans }}</a>
  713.                             </div>
  714.                         </div>
  715.                     </div>
  716.                 </div>
  717.             </div>
  718.             <div class=\"ec-pagerRole\">
  719.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  720.             </div>
  721.         {% endif %}
  722.     {% endif %}
  723. {% endblock %}
  724. ""Product/list.twig""/home/glowd/www/glowd.co.jp/optilink/ec-cube/src/Eccube/Resource/template/default/Product/list.twig");
  725.     }
  726.     
  727.     public function checkSecurity()
  728.     {
  729.         static $tags = array("set" => 13"for" => 18"if" => 19"include" => 232);
  730.         static $filters = array("escape" => 19"raw" => 19"trans" => 47"length" => 101"no_image_product" => 158"nl2br" => 162"price" => 167);
  731.         static $functions = array("class_categories_as_json" => 19"url" => 75"asset" => 158"form_widget" => 184"form_errors" => 185"form_rest" => 199);
  732.         try {
  733.             $this->sandbox->checkSecurity(
  734.                 ['set''for''if''include'],
  735.                 ['escape''raw''trans''length''no_image_product''nl2br''price'],
  736.                 ['class_categories_as_json''url''asset''form_widget''form_errors''form_rest'],
  737.                 $this->source
  738.             );
  739.         } catch (SecurityError $e) {
  740.             $e->setSourceContext($this->source);
  741.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  742.                 $e->setTemplateLine($tags[$e->getTagName()]);
  743.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  744.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  745.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  746.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  747.             }
  748.             throw $e;
  749.         }
  750.     }
  751. }