var/cache/dev/twig/d3/d3cffcd9a1c52bfdc339ca5ba2af4797.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. /* __string_template__aaf76cf11e3a0acf9c0b3c7a146975d6 */
  14. class __TwigTemplate_e04a1132e2056a74e8d3e18fec4fcf49 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""__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6"));
  41.         // line 13
  42.         $context["body_class"] = "product_page product_list";
  43.         // line 11
  44.         $this->parent $this->loadTemplate("default_frame.twig""__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6"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.         echo "<script>
  60.     \$(function () {
  61.         \$('select[name=classcategory_id1]')
  62.             .change(function () {
  63.                 var \$li = \$(this).closest('.ec-shelfGrid__item');
  64.                 \$li.find('.ec-shelfGrid__item-image').hide();
  65.                 \$li.find('.ec-shelfGrid__item-image-class').hide();
  66.                 var \$form = \$(this).parents('form');
  67.                 var product_id = \$form.find('input[name=\"product_id\"]').val();
  68.                 var \$sele1 = \$(this);
  69.                 var \$sele2 = \$form.find('select[name=classcategory_id2]');
  70.                 if (!\$sele2 || \$sele2.length <= 0) {
  71.                     var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\";
  72.                     if (\$(\"p#\" + id).length > 0) {
  73.                         \$(\"p#\" + id).show();
  74.                     } else {
  75.                         \$li.find('.ec-shelfGrid__item-image').show();
  76.                     }
  77.                 } else {
  78.                     ";
  79.         // line 35
  80.         if ((twig_get_attribute($this->env$this->source, (isset($context["apgProductClassConfig"]) || array_key_exists("apgProductClassConfig"$context) ? $context["apgProductClassConfig"] : (function () { throw new RuntimeError('Variable "apgProductClassConfig" does not exist.'35$this->source); })()), "getImageType", [], "method"falsefalsetrue35) == twig_constant("Plugin\\ApgProductClassImage42\\Domain\\ClassImageType::CLASS_IMAGE1_ONLY"))) {
  81.             // line 36
  82.             echo "                    class1 = \$sele1.val();
  83.                     if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
  84.                         var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
  85.                         var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
  86.                         if (\$(\"p#\" + id).length > 0) {
  87.                             \$(\"p#\" + id).show();
  88.                         } else {
  89.                             \$li.find('.ec-shelfGrid__item-image').show();
  90.                         }
  91.                     } else {
  92.                         \$li.find('.ec-shelfGrid__item-image').show();
  93.                     }
  94.                     ";
  95.         } else {
  96.             // line 49
  97.             echo "                    \$li.find('.ec-shelfGrid__item-image').show();
  98.                     ";
  99.         }
  100.         // line 51
  101.         echo "                }
  102.             });
  103.         \$('select[name=classcategory_id2]')
  104.             .change(function () {
  105.                 var \$li = \$(this).closest('.ec-shelfGrid__item');
  106.                 \$li.find('.ec-shelfGrid__item-image').hide();
  107.                 \$li.find('.ec-shelfGrid__item-image-class').hide();
  108.                 var \$form = \$(this).parents('form');
  109.                 var product_id = \$form.find('input[name=\"product_id\"]').val();
  110.                 var \$sele1 = \$form.find('select[name=classcategory_id1]');
  111.                 var \$sele2 = \$(this);
  112.                 var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + \$sele2.val();
  113.                 if (\$(\"p#\" + id).length > 0) {
  114.                     \$(\"p#\" + id).show();
  115.                 } else {
  116.                     ";
  117.         // line 67
  118.         if ((twig_get_attribute($this->env$this->source, (isset($context["apgProductClassConfig"]) || array_key_exists("apgProductClassConfig"$context) ? $context["apgProductClassConfig"] : (function () { throw new RuntimeError('Variable "apgProductClassConfig" does not exist.'67$this->source); })()), "getImageType", [], "method"falsefalsetrue67) == twig_constant("Plugin\\ApgProductClassImage42\\Domain\\ClassImageType::CLASS_IMAGE1_ONLY"))) {
  119.             // line 68
  120.             echo "                    class1 = \$sele1.val();
  121.                     if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
  122.                         var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
  123.                         var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
  124.                         if (\$(\"p#\" + id).length > 0) {
  125.                             \$(\"p#\" + id).show();
  126.                         } else {
  127.                             \$li.find('.ec-shelfGrid__item-image').show();
  128.                         }
  129.                     } else {
  130.                         \$li.find('.ec-shelfGrid__item-image').show();
  131.                     }
  132.                     ";
  133.         } else {
  134.             // line 81
  135.             echo "                    \$li.find('.ec-shelfGrid__item-image').show();
  136.                     ";
  137.         }
  138.         // line 83
  139.         echo "                }
  140.             });
  141.     });
  142. </script>
  143.     <script>
  144.         eccube.productsClassCategories = {
  145.             ";
  146.         // line 90
  147.         $context['_parent'] = $context;
  148.         $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'90$this->source); })()));
  149.         $context['loop'] = [
  150.           'parent' => $context['_parent'],
  151.           'index0' => 0,
  152.           'index'  => 1,
  153.           'first'  => true,
  154.         ];
  155.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  156.             $length count($context['_seq']);
  157.             $context['loop']['revindex0'] = $length 1;
  158.             $context['loop']['revindex'] = $length;
  159.             $context['loop']['length'] = $length;
  160.             $context['loop']['last'] = === $length;
  161.         }
  162.         foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  163.             // line 91
  164.             echo "            \"";
  165.             echo twig_escape_filter($this->envtwig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue91), 91$this->source), "js"), "html"nulltrue);
  166.             echo "\": ";
  167.             echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed($context["Product"], 91$this->source));
  168.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue91) == false)) {
  169.                 echo ", ";
  170.             }
  171.             // line 92
  172.             echo "            ";
  173.             ++$context['loop']['index0'];
  174.             ++$context['loop']['index'];
  175.             $context['loop']['first'] = false;
  176.             if (isset($context['loop']['length'])) {
  177.                 --$context['loop']['revindex0'];
  178.                 --$context['loop']['revindex'];
  179.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  180.             }
  181.         }
  182.         $_parent $context['_parent'];
  183.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  184.         $context array_intersect_key($context$_parent) + $_parent;
  185.         // line 93
  186.         echo "        };
  187.         \$(function() {
  188.             // 表示件数を変更
  189.             \$('.disp-number').change(function() {
  190.                 var dispNumber = \$(this).val();
  191.                 \$('#disp_number').val(dispNumber);
  192.                 \$('#pageno').val(1);
  193.                 \$(\"#form1\").submit();
  194.             });
  195.             // 並び順を変更
  196.             \$('.order-by').change(function() {
  197.                 var orderBy = \$(this).val();
  198.                 \$('#orderby').val(orderBy);
  199.                 \$('#pageno').val(1);
  200.                 \$(\"#form1\").submit();
  201.             });
  202.             \$('.add-cart').on('click', function(e) {
  203.                 var \$form = \$(this).parents('li').find('form');
  204.                 // 個数フォームのチェック
  205.                 var \$quantity = \$form.parent().find('.quantity');
  206.                 if (\$quantity.val() < 1) {
  207.                     \$quantity[0].setCustomValidity('";
  208.         // line 119
  209.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  210.         echo "');
  211.                     setTimeout(function() {
  212.                         loadingOverlay('hide');
  213.                     }, 100);
  214.                     return true;
  215.                 } else {
  216.                     \$quantity[0].setCustomValidity('');
  217.                 }
  218.                 e.preventDefault();
  219.                 \$.ajax({
  220.                     url: \$form.attr('action'),
  221.                     type: \$form.attr('method'),
  222.                     data: \$form.serialize(),
  223.                     dataType: 'json',
  224.                     beforeSend: function(xhr, settings) {
  225.                         // Buttonを無効にする
  226.                         \$('.add-cart').prop('disabled', true);
  227.                     }
  228.                 }).done(function(data) {
  229.                     // レスポンス内のメッセージをalertで表示
  230.                     \$.each(data.messages, function() {
  231.                         \$('#ec-modal-header').html(this);
  232.                     });
  233.                     \$('.ec-modal').show()
  234.                     // カートブロックを更新する
  235.                     \$.ajax({
  236.                         url: '";
  237.         // line 147
  238.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  239.         echo "',
  240.                         type: 'GET',
  241.                         dataType: 'html'
  242.                     }).done(function(html) {
  243.                         \$('.ec-headerRole__cart').html(html);
  244.                     });
  245.                 }).fail(function(data) {
  246.                     alert('";
  247.         // line 154
  248.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  249.         echo "');
  250.                 }).always(function(data) {
  251.                     // Buttonを有効にする
  252.                     \$('.add-cart').prop('disabled', false);
  253.                 });
  254.             });
  255.         });
  256.         \$('.ec-modal-wrap').on('click', function(e) {
  257.             // モーダル内の処理は外側にバブリングさせない
  258.             e.stopPropagation();
  259.         });
  260.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  261.             \$('.ec-modal').hide()
  262.         });
  263.     </script>
  264. ";
  265.         
  266.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  267.         
  268.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  269.     }
  270.     // line 172
  271.     public function block_main($context, array $blocks = [])
  272.     {
  273.         $macros $this->macros;
  274.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  275.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  276.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  277.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  278.         // line 173
  279.         echo "    ";
  280.         // line 174
  281.         echo "    ";
  282.         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["search_form"] ?? null), "vars", [], "any"falsetruetrue174), "value", [], "any"falsetruetrue174), "category_id", [], "any"falsetruetrue174), "id", [], "any"truetruetrue174)) {
  283.             // line 175
  284.             echo "    ";
  285.             echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$context, (("Block/category" $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_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.'175$this->source); })()), "vars", [], "any"falsefalsetrue175), "value", [], "any"falsefalsetrue175), "category_id", [], "any"falsefalsetrue175), "id", [], "any"falsefalsetrue175), 175$this->source)) . ".twig"), array(), truetrue);
  286.             echo "
  287.     ";
  288.         }
  289.         // line 177
  290.         echo "    ";
  291.         // line 178
  292.         echo "    ";
  293.         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.'178$this->source); })()), "category_id", [], "any"falsefalsetrue178), "vars", [], "any"falsefalsetrue178), "errors", [], "any"falsefalsetrue178)) > 0)) {
  294.             // line 179
  295.             echo "        <div class=\"ec-searchnavRole\">
  296.             <p class=\"errormsg text-danger\">";
  297.             // line 180
  298.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  299.             echo "</p>
  300.         </div>
  301.     ";
  302.         } else {
  303.             // line 183
  304.             echo "        <div class=\"ec-searchnavRole\">
  305.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  306.                 ";
  307.             // line 185
  308.             $context['_parent'] = $context;
  309.             $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.'185$this->source); })()));
  310.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  311.                 // line 186
  312.                 echo "                    <input type=\"hidden\" id=\"";
  313.                 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"falsefalsetrue186), "id", [], "any"falsefalsetrue186), 186$this->source), "html"nulltrue);
  314.                 echo "\"
  315.                            name=\"";
  316.                 // line 187
  317.                 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"falsefalsetrue187), "full_name", [], "any"falsefalsetrue187), 187$this->source), "html"nulltrue);
  318.                 echo "\"
  319.                            ";
  320.                 // line 188
  321.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsetrue188), "value", [], "any"falsefalsetrue188))) {
  322.                     echo "value=\"";
  323.                     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"falsefalsetrue188), "value", [], "any"falsefalsetrue188), 188$this->source), "html"nulltrue);
  324.                     echo "\" ";
  325.                 }
  326.                 echo "/>
  327.                 ";
  328.             }
  329.             $_parent $context['_parent'];
  330.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  331.             $context array_intersect_key($context$_parent) + $_parent;
  332.             // line 190
  333.             echo "            </form>
  334.             <div class=\"ec-searchnavRole__topicpath\">
  335.                 <ol class=\"ec-topicpath\">
  336.                     <li class=\"ec-topicpath__item\"><a href=\"";
  337.             // line 193
  338.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  339.             echo "\">";
  340.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html"nulltrue);
  341.             echo "</a>
  342.                     </li>
  343.                     ";
  344.             // line 195
  345.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'195$this->source); })()))) {
  346.                 // line 196
  347.                 echo "                        ";
  348.                 $context['_parent'] = $context;
  349.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'196$this->source); })()), "path", [], "any"falsefalsetrue196));
  350.                 $context['loop'] = [
  351.                   'parent' => $context['_parent'],
  352.                   'index0' => 0,
  353.                   'index'  => 1,
  354.                   'first'  => true,
  355.                 ];
  356.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  357.                     $length count($context['_seq']);
  358.                     $context['loop']['revindex0'] = $length 1;
  359.                     $context['loop']['revindex'] = $length;
  360.                     $context['loop']['length'] = $length;
  361.                     $context['loop']['last'] = === $length;
  362.                 }
  363.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  364.                     // line 197
  365.                     echo "                            <li class=\"ec-topicpath__divider\">|</li>
  366.                             <li class=\"ec-topicpath__item";
  367.                     // line 198
  368.                     if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue198)) {
  369.                         echo "--active";
  370.                     }
  371.                     echo "\"><a
  372.                                         href=\"";
  373.                     // line 199
  374.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  375.                     echo "?category_id=";
  376.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "id", [], "any"falsefalsetrue199), 199$this->source), "html"nulltrue);
  377.                     echo "\">";
  378.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsetrue199), 199$this->source), "html"nulltrue);
  379.                     echo "</a>
  380.                             </li>
  381.                         ";
  382.                     ++$context['loop']['index0'];
  383.                     ++$context['loop']['index'];
  384.                     $context['loop']['first'] = false;
  385.                     if (isset($context['loop']['length'])) {
  386.                         --$context['loop']['revindex0'];
  387.                         --$context['loop']['revindex'];
  388.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  389.                     }
  390.                 }
  391.                 $_parent $context['_parent'];
  392.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  393.                 $context array_intersect_key($context$_parent) + $_parent;
  394.                 // line 202
  395.                 echo "                    ";
  396.             }
  397.             // line 203
  398.             echo "                    ";
  399.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'203$this->source); })()), "vars", [], "any"falsefalsetrue203), "value", [], "any"falsefalsetrue203) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'203$this->source); })()), "vars", [], "any"falsefalsetrue203), "value", [], "any"falsefalsetrue203), "name", [], "any"falsefalsetrue203))) {
  400.                 // line 204
  401.                 echo "                        <li class=\"ec-topicpath__divider\">|</li>
  402.                         <li class=\"ec-topicpath__item\">";
  403.                 // line 205
  404.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("「%name%」の検索結果", ["%name%" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'205$this->source); })()), "vars", [], "any"falsefalsetrue205), "value", [], "any"falsefalsetrue205), "name", [], "any"falsefalsetrue205)]), "html"nulltrue);
  405.                 echo "</li>
  406.                     ";
  407.             }
  408.             // line 207
  409.             echo "                </ol>
  410.             </div>
  411.             <div class=\"ec-searchnavRole__infos\">
  412.                 <div class=\"ec-searchnavRole__counter\">
  413.                     ";
  414.             // line 211
  415.             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.'211$this->source); })()), "totalItemCount", [], "any"falsefalsetrue211) > 0)) {
  416.                 // line 212
  417.                 echo "                        ";
  418.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>", ["%count%" => twig_get_attribute($this->env$this->source, (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'212$this->source); })()), "totalItemCount", [], "any"falsefalsetrue212)]);
  419.                 echo "
  420.                     ";
  421.             } else {
  422.                 // line 214
  423.                 echo "                        <span>";
  424.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html"nulltrue);
  425.                 echo "</span>
  426.                     ";
  427.             }
  428.             // line 216
  429.             echo "                </div>
  430.                 ";
  431.             // line 217
  432.             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.'217$this->source); })()), "totalItemCount", [], "any"falsefalsetrue217) > 0)) {
  433.                 // line 218
  434.                 echo "                    <div class=\"ec-searchnavRole__actions\">
  435.                         <div class=\"ec-select\">
  436.                             ";
  437.                 // line 220
  438.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'220$this->source); })()), "disp_number", [], "any"falsefalsetrue220), 220$this->source), 'widget', ["id" => """attr" => ["class" => "disp-number"]]);
  439.                 echo "
  440.                             ";
  441.                 // line 221
  442.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'221$this->source); })()), "orderby", [], "any"falsefalsetrue221), 221$this->source), 'widget', ["id" => """attr" => ["class" => "order-by"]]);
  443.                 echo "
  444.                         </div>
  445.                     </div>
  446.                 ";
  447.             }
  448.             // line 225
  449.             echo "            </div>
  450.         </div>
  451.         ";
  452.             // line 227
  453.             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.'227$this->source); })()), "totalItemCount", [], "any"falsefalsetrue227) > 0)) {
  454.                 // line 228
  455.                 echo "            <div class=\"ec-shelfRole\">
  456.                 <ul class=\"ec-shelfGrid\">
  457.                     ";
  458.                 // line 230
  459.                 $context['_parent'] = $context;
  460.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'230$this->source); })()));
  461.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  462.                     // line 231
  463.                     echo "                        <li class=\"ec-shelfGrid__item\">
  464.                             <a href=\"";
  465.                     // line 232
  466.                     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"falsefalsetrue232)]), "html"nulltrue);
  467.                     echo "\">
  468.                                 <p class=\"ec-shelfGrid__item-image\">
  469.                                     <img src=\"";
  470.                     // line 234
  471.                     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"falsefalsetrue234), 234$this->source)), "save_image"), "html"nulltrue);
  472.                     echo "\" alt=\"";
  473.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue234), 234$this->source), "html"nulltrue);
  474.                     echo "\" loading=\"lazy\">
  475.                                 </p>";
  476.                     // line 235
  477.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsetrue235)) {
  478.                         // line 236
  479.                         $context["imageCount"] = (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["Product"], "ProductImage", [], "any"falsefalsetrue236), "count", [], "any"falsefalsetrue236) - 1);
  480.                         // line 237
  481.                         echo "    ";
  482.                         $context['_parent'] = $context;
  483.                         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "getProductClasses", [], "method"falsefalsetrue237));
  484.                         foreach ($context['_seq'] as $context["_key"] => $context["ProductClass"]) {
  485.                             // line 238
  486.                             echo "        ";
  487.                             if (twig_get_attribute($this->env$this->source$context["ProductClass"], "file_name", [], "any"falsefalsetrue238)) {
  488.                                 // line 239
  489.                                 echo "            ";
  490.                                 $context["imageCount"] = ((isset($context["imageCount"]) || array_key_exists("imageCount"$context) ? $context["imageCount"] : (function () { throw new RuntimeError('Variable "imageCount" does not exist.'239$this->source); })()) + 1);
  491.                                 // line 240
  492.                                 echo "            ";
  493.                                 if ((twig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory1", [], "any"falsefalsetrue240) && twig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory2", [], "any"falsefalsetrue240))) {
  494.                                     // line 241
  495.                                     echo "                <p class=\"ec-shelfGrid__item-image-class\"
  496.                    id=\"apg_product_class_image-";
  497.                                     // line 242
  498.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue242), 242$this->source), "html"nulltrue);
  499.                                     echo "-";
  500.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory1", [], "any"falsefalsetrue242), "id", [], "any"falsefalsetrue242), 242$this->source), "html"nulltrue);
  501.                                     echo "-";
  502.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory2", [], "any"falsefalsetrue242), "id", [], "any"falsefalsetrue242), 242$this->source), "html"nulltrue);
  503.                                     echo "\"
  504.                    data-class_category1=\"";
  505.                                     // line 243
  506.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory1", [], "any"falsefalsetrue243), "id", [], "any"falsefalsetrue243), 243$this->source), "html"nulltrue);
  507.                                     echo "\"
  508.                    data-class_category2=\"";
  509.                                     // line 244
  510.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory2", [], "any"falsefalsetrue244), "id", [], "any"falsefalsetrue244), 244$this->source), "html"nulltrue);
  511.                                     echo "\"
  512.                    style=\"display: none;\">
  513.                     <img src=\"";
  514.                                     // line 246
  515.                                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["ProductClass"], "getImageUrl", [], "method"falsefalsetrue246), 246$this->source), "save_image"), "html"nulltrue);
  516.                                     echo "\">
  517.                 </p>
  518.             ";
  519.                                 } elseif (twig_get_attribute($this->env$this->source,                                 // line 248
  520. $context["ProductClass"], "ClassCategory1", [], "any"falsefalsetrue248)) {
  521.                                     // line 249
  522.                                     echo "                <p class=\"ec-shelfGrid__item-image-class\"
  523.                    id=\"apg_product_class_image-";
  524.                                     // line 250
  525.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsetrue250), 250$this->source), "html"nulltrue);
  526.                                     echo "-";
  527.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory1", [], "any"falsefalsetrue250), "id", [], "any"falsefalsetrue250), 250$this->source), "html"nulltrue);
  528.                                     echo "-\"
  529.                    data-class_category1=\"";
  530.                                     // line 251
  531.                                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductClass"], "ClassCategory1", [], "any"falsefalsetrue251), "id", [], "any"falsefalsetrue251), 251$this->source), "html"nulltrue);
  532.                                     echo "\"
  533.                    style=\"display: none;\">
  534.                     <img src=\"";
  535.                                     // line 253
  536.                                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["ProductClass"], "getImageUrl", [], "method"falsefalsetrue253), 253$this->source), "save_image"), "html"nulltrue);
  537.                                     echo "\">
  538.                 </p>
  539.             ";
  540.                                 }
  541.                                 // line 256
  542.                                 echo "        ";
  543.                             }
  544.                             // line 257
  545.                             echo "    ";
  546.                         }
  547.                         $_parent $context['_parent'];
  548.                         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductClass'], $context['_parent'], $context['loop']);
  549.                         $context array_intersect_key($context$_parent) + $_parent;
  550.                     }
  551.                     // line 259
  552.                     echo "
  553.                                 <ul class=\"ec-shelfRole__tags\">
  554.                                     ";
  555.                     // line 261
  556.                     $context['_parent'] = $context;
  557.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "ProductTag", [], "any"falsefalsetrue261));
  558.                     foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  559.                         // line 262
  560.                         echo "                                        ";
  561.                         if ($context["Tag"]) {
  562.                             // line 263
  563.                             echo "                                            <li class=\"ec-shelfRole__tag\">";
  564.                             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Tag"], "Tag", [], "any"falsefalsetrue263), 263$this->source), "html"nulltrue);
  565.                             echo "</li>
  566.                                         ";
  567.                         }
  568.                         // line 265
  569.                         echo "                                    ";
  570.                     }
  571.                     $_parent $context['_parent'];
  572.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  573.                     $context array_intersect_key($context$_parent) + $_parent;
  574.                     // line 266
  575.                     echo "                                </ul>
  576.                                 <p class=\"ec-shelfGrid__item-name\">";
  577.                     // line 267
  578.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue267), 267$this->source), "html"nulltrue);
  579.                     echo "</p>
  580.                                 ";
  581.                     // line 268
  582.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue268)) {
  583.                         // line 269
  584.                         echo "                                    <p>";
  585.                         echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsetrue269), 269$this->source));
  586.                         echo "</p>
  587.                                 ";
  588.                     }
  589.                     // line 271
  590.                     echo "                                <p class=\"price02-default\">
  591.                                     ";
  592.                     // line 272
  593.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsetrue272)) {
  594.                         // line 273
  595.                         echo "                                        ";
  596.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsetrue273) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsetrue273))) {
  597.                             // line 274
  598.                             echo "                                            ";
  599.                             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"falsefalsetrue274), 274$this->source)), "html"nulltrue);
  600.                             echo "
  601.                                         ";
  602.                         } else {
  603.                             // line 276
  604.                             echo "                                            ";
  605.                             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"falsefalsetrue276), 276$this->source)), "html"nulltrue);
  606.                             echo " ~ ";
  607.                             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"falsefalsetrue276), 276$this->source)), "html"nulltrue);
  608.                             echo "
  609.                                         ";
  610.                         }
  611.                         // line 278
  612.                         echo "                                    ";
  613.                     } else {
  614.                         // line 279
  615.                         echo "                                        ";
  616.                         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"falsefalsetrue279), 279$this->source)), "html"nulltrue);
  617.                         echo "
  618.                                     ";
  619.                     }
  620.                     // line 281
  621.                     echo "                                </p>
  622.                             </a>
  623.                             ";
  624.                     // line 320
  625.                     echo "                        </li>
  626.                     ";
  627.                 }
  628.                 $_parent $context['_parent'];
  629.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  630.                 $context array_intersect_key($context$_parent) + $_parent;
  631.                 // line 322
  632.                 echo "                </ul>
  633.             </div>
  634.             <div class=\"ec-modal\">
  635.                 <div class=\"ec-modal-overlay\">
  636.                     <div class=\"ec-modal-wrap\">
  637.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  638.                 // line 327
  639.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  640.                 echo "\" alt=\"\"/></span></span>
  641.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  642.                 // line 328
  643.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  644.                 echo "</div>
  645.                         <div class=\"ec-modal-box\">
  646.                             <div class=\"ec-role\">
  647.                                 <span class=\"ec-inlineBtn--cancel\">";
  648.                 // line 331
  649.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  650.                 echo "</span>
  651.                                 <a href=\"";
  652.                 // line 332
  653.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  654.                 echo "\" class=\"ec-inlineBtn--action\">";
  655.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  656.                 echo "</a>
  657.                             </div>
  658.                         </div>
  659.                     </div>
  660.                 </div>
  661.             </div>
  662.             <div class=\"ec-pagerRole\">
  663.                 ";
  664.                 // line 339
  665.                 $this->loadTemplate("pager.twig""__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6"339)->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.'339$this->source); })()), "paginationData", [], "any"falsefalsetrue339)]));
  666.                 // line 340
  667.                 echo "            </div>
  668.         ";
  669.             }
  670.             // line 342
  671.             echo "    ";
  672.         }
  673.         
  674.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  675.         
  676.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  677.     }
  678.     public function getTemplateName()
  679.     {
  680.         return "__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6";
  681.     }
  682.     public function isTraitable()
  683.     {
  684.         return false;
  685.     }
  686.     public function getDebugInfo()
  687.     {
  688.         return array (  701 => 342,  697 => 340,  695 => 339,  683 => 332,  679 => 331,  673 => 328,  669 => 327,  662 => 322,  655 => 320,  651 => 281,  645 => 279,  642 => 278,  634 => 276,  628 => 274,  625 => 273,  623 => 272,  620 => 271,  614 => 269,  612 => 268,  608 => 267,  605 => 266,  599 => 265,  593 => 263,  590 => 262,  586 => 261,  582 => 259,  575 => 257,  572 => 256,  566 => 253,  561 => 251,  555 => 250,  552 => 249,  550 => 248,  545 => 246,  540 => 244,  536 => 243,  528 => 242,  525 => 241,  522 => 240,  519 => 239,  516 => 238,  511 => 237,  509 => 236,  507 => 235,  501 => 234,  496 => 232,  493 => 231,  489 => 230,  485 => 228,  483 => 227,  479 => 225,  472 => 221,  468 => 220,  464 => 218,  462 => 217,  459 => 216,  453 => 214,  447 => 212,  445 => 211,  439 => 207,  434 => 205,  431 => 204,  428 => 203,  425 => 202,  404 => 199,  398 => 198,  395 => 197,  377 => 196,  375 => 195,  368 => 193,  363 => 190,  351 => 188,  347 => 187,  342 => 186,  338 => 185,  334 => 183,  328 => 180,  325 => 179,  322 => 178,  320 => 177,  314 => 175,  311 => 174,  309 => 173,  299 => 172,  272 => 154,  262 => 147,  231 => 119,  203 => 93,  189 => 92,  181 => 91,  164 => 90,  155 => 83,  151 => 81,  136 => 68,  134 => 67,  116 => 51,  112 => 49,  97 => 36,  95 => 35,  64 => 15,  53 => 11,  51 => 13,  38 => 11,);
  689.     }
  690.     public function getSourceContext()
  691.     {
  692.         return new Source("{#
  693. This file is part of EC-CUBE
  694. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  695. http://www.ec-cube.co.jp/
  696. For the full copyright and license information, please view the LICENSE
  697. file that was distributed with this source code.
  698. #}
  699. {% extends 'default_frame.twig' %}
  700. {% set body_class = 'product_page product_list' %}
  701. {% block javascript %}<script>
  702.     \$(function () {
  703.         \$('select[name=classcategory_id1]')
  704.             .change(function () {
  705.                 var \$li = \$(this).closest('.ec-shelfGrid__item');
  706.                 \$li.find('.ec-shelfGrid__item-image').hide();
  707.                 \$li.find('.ec-shelfGrid__item-image-class').hide();
  708.                 var \$form = \$(this).parents('form');
  709.                 var product_id = \$form.find('input[name=\"product_id\"]').val();
  710.                 var \$sele1 = \$(this);
  711.                 var \$sele2 = \$form.find('select[name=classcategory_id2]');
  712.                 if (!\$sele2 || \$sele2.length <= 0) {
  713.                     var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\";
  714.                     if (\$(\"p#\" + id).length > 0) {
  715.                         \$(\"p#\" + id).show();
  716.                     } else {
  717.                         \$li.find('.ec-shelfGrid__item-image').show();
  718.                     }
  719.                 } else {
  720.                     {% if apgProductClassConfig.getImageType() == constant('Plugin\\\\\\ApgProductClassImage42\\\\\\Domain\\\\\\ClassImageType::CLASS_IMAGE1_ONLY') %}
  721.                     class1 = \$sele1.val();
  722.                     if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
  723.                         var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
  724.                         var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
  725.                         if (\$(\"p#\" + id).length > 0) {
  726.                             \$(\"p#\" + id).show();
  727.                         } else {
  728.                             \$li.find('.ec-shelfGrid__item-image').show();
  729.                         }
  730.                     } else {
  731.                         \$li.find('.ec-shelfGrid__item-image').show();
  732.                     }
  733.                     {% else %}
  734.                     \$li.find('.ec-shelfGrid__item-image').show();
  735.                     {% endif %}
  736.                 }
  737.             });
  738.         \$('select[name=classcategory_id2]')
  739.             .change(function () {
  740.                 var \$li = \$(this).closest('.ec-shelfGrid__item');
  741.                 \$li.find('.ec-shelfGrid__item-image').hide();
  742.                 \$li.find('.ec-shelfGrid__item-image-class').hide();
  743.                 var \$form = \$(this).parents('form');
  744.                 var product_id = \$form.find('input[name=\"product_id\"]').val();
  745.                 var \$sele1 = \$form.find('select[name=classcategory_id1]');
  746.                 var \$sele2 = \$(this);
  747.                 var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + \$sele2.val();
  748.                 if (\$(\"p#\" + id).length > 0) {
  749.                     \$(\"p#\" + id).show();
  750.                 } else {
  751.                     {% if apgProductClassConfig.getImageType() == constant('Plugin\\\\\\ApgProductClassImage42\\\\\\Domain\\\\\\ClassImageType::CLASS_IMAGE1_ONLY') %}
  752.                     class1 = \$sele1.val();
  753.                     if (\$li.find(\"p[data-class_category1='\" + class1 + \"']\").length > 0) {
  754.                         var class2 = \$li.find(\"p[data-class_category1='\" + class1 + \"']\").data('class_category2');
  755.                         var id = \"apg_product_class_image-\" + product_id + \"-\" + \$sele1.val() + \"-\" + class2;
  756.                         if (\$(\"p#\" + id).length > 0) {
  757.                             \$(\"p#\" + id).show();
  758.                         } else {
  759.                             \$li.find('.ec-shelfGrid__item-image').show();
  760.                         }
  761.                     } else {
  762.                         \$li.find('.ec-shelfGrid__item-image').show();
  763.                     }
  764.                     {% else %}
  765.                     \$li.find('.ec-shelfGrid__item-image').show();
  766.                     {% endif %}
  767.                 }
  768.             });
  769.     });
  770. </script>
  771.     <script>
  772.         eccube.productsClassCategories = {
  773.             {% for Product in pagination %}
  774.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  775.             {% endfor %}
  776.         };
  777.         \$(function() {
  778.             // 表示件数を変更
  779.             \$('.disp-number').change(function() {
  780.                 var dispNumber = \$(this).val();
  781.                 \$('#disp_number').val(dispNumber);
  782.                 \$('#pageno').val(1);
  783.                 \$(\"#form1\").submit();
  784.             });
  785.             // 並び順を変更
  786.             \$('.order-by').change(function() {
  787.                 var orderBy = \$(this).val();
  788.                 \$('#orderby').val(orderBy);
  789.                 \$('#pageno').val(1);
  790.                 \$(\"#form1\").submit();
  791.             });
  792.             \$('.add-cart').on('click', function(e) {
  793.                 var \$form = \$(this).parents('li').find('form');
  794.                 // 個数フォームのチェック
  795.                 var \$quantity = \$form.parent().find('.quantity');
  796.                 if (\$quantity.val() < 1) {
  797.                     \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  798.                     setTimeout(function() {
  799.                         loadingOverlay('hide');
  800.                     }, 100);
  801.                     return true;
  802.                 } else {
  803.                     \$quantity[0].setCustomValidity('');
  804.                 }
  805.                 e.preventDefault();
  806.                 \$.ajax({
  807.                     url: \$form.attr('action'),
  808.                     type: \$form.attr('method'),
  809.                     data: \$form.serialize(),
  810.                     dataType: 'json',
  811.                     beforeSend: function(xhr, settings) {
  812.                         // Buttonを無効にする
  813.                         \$('.add-cart').prop('disabled', true);
  814.                     }
  815.                 }).done(function(data) {
  816.                     // レスポンス内のメッセージをalertで表示
  817.                     \$.each(data.messages, function() {
  818.                         \$('#ec-modal-header').html(this);
  819.                     });
  820.                     \$('.ec-modal').show()
  821.                     // カートブロックを更新する
  822.                     \$.ajax({
  823.                         url: '{{ url('block_cart') }}',
  824.                         type: 'GET',
  825.                         dataType: 'html'
  826.                     }).done(function(html) {
  827.                         \$('.ec-headerRole__cart').html(html);
  828.                     });
  829.                 }).fail(function(data) {
  830.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  831.                 }).always(function(data) {
  832.                     // Buttonを有効にする
  833.                     \$('.add-cart').prop('disabled', false);
  834.                 });
  835.             });
  836.         });
  837.         \$('.ec-modal-wrap').on('click', function(e) {
  838.             // モーダル内の処理は外側にバブリングさせない
  839.             e.stopPropagation();
  840.         });
  841.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  842.             \$('.ec-modal').hide()
  843.         });
  844.     </script>
  845. {% endblock %}
  846. {% block main %}
  847.     {# ここから /app/template/temptu/Block 以下に category1.twig の名前のファイルを置くと表示される(1の部分はカテゴリID)  #}
  848.     {% if search_form.vars.value.category_id.id is defined %}
  849.     {{ include('Block/category'~search_form.vars.value.category_id.id~'.twig', ignore_missing = true) }}
  850.     {% endif %}
  851.     {# ここまで #}
  852.     {% if search_form.category_id.vars.errors|length > 0 %}
  853.         <div class=\"ec-searchnavRole\">
  854.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  855.         </div>
  856.     {% else %}
  857.         <div class=\"ec-searchnavRole\">
  858.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  859.                 {% for item in search_form %}
  860.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  861.                            name=\"{{ item.vars.full_name }}\"
  862.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  863.                 {% endfor %}
  864.             </form>
  865.             <div class=\"ec-searchnavRole__topicpath\">
  866.                 <ol class=\"ec-topicpath\">
  867.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
  868.                     </li>
  869.                     {% if Category is not null %}
  870.                         {% for Path in Category.path %}
  871.                             <li class=\"ec-topicpath__divider\">|</li>
  872.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  873.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  874.                             </li>
  875.                         {% endfor %}
  876.                     {% endif %}
  877.                     {% if search_form.vars.value and search_form.vars.value.name %}
  878.                         <li class=\"ec-topicpath__divider\">|</li>
  879.                         <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  880.                     {% endif %}
  881.                 </ol>
  882.             </div>
  883.             <div class=\"ec-searchnavRole__infos\">
  884.                 <div class=\"ec-searchnavRole__counter\">
  885.                     {% if pagination.totalItemCount > 0 %}
  886.                         {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  887.                     {% else %}
  888.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  889.                     {% endif %}
  890.                 </div>
  891.                 {% if pagination.totalItemCount > 0 %}
  892.                     <div class=\"ec-searchnavRole__actions\">
  893.                         <div class=\"ec-select\">
  894.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  895.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  896.                         </div>
  897.                     </div>
  898.                 {% endif %}
  899.             </div>
  900.         </div>
  901.         {% if pagination.totalItemCount > 0 %}
  902.             <div class=\"ec-shelfRole\">
  903.                 <ul class=\"ec-shelfGrid\">
  904.                     {% for Product in pagination %}
  905.                         <li class=\"ec-shelfGrid__item\">
  906.                             <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  907.                                 <p class=\"ec-shelfGrid__item-image\">
  908.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" loading=\"lazy\">
  909.                                 </p>{% if Product.hasProductClass -%}
  910.     {% set imageCount = Product.ProductImage.count - 1 %}
  911.     {% for ProductClass in Product.getProductClasses() %}
  912.         {% if ProductClass.file_name %}
  913.             {% set imageCount = imageCount + 1 %}
  914.             {% if ProductClass.ClassCategory1 and ProductClass.ClassCategory2 %}
  915.                 <p class=\"ec-shelfGrid__item-image-class\"
  916.                    id=\"apg_product_class_image-{{ Product.id }}-{{ ProductClass.ClassCategory1.id }}-{{ ProductClass.ClassCategory2.id }}\"
  917.                    data-class_category1=\"{{ ProductClass.ClassCategory1.id }}\"
  918.                    data-class_category2=\"{{ ProductClass.ClassCategory2.id }}\"
  919.                    style=\"display: none;\">
  920.                     <img src=\"{{ asset(ProductClass.getImageUrl(),'save_image') }}\">
  921.                 </p>
  922.             {% elseif ProductClass.ClassCategory1 %}
  923.                 <p class=\"ec-shelfGrid__item-image-class\"
  924.                    id=\"apg_product_class_image-{{ Product.id }}-{{ ProductClass.ClassCategory1.id }}-\"
  925.                    data-class_category1=\"{{ ProductClass.ClassCategory1.id }}\"
  926.                    style=\"display: none;\">
  927.                     <img src=\"{{ asset(ProductClass.getImageUrl(),'save_image') }}\">
  928.                 </p>
  929.             {% endif %}
  930.         {% endif %}
  931.     {% endfor %}
  932. {% endif %}
  933.                                 <ul class=\"ec-shelfRole__tags\">
  934.                                     {% for Tag in Product.ProductTag %}
  935.                                         {% if Tag %}
  936.                                             <li class=\"ec-shelfRole__tag\">{{ Tag.Tag }}</li>
  937.                                         {% endif %}
  938.                                     {% endfor %}
  939.                                 </ul>
  940.                                 <p class=\"ec-shelfGrid__item-name\">{{ Product.name }}</p>
  941.                                 {% if Product.description_list %}
  942.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  943.                                 {% endif %}
  944.                                 <p class=\"price02-default\">
  945.                                     {% if Product.hasProductClass %}
  946.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  947.                                             {{ Product.getPrice02IncTaxMin|price }}
  948.                                         {% else %}
  949.                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  950.                                         {% endif %}
  951.                                     {% else %}
  952.                                         {{ Product.getPrice02IncTaxMin|price }}
  953.                                     {% endif %}
  954.                                 </p>
  955.                             </a>
  956.                             {#
  957.                             {% if Product.stock_find %}
  958.                                 {% set form = forms[Product.id] %}
  959.                                 <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  960.                                     <div class=\"ec-productRole__actions\">
  961.                                         {% if form.classcategory_id1 is defined %}
  962.                                             <div class=\"ec-select\">
  963.                                                 {{ form_widget(form.classcategory_id1) }}
  964.                                                 {{ form_errors(form.classcategory_id1) }}
  965.                                             </div>
  966.                                             {% if form.classcategory_id2 is defined %}
  967.                                                 <div class=\"ec-select\">
  968.                                                     {{ form_widget(form.classcategory_id2) }}
  969.                                                     {{ form_errors(form.classcategory_id2) }}
  970.                                                 </div>
  971.                                             {% endif %}
  972.                                         {% endif %}
  973.                                         <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  974.                                             {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  975.                                             {{ form_errors(form.quantity) }}
  976.                                         </div>
  977.                                     </div>
  978.                                     {{ form_rest(form) }}
  979.                                 </form>
  980.                                 <div class=\"ec-productRole__btn\">
  981.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  982.                                         {{ 'カートに入れる'|trans }}
  983.                                     </button>
  984.                                 </div>
  985.                             {% else %}
  986.                                 <div class=\"ec-productRole__btn\">
  987.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  988.                                         {{ 'ただいま品切れ中です。'|trans }}
  989.                                     </button>
  990.                                 </div>
  991.                             {% endif %}
  992.                             #}
  993.                         </li>
  994.                     {% endfor %}
  995.                 </ul>
  996.             </div>
  997.             <div class=\"ec-modal\">
  998.                 <div class=\"ec-modal-overlay\">
  999.                     <div class=\"ec-modal-wrap\">
  1000.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1001.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1002.                         <div class=\"ec-modal-box\">
  1003.                             <div class=\"ec-role\">
  1004.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1005.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1006.                             </div>
  1007.                         </div>
  1008.                     </div>
  1009.                 </div>
  1010.             </div>
  1011.             <div class=\"ec-pagerRole\">
  1012.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  1013.             </div>
  1014.         {% endif %}
  1015.     {% endif %}
  1016. {% endblock %}""__string_template__aaf76cf11e3a0acf9c0b3c7a146975d6""");
  1017.     }
  1018.     
  1019.     public function checkSecurity()
  1020.     {
  1021.         static $tags = array("set" => 13"if" => 35"for" => 90"include" => 339);
  1022.         static $filters = array("escape" => 91"raw" => 91"trans" => 119"length" => 178"no_image_product" => 234"nl2br" => 269"price" => 274);
  1023.         static $functions = array("constant" => 35"class_categories_as_json" => 91"url" => 147"include" => 175"form_widget" => 220"asset" => 234);
  1024.         try {
  1025.             $this->sandbox->checkSecurity(
  1026.                 ['set''if''for''include'],
  1027.                 ['escape''raw''trans''length''no_image_product''nl2br''price'],
  1028.                 ['constant''class_categories_as_json''url''include''form_widget''asset']
  1029.             );
  1030.         } catch (SecurityError $e) {
  1031.             $e->setSourceContext($this->source);
  1032.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  1033.                 $e->setTemplateLine($tags[$e->getTagName()]);
  1034.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  1035.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  1036.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  1037.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  1038.             }
  1039.             throw $e;
  1040.         }
  1041.     }
  1042. }