var/cache/dev/twig/df/df69f5620cbe6decdb6caac63b4377753b0491159109c491358f9dc4c3fec76b.php line 39

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_1a563437a63fdbe176520530a139777849cc175d7e43ea68077c99a4c317c63a 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.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 11
  30.         return "default_frame.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/list.twig"));
  39.         // line 13
  40.         $context["body_class"] = "product_page";
  41.         // line 11
  42.         $this->parent $this->loadTemplate("default_frame.twig""Product/list.twig"11);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  46.         
  47.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  48.     }
  49.     // line 15
  50.     public function block_javascript($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         // line 16
  58.         echo "<script>
  59.     eccube.productsClassCategories = {
  60. ";
  61.         // line 18
  62.         $context['_parent'] = $context;
  63.         $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); })()));
  64.         $context['loop'] = [
  65.           'parent' => $context['_parent'],
  66.           'index0' => 0,
  67.           'index'  => 1,
  68.           'first'  => true,
  69.         ];
  70.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  71.             $length count($context['_seq']);
  72.             $context['loop']['revindex0'] = $length 1;
  73.             $context['loop']['revindex'] = $length;
  74.             $context['loop']['length'] = $length;
  75.             $context['loop']['last'] = === $length;
  76.         }
  77.         foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  78.             // line 19
  79.             echo "\"";
  80.             echo twig_escape_filter($this->envtwig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse19), "js"), "html"nulltrue);
  81.             echo "\": ";
  82.             echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
  83.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse19) == false)) {
  84.                 echo ", ";
  85.             }
  86.             ++$context['loop']['index0'];
  87.             ++$context['loop']['index'];
  88.             $context['loop']['first'] = false;
  89.             if (isset($context['loop']['length'])) {
  90.                 --$context['loop']['revindex0'];
  91.                 --$context['loop']['revindex'];
  92.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  93.             }
  94.         }
  95.         $_parent $context['_parent'];
  96.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  97.         $context array_intersect_key($context$_parent) + $_parent;
  98.         // line 21
  99.         echo "};
  100. function orderbySubmit (orderId) {
  101.     \$('#orderby').val(orderId);
  102.     \$('#pageno').val(1);
  103.     \$(\"#form1\").submit();
  104. }
  105. \$(document).mouseup(function(e)
  106. {
  107.     var container = \$(\".orderbyLabel\");
  108.     // if the target of the click isn't the container nor a descendant of the container
  109.     if (!container.is(e.target) && container.has(e.target).length === 0)
  110.     {
  111.         \$('.dropdownOrderbyList').css('visibility', 'hidden');
  112.     }
  113. });
  114. \$(function() {
  115. var url_string = location.href;
  116. var url = new URL(url_string);
  117. var product_name = url.searchParams.get(\"name\");
  118. var details_title = \"商品一覧\";
  119. if (product_name)
  120.     details_title = product_name + \"の商品一覧\";
  121. details_title = `<span>\${details_title}</span>`
  122. \$('#list_name').html(details_title);
  123. if (url.href.indexOf('orderby') < 0) {
  124.     \$('#orderby > div:first-child input').prop('checked', true);
  125.     \$('.orderbyLabel').text('並び替え');
  126.     \$('.dropdownOrderbyList > li:first-child').addClass('active');
  127. } else {
  128.     var orderid = url.searchParams.get(\"orderby\");
  129.     \$(`.dropdownOrderbyList__item#orderby__\${orderid}`).addClass('active');
  130.     var orderLabel = \$(`.dropdownOrderbyList__item#orderby__\${orderid}`).text();
  131.     \$('.orderbyLabel').text(orderLabel);
  132. }
  133. // 表示件数を変更
  134. \$('.disp-number').change(function() {
  135.     var dispNumber = \$(this).val();
  136.     \$('#disp_number').val(dispNumber);
  137.     \$('#pageno').val(1);
  138.     \$(\"#form1\").submit();
  139. });
  140. // sp 並び順を変更
  141. \$('.orderbyLabel').on('click', function (e) {
  142.     e.preventDefault();
  143.     const element = document.querySelector('.dropdownOrderbyList');
  144.     const visibility = element.style.visibility;
  145.     if (visibility == 'visible') {
  146.         \$('.dropdownOrderbyList').css('visibility', 'hidden');
  147.     } else {
  148.         \$('.dropdownOrderbyList').css('visibility', 'visible');
  149.     }
  150. });
  151. // 並び順を変更
  152. \$('.order-by input[name=\"orderby\"]').change(function() {
  153.     var orderBy = \$(this).val();
  154.     \$('#orderby').val(orderBy);
  155.     \$('#pageno').val(1);
  156.     \$(\"#form1\").submit();
  157. });
  158. \$('.add-cart').on('click', function(e) {
  159.     var \$form = \$(this).parents('li').find('form');
  160.     // 個数フォームのチェック
  161.     var \$quantity = \$form.parent().find('.quantity');
  162.     if (\$quantity.val() < 1) {
  163.         \$quantity[0].setCustomValidity('";
  164.         // line 98
  165.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  166.         echo "');
  167.         setTimeout(function() {
  168.             loadingOverlay('hide');
  169.         }, 100);
  170.         return true;
  171.     } else {
  172.         \$quantity[0].setCustomValidity('');
  173.     }
  174.     e.preventDefault();
  175.     \$.ajax({
  176.         url: \$form.attr('action'),
  177.         type: \$form.attr('method'),
  178.         data: \$form.serialize(),
  179.         dataType: 'json',
  180.         beforeSend: function(xhr, settings) {
  181.             // Buttonを無効にする
  182.             \$('.add-cart').prop('disabled', true);
  183.         }
  184.     }).done(function(data) {
  185.         // レスポンス内のメッセージをalertで表示
  186.         \$.each(data.messages, function() {
  187.             \$('#ec-modal-header').text(this);
  188.         });
  189.         \$('.ec-modal').show()
  190.         // カートブロックを更新する
  191.         \$.ajax({
  192.             url: '";
  193.         // line 126
  194.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  195.         echo "',
  196.             type: 'GET',
  197.             dataType: 'html'
  198.         }).done(function(html) {
  199.             \$('.ec-headerRole__cart').html(html);
  200.         });
  201.     }).fail(function(data) {
  202.         alert('";
  203.         // line 133
  204.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  205.         echo "');
  206.     }).always(function(data) {
  207.         // Buttonを有効にする
  208.         \$('.add-cart').prop('disabled', false);
  209.     });
  210. });
  211. });
  212. \$('.ec-modal-wrap').on('click', function(e) {
  213. // モーダル内の処理は外側にバブリングさせない
  214. e.stopPropagation();
  215. });
  216. \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  217. \$('.ec-modal').hide()
  218. });
  219. </script>
  220. ";
  221.         
  222.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  223.         
  224.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  225.     }
  226.     // line 151
  227.     public function block_main($context, array $blocks = [])
  228.     {
  229.         $macros $this->macros;
  230.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  231.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  232.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  233.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  234.         // line 152
  235.         echo "    ";
  236.         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.'152$this->source); })()), "category_id", [], "any"falsefalsefalse152), "vars", [], "any"falsefalsefalse152), "errors", [], "any"falsefalsefalse152)) > 0)) {
  237.             // line 153
  238.             echo "        <div class=\"ec-searchnavRole\">
  239.             <p class=\"errormsg text-danger\">";
  240.             // line 154
  241.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  242.             echo "</p>
  243.         </div>
  244.     ";
  245.         } else {
  246.             // line 157
  247.             echo "        <div class=\"ec-searchnavRole\">
  248.             <div class=\"ec-searchnavRole__topicpath\">
  249.                 <ol class=\"ec-topicpath\">
  250.                     ";
  251.             // line 160
  252.             if ((isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'160$this->source); })())) {
  253.                 // line 161
  254.                 echo "                        <li class=\"ec-topicpath__item\">
  255.                             <span>";
  256.                 // line 162
  257.                 echo twig_escape_filter($this->env, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'162$this->source); })()), "html"nulltrue);
  258.                 echo "の商品一覧";
  259.                 echo "</span>
  260.                         </li>
  261.                     ";
  262.             } else {
  263.                 // line 165
  264.                 echo "                        <li class=\"ec-topicpath__item\" id=\"list_name\">
  265.                             ";
  266.                 // line 167
  267.                 echo "                        </li>
  268.                     ";
  269.             }
  270.             // line 169
  271.             echo "                </ol>
  272.             </div>
  273.         </div>
  274.         <div class=\"ec-blockspliter\"></div>
  275.         <div class=\"ec-searchnavRole ec-searchnavRole-height ec-productListSPSearchNav\">
  276.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  277.                 ";
  278.             // line 175
  279.             $context['_parent'] = $context;
  280.             $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.'175$this->source); })()));
  281.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  282.                 // line 176
  283.                 echo "                    <input type=\"hidden\" id=\"";
  284.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse176), "id", [], "any"falsefalsefalse176), "html"nulltrue);
  285.                 echo "\"
  286.                            name=\"";
  287.                 // line 177
  288.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse177), "full_name", [], "any"falsefalsefalse177), "html"nulltrue);
  289.                 echo "\"
  290.                            ";
  291.                 // line 178
  292.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse178), "value", [], "any"falsefalsefalse178))) {
  293.                     echo "value=\"";
  294.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse178), "value", [], "any"falsefalsefalse178), "html"nulltrue);
  295.                     echo "\" ";
  296.                 }
  297.                 echo "/>
  298.                 ";
  299.             }
  300.             $_parent $context['_parent'];
  301.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  302.             $context array_intersect_key($context$_parent) + $_parent;
  303.             // line 180
  304.             echo "            </form>
  305.             <div class=\"ec-searchnavRole__infospace show-resultPC\">
  306.                 ";
  307.             // line 183
  308.             echo "                ";
  309.             // line 184
  310.             echo "                ";
  311.             // line 185
  312.             echo "                ";
  313.             // line 186
  314.             echo "                ";
  315.             // line 187
  316.             echo "                ";
  317.             // line 188
  318.             echo "                ";
  319.             // line 189
  320.             echo "                <span>";
  321.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("並び替え"), "html"nulltrue);
  322.             echo "</span>
  323.             </div>
  324.             <div class=\"ec-searchnavRole__infos ec-spOrderby show-resultSP\">
  325.                 <div class=\"orderbyLabel\"></div>
  326.                 <ul class=\"dropdownOrderbyList\">
  327.                     ";
  328.             // line 194
  329.             $context['_parent'] = $context;
  330.             $context['_seq'] = twig_ensure_traversable((isset($context["OrderList"]) || array_key_exists("OrderList"$context) ? $context["OrderList"] : (function () { throw new RuntimeError('Variable "OrderList" does not exist.'194$this->source); })()));
  331.             foreach ($context['_seq'] as $context["_key"] => $context["orderitem"]) {
  332.                 // line 195
  333.                 echo "                        <li class=\"dropdownOrderbyList__item\" id=\"orderby__";
  334.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["orderitem"], "id", [], "any"falsefalsefalse195), "html"nulltrue);
  335.                 echo "\" onclick=\"orderbySubmit(";
  336.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["orderitem"], "id", [], "any"falsefalsefalse195), "html"nulltrue);
  337.                 echo ")\">";
  338.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["orderitem"], "name", [], "any"falsefalsefalse195), "html"nulltrue);
  339.                 echo "</li>
  340.                     ";
  341.             }
  342.             $_parent $context['_parent'];
  343.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['orderitem'], $context['_parent'], $context['loop']);
  344.             $context array_intersect_key($context$_parent) + $_parent;
  345.             // line 197
  346.             echo "                </ul>
  347.             </div>
  348.             <div class=\"ec-searchnavRole__infos show-resultPC\">
  349.                 ";
  350.             // line 200
  351.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(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.'200$this->source); })()), "orderby", [], "any"falsefalsefalse200), 'widget', ["attr" => ["class" => "order-by"]]);
  352.             echo "
  353.             </div>
  354.         </div>
  355.         <div class=\"ec-blockspliter\"></div>
  356.         ";
  357.             // line 204
  358.             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.'204$this->source); })()), "totalItemCount", [], "any"falsefalsefalse204) > 0)) {
  359.                 // line 205
  360.                 echo "            <div class=\"ec-role\">
  361.                 <div class=\"ec-newItemRole\">
  362.                     <div class=\"ec-newItemRole__list\">
  363.                         ";
  364.                 // line 208
  365.                 $context['_parent'] = $context;
  366.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'208$this->source); })()));
  367.                 $context['loop'] = [
  368.                   'parent' => $context['_parent'],
  369.                   'index0' => 0,
  370.                   'index'  => 1,
  371.                   'first'  => true,
  372.                 ];
  373.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  374.                     $length count($context['_seq']);
  375.                     $context['loop']['revindex0'] = $length 1;
  376.                     $context['loop']['revindex'] = $length;
  377.                     $context['loop']['length'] = $length;
  378.                     $context['loop']['last'] = === $length;
  379.                 }
  380.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  381.                     // line 209
  382.                     echo "                            <div class=\"ec-newItemRole__listItem\">
  383.                                 <a href=\"";
  384.                     // line 210
  385.                     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"falsefalsefalse210)]), "html"nulltrue);
  386.                     echo "\">
  387.                                     <figure>
  388.                                         <img src=\"";
  389.                     // line 212
  390.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env$this->source$context["Product"], "main_list_image", [], "any"falsefalsefalse212)), "save_image"), "html"nulltrue);
  391.                     echo "\"
  392.                                              alt=\"";
  393.                     // line 213
  394.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse213), "html"nulltrue);
  395.                     echo "\" ";
  396.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse213) > 5)) {
  397.                         echo " loading=\"lazy\"";
  398.                     }
  399.                     echo ">
  400.                                     </figure>
  401.                                     ";
  402.                     // line 215
  403.                     if (twig_get_attribute($this->env$this->source$context["Product"], "new_arrival", [], "any"falsefalsefalse215)) {
  404.                         // line 216
  405.                         echo "                                        <span class=\"newitembadge\">NEW</span>
  406.                                     ";
  407.                     } else {
  408.                         // line 218
  409.                         echo "                                        <span class=\"newitembadge\" style=\"background-color: unset;\"></span>
  410.                                     ";
  411.                     }
  412.                     // line 220
  413.                     echo "                                    <div>
  414.                                         <p class=\"ec-newItemRole__listItemTitle\">";
  415.                     // line 221
  416.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse221)), "html"nulltrue);
  417.                     echo "</p>
  418.                                         <p class=\"ec-newItemRole__listItemPrice\">
  419.                                             ";
  420.                     // line 223
  421.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsefalse223)) {
  422.                         // line 224
  423.                         echo "                                                ";
  424.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsefalse224) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsefalse224))) {
  425.                             // line 225
  426.                             echo "                                                    ";
  427.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse225)), "html"nulltrue);
  428.                             echo "
  429.                                                 ";
  430.                         } else {
  431.                             // line 227
  432.                             echo "                                                    ";
  433.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse227)), "html"nulltrue);
  434.                             echo " ~ ";
  435.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsefalse227)), "html"nulltrue);
  436.                             echo "
  437.                                                 ";
  438.                         }
  439.                         // line 229
  440.                         echo "                                            ";
  441.                     } else {
  442.                         // line 230
  443.                         echo "                                                ";
  444.                         echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse230)), "html"nulltrue);
  445.                         echo "
  446.                                             ";
  447.                     }
  448.                     // line 231
  449.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(税込)"), "html"nulltrue);
  450.                     echo "
  451.                                         </p>
  452.                                     </div>
  453.                                 </a>
  454.                             </div>
  455.                         ";
  456.                     ++$context['loop']['index0'];
  457.                     ++$context['loop']['index'];
  458.                     $context['loop']['first'] = false;
  459.                     if (isset($context['loop']['length'])) {
  460.                         --$context['loop']['revindex0'];
  461.                         --$context['loop']['revindex'];
  462.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  463.                     }
  464.                 }
  465.                 $_parent $context['_parent'];
  466.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  467.                 $context array_intersect_key($context$_parent) + $_parent;
  468.                 // line 237
  469.                 echo "                    </div>
  470.                 </div>
  471.                 ";
  472.                 // line 239
  473.                 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.'239$this->source); })()), "pageCount", [], "any"falsefalsefalse239) > 1)) {
  474.                     // line 240
  475.                     echo "                    <div class=\"ec-blockspliter\"></div>
  476.                 ";
  477.                 }
  478.                 // line 242
  479.                 echo "            </div>
  480.             ";
  481.                 // line 243
  482.                 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.'243$this->source); })()), "pageCount", [], "any"falsefalsefalse243) > 1)) {
  483.                     // line 244
  484.                     echo "                <div class=\"ec-role\">
  485.                     <div class=\"ec-pagerRole ec-newsPagination\">
  486.                         ";
  487.                     // line 246
  488.                     $this->loadTemplate("pager.twig""Product/list.twig"246)->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.'246$this->source); })()), "paginationData", [], "any"falsefalsefalse246)]));
  489.                     // line 247
  490.                     echo "                    </div>
  491.                 </div>
  492.             ";
  493.                 }
  494.                 // line 250
  495.                 echo "            <div class=\"ec-blockspliter productListSpliter\"></div>
  496.             <div class=\"ec-blockempty\"></div>
  497.             <div class=\"ec-modal\">
  498.                 <div class=\"ec-modal-overlay\">
  499.                     <div class=\"ec-modal-wrap\">
  500.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
  501.                                         src=\"";
  502.                 // line 256
  503.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  504.                 echo "\" alt=\"\"/></span></span>
  505.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  506.                 // line 257
  507.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  508.                 echo "</div>
  509.                         <div class=\"ec-modal-box\">
  510.                             <div class=\"ec-role\">
  511.                                 <span class=\"ec-inlineBtn--cancel\">";
  512.                 // line 260
  513.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  514.                 echo "</span>
  515.                                 <a href=\"";
  516.                 // line 261
  517.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  518.                 echo "\" class=\"ec-inlineBtn--action\">";
  519.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  520.                 echo "</a>
  521.                             </div>
  522.                         </div>
  523.                     </div>
  524.                 </div>
  525.             </div>
  526.         ";
  527.             }
  528.             // line 268
  529.             echo "    ";
  530.         }
  531.         
  532.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  533.         
  534.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  535.     }
  536.     public function getTemplateName()
  537.     {
  538.         return "Product/list.twig";
  539.     }
  540.     public function isTraitable()
  541.     {
  542.         return false;
  543.     }
  544.     public function getDebugInfo()
  545.     {
  546.         return array (  564 => 268,  552 => 261,  548 => 260,  542 => 257,  538 => 256,  530 => 250,  525 => 247,  523 => 246,  519 => 244,  517 => 243,  514 => 242,  510 => 240,  508 => 239,  504 => 237,  484 => 231,  478 => 230,  475 => 229,  467 => 227,  461 => 225,  458 => 224,  456 => 223,  451 => 221,  448 => 220,  444 => 218,  440 => 216,  438 => 215,  429 => 213,  425 => 212,  420 => 210,  417 => 209,  400 => 208,  395 => 205,  393 => 204,  386 => 200,  381 => 197,  368 => 195,  364 => 194,  355 => 189,  353 => 188,  351 => 187,  349 => 186,  347 => 185,  345 => 184,  343 => 183,  339 => 180,  327 => 178,  323 => 177,  318 => 176,  314 => 175,  306 => 169,  302 => 167,  299 => 165,  292 => 162,  289 => 161,  287 => 160,  282 => 157,  276 => 154,  273 => 153,  270 => 152,  260 => 151,  233 => 133,  223 => 126,  192 => 98,  113 => 21,  93 => 19,  76 => 18,  72 => 16,  62 => 15,  51 => 11,  49 => 13,  36 => 11,);
  547.     }
  548.     public function getSourceContext()
  549.     {
  550.         return new Source("{#
  551. This file is part of EC-CUBE
  552. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  553. http://www.ec-cube.co.jp/
  554. For the full copyright and license information, please view the LICENSE
  555. file that was distributed with this source code.
  556. #}
  557. {% extends 'default_frame.twig' %}
  558. {% set body_class = 'product_page' %}
  559. {% block javascript %}
  560. <script>
  561.     eccube.productsClassCategories = {
  562. {% for Product in pagination %}
  563. \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  564. {% endfor %}
  565. };
  566. function orderbySubmit (orderId) {
  567.     \$('#orderby').val(orderId);
  568.     \$('#pageno').val(1);
  569.     \$(\"#form1\").submit();
  570. }
  571. \$(document).mouseup(function(e)
  572. {
  573.     var container = \$(\".orderbyLabel\");
  574.     // if the target of the click isn't the container nor a descendant of the container
  575.     if (!container.is(e.target) && container.has(e.target).length === 0)
  576.     {
  577.         \$('.dropdownOrderbyList').css('visibility', 'hidden');
  578.     }
  579. });
  580. \$(function() {
  581. var url_string = location.href;
  582. var url = new URL(url_string);
  583. var product_name = url.searchParams.get(\"name\");
  584. var details_title = \"商品一覧\";
  585. if (product_name)
  586.     details_title = product_name + \"の商品一覧\";
  587. details_title = `<span>\${details_title}</span>`
  588. \$('#list_name').html(details_title);
  589. if (url.href.indexOf('orderby') < 0) {
  590.     \$('#orderby > div:first-child input').prop('checked', true);
  591.     \$('.orderbyLabel').text('並び替え');
  592.     \$('.dropdownOrderbyList > li:first-child').addClass('active');
  593. } else {
  594.     var orderid = url.searchParams.get(\"orderby\");
  595.     \$(`.dropdownOrderbyList__item#orderby__\${orderid}`).addClass('active');
  596.     var orderLabel = \$(`.dropdownOrderbyList__item#orderby__\${orderid}`).text();
  597.     \$('.orderbyLabel').text(orderLabel);
  598. }
  599. // 表示件数を変更
  600. \$('.disp-number').change(function() {
  601.     var dispNumber = \$(this).val();
  602.     \$('#disp_number').val(dispNumber);
  603.     \$('#pageno').val(1);
  604.     \$(\"#form1\").submit();
  605. });
  606. // sp 並び順を変更
  607. \$('.orderbyLabel').on('click', function (e) {
  608.     e.preventDefault();
  609.     const element = document.querySelector('.dropdownOrderbyList');
  610.     const visibility = element.style.visibility;
  611.     if (visibility == 'visible') {
  612.         \$('.dropdownOrderbyList').css('visibility', 'hidden');
  613.     } else {
  614.         \$('.dropdownOrderbyList').css('visibility', 'visible');
  615.     }
  616. });
  617. // 並び順を変更
  618. \$('.order-by input[name=\"orderby\"]').change(function() {
  619.     var orderBy = \$(this).val();
  620.     \$('#orderby').val(orderBy);
  621.     \$('#pageno').val(1);
  622.     \$(\"#form1\").submit();
  623. });
  624. \$('.add-cart').on('click', function(e) {
  625.     var \$form = \$(this).parents('li').find('form');
  626.     // 個数フォームのチェック
  627.     var \$quantity = \$form.parent().find('.quantity');
  628.     if (\$quantity.val() < 1) {
  629.         \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  630.         setTimeout(function() {
  631.             loadingOverlay('hide');
  632.         }, 100);
  633.         return true;
  634.     } else {
  635.         \$quantity[0].setCustomValidity('');
  636.     }
  637.     e.preventDefault();
  638.     \$.ajax({
  639.         url: \$form.attr('action'),
  640.         type: \$form.attr('method'),
  641.         data: \$form.serialize(),
  642.         dataType: 'json',
  643.         beforeSend: function(xhr, settings) {
  644.             // Buttonを無効にする
  645.             \$('.add-cart').prop('disabled', true);
  646.         }
  647.     }).done(function(data) {
  648.         // レスポンス内のメッセージをalertで表示
  649.         \$.each(data.messages, function() {
  650.             \$('#ec-modal-header').text(this);
  651.         });
  652.         \$('.ec-modal').show()
  653.         // カートブロックを更新する
  654.         \$.ajax({
  655.             url: '{{ url('block_cart') }}',
  656.             type: 'GET',
  657.             dataType: 'html'
  658.         }).done(function(html) {
  659.             \$('.ec-headerRole__cart').html(html);
  660.         });
  661.     }).fail(function(data) {
  662.         alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  663.     }).always(function(data) {
  664.         // Buttonを有効にする
  665.         \$('.add-cart').prop('disabled', false);
  666.     });
  667. });
  668. });
  669. \$('.ec-modal-wrap').on('click', function(e) {
  670. // モーダル内の処理は外側にバブリングさせない
  671. e.stopPropagation();
  672. });
  673. \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  674. \$('.ec-modal').hide()
  675. });
  676. </script>
  677. {% endblock %}
  678. {% block main %}
  679.     {% if search_form.category_id.vars.errors|length > 0 %}
  680.         <div class=\"ec-searchnavRole\">
  681.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  682.         </div>
  683.     {% else %}
  684.         <div class=\"ec-searchnavRole\">
  685.             <div class=\"ec-searchnavRole__topicpath\">
  686.                 <ol class=\"ec-topicpath\">
  687.                     {% if Category %}
  688.                         <li class=\"ec-topicpath__item\">
  689.                             <span>{{ Category }}{{ 'の商品一覧' }}</span>
  690.                         </li>
  691.                     {% else %}
  692.                         <li class=\"ec-topicpath__item\" id=\"list_name\">
  693.                             {#                            <span>{{ subtitle }}{{ 'の商品一覧' }}</span> #}
  694.                         </li>
  695.                     {% endif %}
  696.                 </ol>
  697.             </div>
  698.         </div>
  699.         <div class=\"ec-blockspliter\"></div>
  700.         <div class=\"ec-searchnavRole ec-searchnavRole-height ec-productListSPSearchNav\">
  701.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  702.                 {% for item in search_form %}
  703.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  704.                            name=\"{{ item.vars.full_name }}\"
  705.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  706.                 {% endfor %}
  707.             </form>
  708.             <div class=\"ec-searchnavRole__infospace show-resultPC\">
  709.                 {#                {% if pagination.totalItemCount > 0 %} #}
  710.                 {#                    <div class=\"ec-searchnavRole__actions\"> #}
  711.                 {#                        <div class=\"ec-select\"> #}
  712.                 {#                            {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }} #}
  713.                 {#                        </div> #}
  714.                 {#                    </div> #}
  715.                 {#                {% endif %} #}
  716.                 <span>{{ '並び替え'|trans }}</span>
  717.             </div>
  718.             <div class=\"ec-searchnavRole__infos ec-spOrderby show-resultSP\">
  719.                 <div class=\"orderbyLabel\"></div>
  720.                 <ul class=\"dropdownOrderbyList\">
  721.                     {% for orderitem in OrderList %}
  722.                         <li class=\"dropdownOrderbyList__item\" id=\"orderby__{{ orderitem.id }}\" onclick=\"orderbySubmit({{ orderitem.id }})\">{{ orderitem.name }}</li>
  723.                     {% endfor %}
  724.                 </ul>
  725.             </div>
  726.             <div class=\"ec-searchnavRole__infos show-resultPC\">
  727.                 {{ form_widget(search_form.orderby, {'attr': {'class': 'order-by'}}) }}
  728.             </div>
  729.         </div>
  730.         <div class=\"ec-blockspliter\"></div>
  731.         {% if pagination.totalItemCount > 0 %}
  732.             <div class=\"ec-role\">
  733.                 <div class=\"ec-newItemRole\">
  734.                     <div class=\"ec-newItemRole__list\">
  735.                         {% for Product in pagination %}
  736.                             <div class=\"ec-newItemRole__listItem\">
  737.                                 <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  738.                                     <figure>
  739.                                         <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\"
  740.                                              alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
  741.                                     </figure>
  742.                                     {% if Product.new_arrival %}
  743.                                         <span class=\"newitembadge\">NEW</span>
  744.                                     {% else %}
  745.                                         <span class=\"newitembadge\" style=\"background-color: unset;\"></span>
  746.                                     {% endif %}
  747.                                     <div>
  748.                                         <p class=\"ec-newItemRole__listItemTitle\">{{ Product.name|trans }}</p>
  749.                                         <p class=\"ec-newItemRole__listItemPrice\">
  750.                                             {% if Product.hasProductClass %}
  751.                                                 {% if Product.getPrice02Min == Product.getPrice02Max %}
  752.                                                     {{ Product.getPrice02IncTaxMin|price }}
  753.                                                 {% else %}
  754.                                                     {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  755.                                                 {% endif %}
  756.                                             {% else %}
  757.                                                 {{ Product.getPrice02IncTaxMin|price }}
  758.                                             {% endif %}{{ '(税込)'|trans }}
  759.                                         </p>
  760.                                     </div>
  761.                                 </a>
  762.                             </div>
  763.                         {% endfor %}
  764.                     </div>
  765.                 </div>
  766.                 {% if pagination.pageCount > 1 %}
  767.                     <div class=\"ec-blockspliter\"></div>
  768.                 {% endif %}
  769.             </div>
  770.             {% if pagination.pageCount > 1 %}
  771.                 <div class=\"ec-role\">
  772.                     <div class=\"ec-pagerRole ec-newsPagination\">
  773.                         {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  774.                     </div>
  775.                 </div>
  776.             {% endif %}
  777.             <div class=\"ec-blockspliter productListSpliter\"></div>
  778.             <div class=\"ec-blockempty\"></div>
  779.             <div class=\"ec-modal\">
  780.                 <div class=\"ec-modal-overlay\">
  781.                     <div class=\"ec-modal-wrap\">
  782.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
  783.                                         src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  784.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  785.                         <div class=\"ec-modal-box\">
  786.                             <div class=\"ec-role\">
  787.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  788.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  789.                             </div>
  790.                         </div>
  791.                     </div>
  792.                 </div>
  793.             </div>
  794.         {% endif %}
  795.     {% endif %}
  796. {% endblock %}
  797. ""Product/list.twig""/home/snowtiger27/www/three-m.online/app/template/default/Product/list.twig");
  798.     }
  799. }