var/cache/dev/twig/b6/b65ac5b1e46a1141c0e6b1bfa85501ec1a1add1d20f86f4e73c3b1e42aa96d71.php line 54

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_c1c2438e8182684d997e2c5a4ea70e2b89ba75f13aa11c7deee54078826b1552 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  48.         
  49.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  50.     }
  51.     // line 15
  52.     public function block_javascript($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_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.             if (location.hash == \"#tab-link\") {
  107.                 let speed = 500; // スクロール速度(ミリ秒)
  108.                 let position = \$('#test').offset().top;
  109.                 // スマホでだしわけ
  110.                 if (window.matchMedia && window.matchMedia('(max-device-width: 640px)').matches) {
  111.                     \$('html').animate({scrollTop: position }, speed, 'swing');
  112.                 } else {
  113.                     \$('html').animate({scrollTop: position-100}, speed, 'swing');
  114.                 }
  115.             }
  116.             // 表示件数を変更
  117.             \$('.disp-number').change(function() {
  118.                 var dispNumber = \$(this).val();
  119.                 \$('#disp_number').val(dispNumber);
  120.                 \$('#pageno').val(1);
  121.                 \$(\"#form1\").submit();
  122.             });
  123.             // 並び順を変更
  124.             \$('.order-by').change(function() {
  125.                 var orderBy = \$(this).val();
  126.                 \$('#orderby').val(orderBy);
  127.                 \$('#pageno').val(1);
  128.                 \$(\"#form1\").submit();
  129.             });
  130.             \$('.add-cart').on('click', function(e) {
  131.                 var \$form = \$(this).parents('li').find('form');
  132.                 // 個数フォームのチェック
  133.                 var \$quantity = \$form.parent().find('.quantity');
  134.                 if (\$quantity.val() < 1) {
  135.                     \$quantity[0].setCustomValidity('";
  136.         // line 59
  137.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  138.         echo "');
  139.                     setTimeout(function() {
  140.                         loadingOverlay('hide');
  141.                     }, 100);
  142.                     return true;
  143.                 } else {
  144.                     \$quantity[0].setCustomValidity('');
  145.                 }
  146.                 e.preventDefault();
  147.                 \$.ajax({
  148.                     url: \$form.attr('action'),
  149.                     type: \$form.attr('method'),
  150.                     data: \$form.serialize(),
  151.                     dataType: 'json',
  152.                     beforeSend: function(xhr, settings) {
  153.                         // Buttonを無効にする
  154.                         \$('.add-cart').prop('disabled', true);
  155.                     }
  156.                 }).done(function(data) {
  157.                     // レスポンス内のメッセージをalertで表示
  158.                     \$.each(data.messages, function() {
  159.                         \$('#ec-modal-header').text(this);
  160.                     });
  161.                     \$('.ec-modal').show()
  162.                     // カートブロックを更新する
  163.                     \$.ajax({
  164.                         url: '";
  165.         // line 87
  166.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  167.         echo "',
  168.                         type: 'GET',
  169.                         dataType: 'html'
  170.                     }).done(function(html) {
  171.                         \$('.ec-headerRole__cart').html(html);
  172.                     });
  173.                 }).fail(function(data) {
  174.                     alert('";
  175.         // line 94
  176.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  177.         echo "');
  178.                 }).always(function(data) {
  179.                     // Buttonを有効にする
  180.                     \$('.add-cart').prop('disabled', false);
  181.                 });
  182.             });
  183.         });
  184.         \$('.ec-modal-overlay, .ec-modal .ec-inlineBtn--cancel').on('click', function() {
  185.             \$('.ec-modal').hide()
  186.         });
  187.     </script>
  188. ";
  189.         
  190.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  191.         
  192.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  193.     }
  194.     // line 108
  195.     public function block_main($context, array $blocks = [])
  196.     {
  197.         $macros $this->macros;
  198.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  199.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  200.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  201.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  202.         // line 109
  203.         echo "    <div id=\"test\"></div>
  204.     ";
  205.         // line 110
  206.         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.'110$this->source); })()), "category_id", [], "any"falsefalsetrue110), "vars", [], "any"falsefalsetrue110), "errors", [], "any"falsefalsetrue110)) > 0)) {
  207.             // line 111
  208.             echo "        <div class=\"ec-searchnavRole\">
  209.             <p class=\"errormsg text-danger\">";
  210.             // line 112
  211.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  212.             echo "</p>
  213.         </div>
  214.     ";
  215.         } else {
  216.             // line 115
  217.             echo "        <div class=\"ec-searchnavRole\">
  218.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  219.                 ";
  220.             // line 117
  221.             $context['_parent'] = $context;
  222.             $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.'117$this->source); })()));
  223.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  224.                 // line 118
  225.                 echo "                    <input type=\"hidden\" id=\"";
  226.                 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"falsefalsetrue118), "id", [], "any"falsefalsetrue118), 118$this->source), "html"nulltrue);
  227.                 echo "\"
  228.                            name=\"";
  229.                 // line 119
  230.                 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"falsefalsetrue119), "full_name", [], "any"falsefalsetrue119), 119$this->source), "html"nulltrue);
  231.                 echo "\"
  232.                            ";
  233.                 // line 120
  234.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue120), "value", [], "any"falsefalsetrue120))) {
  235.                     echo "value=\"";
  236.                     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"falsefalsetrue120), "value", [], "any"falsefalsetrue120), 120$this->source), "html"nulltrue);
  237.                     echo "\" ";
  238.                 }
  239.                 echo "/>
  240.                 ";
  241.             }
  242.             $_parent $context['_parent'];
  243.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  244.             $context array_intersect_key($context$_parent) + $_parent;
  245.             // line 122
  246.             echo "            </form>
  247.             <div class=\"ec-searchnavRole__infos\">
  248.                 <div class=\"ec-searchnavRole__counter\">
  249.                     ";
  250.             // line 125
  251.             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.'125$this->source); })()), "totalItemCount", [], "any"falsefalsetrue125) > 0)) {
  252.                 // line 126
  253.                 echo "                        ";
  254.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"amount ec-font-bold\">%count%</span><span class=\"unit ec-font-bold\">件</span><span>の商品が見つかりました</span>", ["%count%" => twig_get_attribute($this->env$this->source, (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'126$this->source); })()), "totalItemCount", [], "any"falsefalsetrue126)]);
  255.                 echo "
  256.                     ";
  257.             } else {
  258.                 // line 128
  259.                 echo "                        <span>";
  260.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html"nulltrue);
  261.                 echo "</span>
  262.                     ";
  263.             }
  264.             // line 130
  265.             echo "                </div>
  266.                 ";
  267.             // line 131
  268.             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.'131$this->source); })()), "totalItemCount", [], "any"falsefalsetrue131) > 0)) {
  269.                 // line 132
  270.                 echo "                    <div class=\"ec-searchnavRole__actions\">
  271.                         <span>";
  272.                 // line 133
  273.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("表示件数"), "html"nulltrue);
  274.                 echo "</span>
  275.                         <div class=\"ec-select\">
  276.                             ";
  277.                 // line 135
  278.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["disp_number_form"]) || array_key_exists("disp_number_form"$context) ? $context["disp_number_form"] : (function () { throw new RuntimeError('Variable "disp_number_form" does not exist.'135$this->source); })()), 135$this->source), 'widget', ["id" => """attr" => ["class" => "disp-number"]]);
  279.                 echo "
  280. ";
  281.                 // line 137
  282.                 echo "                        </div>
  283.                     </div>
  284.                 ";
  285.             }
  286.             // line 140
  287.             echo "            </div>
  288.         </div>
  289.         ";
  290.             // line 142
  291.             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.'142$this->source); })()), "totalItemCount", [], "any"falsefalsetrue142) > 0)) {
  292.                 // line 143
  293.                 echo "
  294.             ";
  295.                 // line 144
  296.                 $this->loadTemplate("Block/relativeCategory.twig""Product/list.twig"144)->display($context);
  297.                 // line 145
  298.                 echo "
  299.             <div class=\"ec-shelfRole\">
  300.                 <ul class=\"ec-shelfGrid tab-content\">
  301.                     ";
  302.                 // line 148
  303.                 $context['_parent'] = $context;
  304.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'148$this->source); })()));
  305.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  306.                     // line 149
  307.                     echo "                            <li id=\"\" class=\"ec-shelfGrid__item tab-pane active ";
  308.                     if ( !twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsetrue149)) {
  309.                         echo "ec-shelfGrid__outOfStock ";
  310.                     }
  311.                     echo "\">
  312.                             <a href=\"";
  313.                     // line 150
  314.                     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"falsefalsetrue150)]), "html"nulltrue);
  315.                     echo "\">
  316.                                 <p class=\"ec-shelfGrid__item-image\">
  317.                                     <img src=\"";
  318.                     // line 152
  319.                     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"falsefalsetrue152), 152$this->source)), "save_image"), "html"nulltrue);
  320.                     echo "\">
  321.                                 </p>
  322.                                 <p class=\"ec-shelfGrid__item-name\">";
  323.                     // line 154
  324.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue154), 154$this->source), "html"nulltrue);
  325.                     echo "</p>
  326.                                 ";
  327.                     // line 155
  328.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue155)) {
  329.                         // line 156
  330.                         echo "                                    <p>";
  331.                         echo nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue156), 156$this->source));
  332.                         echo "</p>
  333.                                 ";
  334.                     }
  335.                     // line 158
  336.                     echo "                                <p class=\"price02-default\">
  337.                                     ";
  338.                     // line 159
  339.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsetrue159)) {
  340.                         // line 160
  341.                         echo "                                        ";
  342.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsetrue160) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsetrue160))) {
  343.                             // line 161
  344.                             echo "                                            ";
  345.                             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"falsefalsetrue161), 161$this->source)), "html"nulltrue);
  346.                             echo "円<span class=\"ec-price__tax\">";
  347.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html"nulltrue);
  348.                             echo "</span>
  349.                                         ";
  350.                         } else {
  351.                             // line 163
  352.                             echo "                                            ";
  353.                             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"falsefalsetrue163), 163$this->source)), "html"nulltrue);
  354.                             echo " ~ ";
  355.                             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"falsefalsetrue163), 163$this->source)), "html"nulltrue);
  356.                             echo "円<span class=\"ec-price__tax\">";
  357.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html"nulltrue);
  358.                             echo "</span>
  359.                                         ";
  360.                         }
  361.                         // line 165
  362.                         echo "                                    ";
  363.                     } else {
  364.                         // line 166
  365.                         echo "                                        ";
  366.                         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"falsefalsetrue166), 166$this->source)), "html"nulltrue);
  367.                         echo "円<span class=\"ec-price__tax\">";
  368.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html"nulltrue);
  369.                         echo "</span>
  370.                                     ";
  371.                     }
  372.                     // line 168
  373.                     echo "                                </p>
  374.                                 ";
  375.                     // line 169
  376.                     if ( !twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsetrue169)) {
  377.                         // line 170
  378.                         echo "                                    <p class=\"ec-shelfGrid__outOfStockText\"> ";
  379.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("品切れ中です"), "html"nulltrue);
  380.                         echo "</p>
  381.                                 ";
  382.                     }
  383.                     // line 172
  384.                     echo "
  385.                                 ";
  386.                     // line 174
  387.                     echo "                                <ul class=\"ec-productRole__tags\">
  388.                                     ";
  389.                     // line 175
  390.                     $context['_parent'] = $context;
  391.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "Tags", [], "any"falsefalsetrue175));
  392.                     foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  393.                         // line 176
  394.                         echo "                                        <li class=\"ec-productRole__tag tag_";
  395.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsetrue176), 176$this->source), "html"nulltrue);
  396.                         echo "\">";
  397.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed($context["Tag"], 176$this->source), "html"nulltrue);
  398.                         echo "</li>
  399.                                     ";
  400.                     }
  401.                     $_parent $context['_parent'];
  402.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  403.                     $context array_intersect_key($context$_parent) + $_parent;
  404.                     // line 178
  405.                     echo "                                </ul>
  406.                             </a>
  407. ";
  408.                     // line 220
  409.                     echo "                        </li>
  410.                     ";
  411.                 }
  412.                 $_parent $context['_parent'];
  413.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  414.                 $context array_intersect_key($context$_parent) + $_parent;
  415.                 // line 222
  416.                 echo "                </ul>
  417.             </div>
  418. ";
  419.                 // line 240
  420.                 echo "            <div class=\"ec-pagerRole\">
  421.                 ";
  422.                 // line 241
  423.                 $this->loadTemplate("pager.twig""Product/list.twig"241)->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.'241$this->source); })()), "paginationData", [], "any"falsefalsetrue241)]));
  424.                 // line 242
  425.                 echo "            </div>
  426.         ";
  427.             }
  428.             // line 244
  429.             echo "    ";
  430.         }
  431.         // line 245
  432.         echo "    
  433.     ";
  434.         // line 246
  435.         $this->loadTemplate("Block/guide.twig""Product/list.twig"246)->display($context);
  436.         // line 247
  437.         echo "    
  438. ";
  439.         
  440.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  441.         
  442.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  443.     }
  444.     public function getTemplateName()
  445.     {
  446.         return "Product/list.twig";
  447.     }
  448.     public function isTraitable()
  449.     {
  450.         return false;
  451.     }
  452.     public function getDebugInfo()
  453.     {
  454.         return array (  466 => 247,  464 => 246,  461 => 245,  458 => 244,  454 => 242,  452 => 241,  449 => 240,  445 => 222,  438 => 220,  433 => 178,  422 => 176,  418 => 175,  415 => 174,  412 => 172,  406 => 170,  404 => 169,  401 => 168,  393 => 166,  390 => 165,  380 => 163,  372 => 161,  369 => 160,  367 => 159,  364 => 158,  358 => 156,  356 => 155,  352 => 154,  347 => 152,  342 => 150,  335 => 149,  331 => 148,  326 => 145,  324 => 144,  321 => 143,  319 => 142,  315 => 140,  310 => 137,  306 => 135,  301 => 133,  298 => 132,  296 => 131,  293 => 130,  287 => 128,  281 => 126,  279 => 125,  274 => 122,  262 => 120,  258 => 119,  253 => 118,  249 => 117,  245 => 115,  239 => 112,  236 => 111,  234 => 110,  231 => 109,  221 => 108,  198 => 94,  188 => 87,  157 => 59,  117 => 21,  103 => 20,  95 => 19,  78 => 18,  74 => 16,  64 => 15,  53 => 11,  51 => 13,  38 => 11,);
  455.     }
  456.     public function getSourceContext()
  457.     {
  458.         return new Source("{#
  459. This file is part of EC-CUBE
  460. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  461. http://www.ec-cube.co.jp/
  462. For the full copyright and license information, please view the LICENSE
  463. file that was distributed with this source code.
  464. #}
  465. {% extends 'default_frame.twig' %}
  466. {% set body_class = 'product_page' %}
  467. {% block javascript %}
  468.     <script>
  469.         eccube.productsClassCategories = {
  470.             {% for Product in pagination %}
  471.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  472.             {% endfor %}
  473.         };
  474.         \$(function() {
  475.             // タブへスクロール
  476.             if (location.hash == \"#tab-link\") {
  477.                 let speed = 500; // スクロール速度(ミリ秒)
  478.                 let position = \$('#test').offset().top;
  479.                 // スマホでだしわけ
  480.                 if (window.matchMedia && window.matchMedia('(max-device-width: 640px)').matches) {
  481.                     \$('html').animate({scrollTop: position }, speed, 'swing');
  482.                 } else {
  483.                     \$('html').animate({scrollTop: position-100}, speed, 'swing');
  484.                 }
  485.             }
  486.             // 表示件数を変更
  487.             \$('.disp-number').change(function() {
  488.                 var dispNumber = \$(this).val();
  489.                 \$('#disp_number').val(dispNumber);
  490.                 \$('#pageno').val(1);
  491.                 \$(\"#form1\").submit();
  492.             });
  493.             // 並び順を変更
  494.             \$('.order-by').change(function() {
  495.                 var orderBy = \$(this).val();
  496.                 \$('#orderby').val(orderBy);
  497.                 \$('#pageno').val(1);
  498.                 \$(\"#form1\").submit();
  499.             });
  500.             \$('.add-cart').on('click', function(e) {
  501.                 var \$form = \$(this).parents('li').find('form');
  502.                 // 個数フォームのチェック
  503.                 var \$quantity = \$form.parent().find('.quantity');
  504.                 if (\$quantity.val() < 1) {
  505.                     \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  506.                     setTimeout(function() {
  507.                         loadingOverlay('hide');
  508.                     }, 100);
  509.                     return true;
  510.                 } else {
  511.                     \$quantity[0].setCustomValidity('');
  512.                 }
  513.                 e.preventDefault();
  514.                 \$.ajax({
  515.                     url: \$form.attr('action'),
  516.                     type: \$form.attr('method'),
  517.                     data: \$form.serialize(),
  518.                     dataType: 'json',
  519.                     beforeSend: function(xhr, settings) {
  520.                         // Buttonを無効にする
  521.                         \$('.add-cart').prop('disabled', true);
  522.                     }
  523.                 }).done(function(data) {
  524.                     // レスポンス内のメッセージをalertで表示
  525.                     \$.each(data.messages, function() {
  526.                         \$('#ec-modal-header').text(this);
  527.                     });
  528.                     \$('.ec-modal').show()
  529.                     // カートブロックを更新する
  530.                     \$.ajax({
  531.                         url: '{{ url('block_cart') }}',
  532.                         type: 'GET',
  533.                         dataType: 'html'
  534.                     }).done(function(html) {
  535.                         \$('.ec-headerRole__cart').html(html);
  536.                     });
  537.                 }).fail(function(data) {
  538.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  539.                 }).always(function(data) {
  540.                     // Buttonを有効にする
  541.                     \$('.add-cart').prop('disabled', false);
  542.                 });
  543.             });
  544.         });
  545.         \$('.ec-modal-overlay, .ec-modal .ec-inlineBtn--cancel').on('click', function() {
  546.             \$('.ec-modal').hide()
  547.         });
  548.     </script>
  549. {% endblock %}
  550. {% block main %}
  551.     <div id=\"test\"></div>
  552.     {% if search_form.category_id.vars.errors|length > 0 %}
  553.         <div class=\"ec-searchnavRole\">
  554.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  555.         </div>
  556.     {% else %}
  557.         <div class=\"ec-searchnavRole\">
  558.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  559.                 {% for item in search_form %}
  560.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  561.                            name=\"{{ item.vars.full_name }}\"
  562.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  563.                 {% endfor %}
  564.             </form>
  565.             <div class=\"ec-searchnavRole__infos\">
  566.                 <div class=\"ec-searchnavRole__counter\">
  567.                     {% if pagination.totalItemCount > 0 %}
  568.                         {{ '<span class=\"amount ec-font-bold\">%count%</span><span class=\"unit ec-font-bold\">件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  569.                     {% else %}
  570.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  571.                     {% endif %}
  572.                 </div>
  573.                 {% if pagination.totalItemCount > 0 %}
  574.                     <div class=\"ec-searchnavRole__actions\">
  575.                         <span>{{ '表示件数'|trans }}</span>
  576.                         <div class=\"ec-select\">
  577.                             {{ form_widget(disp_number_form, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  578. {#                             {{ form_widget(order_by_form, {'id': '', 'attr': {'class': 'order-by'}}) }} #}
  579.                         </div>
  580.                     </div>
  581.                 {% endif %}
  582.             </div>
  583.         </div>
  584.         {% if pagination.totalItemCount > 0 %}
  585.             {% include 'Block/relativeCategory.twig' %}
  586.             <div class=\"ec-shelfRole\">
  587.                 <ul class=\"ec-shelfGrid tab-content\">
  588.                     {% for Product in pagination %}
  589.                             <li id=\"\" class=\"ec-shelfGrid__item tab-pane active {% if not Product.stock_find %}ec-shelfGrid__outOfStock {% endif %}\">
  590.                             <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  591.                                 <p class=\"ec-shelfGrid__item-image\">
  592.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\">
  593.                                 </p>
  594.                                 <p class=\"ec-shelfGrid__item-name\">{{ Product.name }}</p>
  595.                                 {% if Product.description_list %}
  596.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  597.                                 {% endif %}
  598.                                 <p class=\"price02-default\">
  599.                                     {% if Product.hasProductClass %}
  600.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  601.                                             {{ Product.getPrice02IncTaxMin|number_format }}円<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
  602.                                         {% else %}
  603.                                             {{ Product.getPrice02IncTaxMin|number_format }} ~ {{ Product.getPrice02IncTaxMax|number_format }}円<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
  604.                                         {% endif %}
  605.                                     {% else %}
  606.                                         {{ Product.getPrice02IncTaxMin|number_format }}円<span class=\"ec-price__tax\">{{ '(税込)'|trans }}</span>
  607.                                     {% endif %}
  608.                                 </p>
  609.                                 {% if not Product.stock_find %}
  610.                                     <p class=\"ec-shelfGrid__outOfStockText\"> {{ '品切れ中です'|trans }}</p>
  611.                                 {% endif %}
  612.                                 {# タグ #}
  613.                                 <ul class=\"ec-productRole__tags\">
  614.                                     {% for Tag in Product.Tags %}
  615.                                         <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  616.                                     {% endfor %}
  617.                                 </ul>
  618.                             </a>
  619. {#
  620.                                 <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  621.                                     <div class=\"ec-productRole__actions\">
  622.                                         {% if form.classcategory_id1 is defined %}
  623.                                             <div class=\"ec-select\">
  624.                                                 {{ form_widget(form.classcategory_id1) }}
  625.                                                 {{ form_errors(form.classcategory_id1) }}
  626.                                             </div>
  627.                                             {% if form.classcategory_id2 is defined %}
  628.                                                 <div class=\"ec-select\">
  629.                                                     {{ form_widget(form.classcategory_id2) }}
  630.                                                     {{ form_errors(form.classcategory_id2) }}
  631.                                                 </div>
  632.                                             {% endif %}
  633.                                         {% endif %}
  634.                                         <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  635.                                             {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  636.                                             {{ form_errors(form.quantity) }}
  637.                                         </div>
  638.                                     </div>
  639.                                     {{ form_rest(form) }}
  640.                                 </form>
  641. #}
  642. {#
  643.                                 <div class=\"ec-productRole__btn\">
  644.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  645.                                         {{ 'カートに入れる'|trans }}
  646.                                     </button>
  647.                                 </div>
  648. #}
  649. {#                            {% else %}#}
  650. {#
  651.                                 <div class=\"ec-productRole__btn\">
  652.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  653.                                         {{ 'ただいま品切れ中です。'|trans }}
  654.                                     </button>
  655.                                 </div>
  656. #}
  657. {#                            {% endif %}#}
  658.                         </li>
  659.                     {% endfor %}
  660.                 </ul>
  661.             </div>
  662. {#
  663.             <div class=\"ec-modal\">
  664.                 <div class=\"ec-modal-overlay\">
  665.                     <div class=\"ec-modal-wrap\">
  666.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  667.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  668.                         <div class=\"ec-modal-box\">
  669.                             <div class=\"ec-role\">
  670.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  671.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  672.                             </div>
  673.                         </div>
  674.                     </div>
  675.                 </div>
  676.             </div>
  677. #}
  678.             <div class=\"ec-pagerRole\">
  679.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  680.             </div>
  681.         {% endif %}
  682.     {% endif %}
  683.     
  684.     {% include 'Block/guide.twig' %}
  685.     
  686. {% endblock %}""Product/list.twig""/home/nakatomishop/www/NfNudtBdkd/app/template/default/Product/list.twig");
  687.     }
  688.     
  689.     public function checkSecurity()
  690.     {
  691.         static $tags = array("set" => 13"for" => 18"if" => 19"include" => 144);
  692.         static $filters = array("escape" => 19"raw" => 19"trans" => 59"length" => 110"no_image_product" => 152"nl2br" => 156"number_format" => 161);
  693.         static $functions = array("class_categories_as_json" => 19"url" => 87"form_widget" => 135"asset" => 152);
  694.         try {
  695.             $this->sandbox->checkSecurity(
  696.                 ['set''for''if''include'],
  697.                 ['escape''raw''trans''length''no_image_product''nl2br''number_format'],
  698.                 ['class_categories_as_json''url''form_widget''asset']
  699.             );
  700.         } catch (SecurityError $e) {
  701.             $e->setSourceContext($this->source);
  702.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  703.                 $e->setTemplateLine($tags[$e->getTagName()]);
  704.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  705.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  706.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  707.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  708.             }
  709.             throw $e;
  710.         }
  711.     }
  712. }