var/cache/dev/twig/d0/d01fd5e8dec62ca78cbf8164bca422500a677f031f0cab48eeb7e5b0590e45d2.php line 209

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_511cc2646943e54b67f44b36b3735f4bb609850ceb89f9f96721379a92149489 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() {
  101. // 表示件数を変更
  102. \$('.disp-number').change(function() {
  103.     var dispNumber = \$(this).val();
  104.     \$('#disp_number').val(dispNumber);
  105.     \$('#pageno').val(1);
  106.     \$(\"#form1\").submit();
  107. });
  108. // 並び順を変更
  109. \$('.order-by').change(function() {
  110.     var orderBy = \$(this).val();
  111.     \$('#orderby').val(orderBy);
  112.     \$('#pageno').val(1);
  113.     \$(\"#form1\").submit();
  114. });
  115. \$('.add-cart').on('click', function(e) {
  116.     var \$form = \$(this).parents('li').find('form');
  117.     // 個数フォームのチェック
  118.     var \$quantity = \$form.parent().find('.quantity');
  119.     if (\$quantity.val() < 1) {
  120.         \$quantity[0].setCustomValidity('";
  121.         // line 47
  122.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  123.         echo "');
  124.         setTimeout(function() {
  125.             loadingOverlay('hide');
  126.         }, 100);
  127.         return true;
  128.     } else {
  129.         \$quantity[0].setCustomValidity('');
  130.     }
  131.     e.preventDefault();
  132.     \$.ajax({
  133.         url: \$form.attr('action'),
  134.         type: \$form.attr('method'),
  135.         data: \$form.serialize(),
  136.         dataType: 'json',
  137.         beforeSend: function(xhr, settings) {
  138.             // Buttonを無効にする
  139.             \$('.add-cart').prop('disabled', true);
  140.         }
  141.     }).done(function(data) {
  142.         // レスポンス内のメッセージをalertで表示
  143.         \$.each(data.messages, function() {
  144.             \$('#ec-modal-header').text(this);
  145.         });
  146.         \$('.ec-modal').show()
  147.         // カートブロックを更新する
  148.         \$.ajax({
  149.             url: '";
  150.         // line 75
  151.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  152.         echo "',
  153.             type: 'GET',
  154.             dataType: 'html'
  155.         }).done(function(html) {
  156.             \$('.ec-headerRole__cart').html(html);
  157.         });
  158.     }).fail(function(data) {
  159.         alert('";
  160.         // line 82
  161.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  162.         echo "');
  163.     }).always(function(data) {
  164.         // Buttonを有効にする
  165.         \$('.add-cart').prop('disabled', false);
  166.     });
  167. });
  168. });
  169. \$('.ec-modal-wrap').on('click', function(e) {
  170. // モーダル内の処理は外側にバブリングさせない
  171. e.stopPropagation();
  172. });
  173. \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  174. \$('.ec-modal').hide()
  175. });
  176. </script>
  177. ";
  178.         
  179.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  180.         
  181.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  182.     }
  183.     // line 100
  184.     public function block_main($context, array $blocks = [])
  185.     {
  186.         $macros $this->macros;
  187.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  188.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  189.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  190.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  191.         // line 101
  192.         echo "    ";
  193.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'101$this->source); })()), "category_id", [], "any"falsefalsefalse101), "vars", [], "any"falsefalsefalse101), "errors", [], "any"falsefalsefalse101)) > 0)) {
  194.             // line 102
  195.             echo "        <div class=\"ec-searchnavRole\">
  196.             <p class=\"errormsg text-danger\">";
  197.             // line 103
  198.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  199.             echo "</p>
  200.         </div>
  201.     ";
  202.         } else {
  203.             // line 106
  204.             echo "        <div class=\"ec-searchnavRole\">
  205.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  206.                 ";
  207.             // line 108
  208.             $context['_parent'] = $context;
  209.             $context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'108$this->source); })()));
  210.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  211.                 // line 109
  212.                 echo "                    <input type=\"hidden\" id=\"";
  213.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse109), "id", [], "any"falsefalsefalse109), "html"nulltrue);
  214.                 echo "\"
  215.                            name=\"";
  216.                 // line 110
  217.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse110), "full_name", [], "any"falsefalsefalse110), "html"nulltrue);
  218.                 echo "\"
  219.                            ";
  220.                 // line 111
  221.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse111), "value", [], "any"falsefalsefalse111))) {
  222.                     echo "value=\"";
  223.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse111), "value", [], "any"falsefalsefalse111), "html"nulltrue);
  224.                     echo "\" ";
  225.                 }
  226.                 echo "/>
  227.                 ";
  228.             }
  229.             $_parent $context['_parent'];
  230.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  231.             $context array_intersect_key($context$_parent) + $_parent;
  232.             // line 113
  233.             echo "            </form>
  234.             <div class=\"ec-searchnavRole__topicpath\">
  235.                 <ol class=\"ec-topicpath\">
  236.                     <li class=\"ec-topicpath__item\"><a href=\"";
  237.             // line 116
  238.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  239.             echo "\">";
  240.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("全て"), "html"nulltrue);
  241.             echo "</a>
  242.                     </li>
  243.                     ";
  244.             // line 118
  245.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'118$this->source); })()))) {
  246.                 // line 119
  247.                 echo "                        ";
  248.                 $context['_parent'] = $context;
  249.                 $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.'119$this->source); })()), "path", [], "any"falsefalsefalse119));
  250.                 $context['loop'] = [
  251.                   'parent' => $context['_parent'],
  252.                   'index0' => 0,
  253.                   'index'  => 1,
  254.                   'first'  => true,
  255.                 ];
  256.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  257.                     $length count($context['_seq']);
  258.                     $context['loop']['revindex0'] = $length 1;
  259.                     $context['loop']['revindex'] = $length;
  260.                     $context['loop']['length'] = $length;
  261.                     $context['loop']['last'] = === $length;
  262.                 }
  263.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  264.                     // line 120
  265.                     echo "                            <li class=\"ec-topicpath__divider\">|</li>
  266.                             <li class=\"ec-topicpath__item";
  267.                     // line 121
  268.                     if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse121)) {
  269.                         echo "--active";
  270.                     }
  271.                     echo "\"><a
  272.                                         href=\"";
  273.                     // line 122
  274.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  275.                     echo "?category_id=";
  276.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "id", [], "any"falsefalsefalse122), "html"nulltrue);
  277.                     echo "\">";
  278.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse122), "html"nulltrue);
  279.                     echo "</a>
  280.                             </li>
  281.                         ";
  282.                     ++$context['loop']['index0'];
  283.                     ++$context['loop']['index'];
  284.                     $context['loop']['first'] = false;
  285.                     if (isset($context['loop']['length'])) {
  286.                         --$context['loop']['revindex0'];
  287.                         --$context['loop']['revindex'];
  288.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  289.                     }
  290.                 }
  291.                 $_parent $context['_parent'];
  292.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  293.                 $context array_intersect_key($context$_parent) + $_parent;
  294.                 // line 125
  295.                 echo "                    ";
  296.             }
  297.             // line 126
  298.             echo "                    ";
  299.             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.'126$this->source); })()), "vars", [], "any"falsefalsefalse126), "value", [], "any"falsefalsefalse126) && 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.'126$this->source); })()), "vars", [], "any"falsefalsefalse126), "value", [], "any"falsefalsefalse126), "name", [], "any"falsefalsefalse126))) {
  300.                 // line 127
  301.                 echo "                        <li class=\"ec-topicpath__divider\">|</li>
  302.                         <li class=\"ec-topicpath__item\">";
  303.                 // line 128
  304.                 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.'128$this->source); })()), "vars", [], "any"falsefalsefalse128), "value", [], "any"falsefalsefalse128), "name", [], "any"falsefalsefalse128)]), "html"nulltrue);
  305.                 echo "</li>
  306.                     ";
  307.             }
  308.             // line 130
  309.             echo "                </ol>
  310.             </div>
  311.             <div class=\"ec-searchnavRole__infos\">
  312.                 <div class=\"ec-searchnavRole__counter\">
  313.                     ";
  314.             // line 134
  315.             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.'134$this->source); })()), "totalItemCount", [], "any"falsefalsefalse134) > 0)) {
  316.                 // line 135
  317.                 echo "                        ";
  318.                 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.'135$this->source); })()), "totalItemCount", [], "any"falsefalsefalse135)]);
  319.                 echo "
  320.                     ";
  321.             } else {
  322.                 // line 137
  323.                 echo "                        <span>";
  324.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの商品は見つかりませんでした"), "html"nulltrue);
  325.                 echo "</span>
  326.                     ";
  327.             }
  328.             // line 139
  329.             echo "                </div>
  330.                 ";
  331.             // line 140
  332.             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.'140$this->source); })()), "totalItemCount", [], "any"falsefalsefalse140) > 0)) {
  333.                 // line 141
  334.                 echo "                    <div class=\"ec-searchnavRole__actions\">
  335.                         <div class=\"ec-select\">
  336.                             ";
  337.                 // line 143
  338.                 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.'143$this->source); })()), "disp_number", [], "any"falsefalsefalse143), 'widget', ["id" => """attr" => ["class" => "disp-number"]]);
  339.                 echo "
  340.                             ";
  341.                 // line 144
  342.                 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.'144$this->source); })()), "orderby", [], "any"falsefalsefalse144), 'widget', ["id" => """attr" => ["class" => "order-by"]]);
  343.                 echo "
  344.                         </div>
  345.                     </div>
  346.                 ";
  347.             }
  348.             // line 148
  349.             echo "            </div>
  350.         </div>
  351.         ";
  352.             // line 150
  353.             if ((twig_get_attribute($this->env$this->source, (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'150$this->source); })()), "totalItemCount", [], "any"falsefalsefalse150) > 0)) {
  354.                 // line 151
  355.                 echo "            <div class=\"ec-shelfRole\">
  356.                 <ul class=\"ec-shelfGrid\">
  357.                     ";
  358.                 // line 153
  359.                 $context['_parent'] = $context;
  360.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'153$this->source); })()));
  361.                 $context['loop'] = [
  362.                   'parent' => $context['_parent'],
  363.                   'index0' => 0,
  364.                   'index'  => 1,
  365.                   'first'  => true,
  366.                 ];
  367.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  368.                     $length count($context['_seq']);
  369.                     $context['loop']['revindex0'] = $length 1;
  370.                     $context['loop']['revindex'] = $length;
  371.                     $context['loop']['length'] = $length;
  372.                     $context['loop']['last'] = === $length;
  373.                 }
  374.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  375.                     // line 154
  376.                     echo "                        <li class=\"ec-shelfGrid__item\">
  377.                             <a href=\"";
  378.                     // line 155
  379.                     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"falsefalsefalse155)]), "html"nulltrue);
  380.                     echo "\">
  381.                                 <p class=\"ec-shelfGrid__item-image\">
  382.                                     <img src=\"";
  383.                     // line 157
  384.                     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"falsefalsefalse157)), "save_image"), "html"nulltrue);
  385.                     echo "\"
  386.                                          alt=\"";
  387.                     // line 158
  388.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse158), "html"nulltrue);
  389.                     echo "\" ";
  390.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse158) > 5)) {
  391.                         echo " loading=\"lazy\"";
  392.                     }
  393.                     echo ">
  394.                                 </p>
  395.                                 <p>";
  396.                     // line 160
  397.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse160), "html"nulltrue);
  398.                     echo "</p>
  399.                                 ";
  400.                     // line 161
  401.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsefalse161)) {
  402.                         // line 162
  403.                         echo "                                    <p>";
  404.                         echo twig_nl2br(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsefalse162));
  405.                         echo "</p>
  406.                                 ";
  407.                     }
  408.                     // line 164
  409.                     echo "                                <p class=\"price02-default\">
  410.                                     ";
  411.                     // line 165
  412.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsefalse165)) {
  413.                         // line 166
  414.                         echo "                                        ";
  415.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsefalse166) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsefalse166))) {
  416.                             // line 167
  417.                             echo "                                            ";
  418.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse167)), "html"nulltrue);
  419.                             echo "
  420.                                         ";
  421.                         } else {
  422.                             // line 169
  423.                             echo "                                            ";
  424.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse169)), "html"nulltrue);
  425.                             echo " ~ ";
  426.                             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsefalse169)), "html"nulltrue);
  427.                             echo "
  428.                                         ";
  429.                         }
  430.                         // line 171
  431.                         echo "                                    ";
  432.                     } else {
  433.                         // line 172
  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"], "getPrice02IncTaxMin", [], "any"falsefalsefalse172)), "html"nulltrue);
  436.                         echo "
  437.                                     ";
  438.                     }
  439.                     // line 174
  440.                     echo "                                </p>
  441.                             </a>
  442.                             ";
  443.                     // line 177
  444.                     if (twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsefalse177)) {
  445.                         // line 178
  446.                         echo "                                <div style=\"display:none;\">
  447.                                     ";
  448.                         // line 179
  449.                         $context["form"] = twig_get_attribute($this->env$this->source, (isset($context["forms"]) || array_key_exists("forms"$context) ? $context["forms"] : (function () { throw new RuntimeError('Variable "forms" does not exist.'179$this->source); })()), twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse179), [], "array"falsefalsefalse179);
  450.                         // line 180
  451.                         echo "                                    <form name=\"form";
  452.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse180), "html"nulltrue);
  453.                         echo "\" id=\"productForm";
  454.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse180), "html"nulltrue);
  455.                         echo "\"
  456.                                           action=\"";
  457.                         // line 181
  458.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_cart", ["id" => twig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse181)]), "html"nulltrue);
  459.                         echo "\" method=\"post\">
  460.                                         <div class=\"ec-productRole__actions\">
  461.                                             ";
  462.                         // line 183
  463.                         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse183)) {
  464.                             // line 184
  465.                             echo "                                                <div class=\"ec-select\">
  466.                                                     ";
  467.                             // line 185
  468.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'185$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse185), 'widget');
  469.                             echo "
  470.                                                     ";
  471.                             // line 186
  472.                             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'186$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse186), 'errors');
  473.                             echo "
  474.                                                 </div>
  475.                                                 ";
  476.                             // line 188
  477.                             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse188)) {
  478.                                 // line 189
  479.                                 echo "                                                    <div class=\"ec-select\">
  480.                                                         ";
  481.                                 // line 190
  482.                                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'190$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse190), 'widget');
  483.                                 echo "
  484.                                                         ";
  485.                                 // line 191
  486.                                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'191$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse191), 'errors');
  487.                                 echo "
  488.                                                     </div>
  489.                                                 ";
  490.                             }
  491.                             // line 194
  492.                             echo "                                            ";
  493.                         }
  494.                         // line 195
  495.                         echo "                                            <div class=\"ec-numberInput\"><span>";
  496.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  497.                         echo "</span>
  498.                                                 ";
  499.                         // line 196
  500.                         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'196$this->source); })()), "quantity", [], "any"falsefalsefalse196), 'widget', ["attr" => ["class" => "quantity"]]);
  501.                         echo "
  502.                                                 ";
  503.                         // line 197
  504.                         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'197$this->source); })()), "quantity", [], "any"falsefalsefalse197), 'errors');
  505.                         echo "
  506.                                             </div>
  507. ";
  508.                         // line 204
  509.                         echo "
  510. ";
  511.                         // line 209
  512.                         echo "
  513. ";
  514.                         // line 218
  515.                         echo "
  516. ";
  517.                         // line 223
  518.                         echo "
  519. ";
  520.                         // line 229
  521.                         echo "                                        </div>
  522.                                         ";
  523.                         // line 230
  524.                         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'230$this->source); })()), 'rest');
  525.                         echo "
  526.                                     </form>
  527.                                     <div class=\"ec-productRole__btn\">
  528.                                         <button type=\"submit\" class=\"ec-blockBtn--action add-cart\"
  529.                                                 data-cartid=\"";
  530.                         // line 234
  531.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse234), "html"nulltrue);
  532.                         echo "\" form=\"productForm";
  533.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse234), "html"nulltrue);
  534.                         echo "\">
  535.                                             ";
  536.                         // line 235
  537.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  538.                         echo "
  539.                                         </button>
  540.                                     </div>
  541.                                 </div>
  542.                             ";
  543.                     } else {
  544.                         // line 240
  545.                         echo "                                <div class=\"ec-productRole__btn\">
  546.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  547.                                         ";
  548.                         // line 242
  549.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  550.                         echo "
  551.                                     </button>
  552.                                 </div>
  553.                             ";
  554.                     }
  555.                     // line 246
  556.                     echo "                        </li>
  557.                     ";
  558.                     ++$context['loop']['index0'];
  559.                     ++$context['loop']['index'];
  560.                     $context['loop']['first'] = false;
  561.                     if (isset($context['loop']['length'])) {
  562.                         --$context['loop']['revindex0'];
  563.                         --$context['loop']['revindex'];
  564.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  565.                     }
  566.                 }
  567.                 $_parent $context['_parent'];
  568.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  569.                 $context array_intersect_key($context$_parent) + $_parent;
  570.                 // line 248
  571.                 echo "                </ul>
  572.             </div>
  573.             <div class=\"ec-modal\">
  574.                 <div class=\"ec-modal-overlay\">
  575.                     <div class=\"ec-modal-wrap\">
  576.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
  577.                                         src=\"";
  578.                 // line 254
  579.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  580.                 echo "\" alt=\"\"/></span></span>
  581.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  582.                 // line 255
  583.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  584.                 echo "</div>
  585.                         <div class=\"ec-modal-box\">
  586.                             <div class=\"ec-role\">
  587.                                 <span class=\"ec-inlineBtn--cancel\">";
  588.                 // line 258
  589.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  590.                 echo "</span>
  591.                                 <a href=\"";
  592.                 // line 259
  593.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  594.                 echo "\" class=\"ec-inlineBtn--action\">";
  595.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  596.                 echo "</a>
  597.                             </div>
  598.                         </div>
  599.                     </div>
  600.                 </div>
  601.             </div>
  602.             <div class=\"ec-pagerRole\">
  603.                 ";
  604.                 // line 266
  605.                 $this->loadTemplate("pager.twig""Product/list.twig"266)->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.'266$this->source); })()), "paginationData", [], "any"falsefalsefalse266)]));
  606.                 // line 267
  607.                 echo "            </div>
  608.         ";
  609.             }
  610.             // line 269
  611.             echo "    ";
  612.         }
  613.         // line 270
  614.         echo "    <script>
  615.         const font_names = [
  616.             { 'name': 'M PLUS Rounded 1c', 'weight': '400'},
  617.             { 'name': 'RocknRoll One', 'weight': '400'},
  618.             { 'name': 'Dela Gothic One', 'weight': '400'},
  619.             { 'name': 'M PLUS Rounded 1c', 'weight': '900'},
  620.             { 'name': 'Potta One', 'weight': '400'},
  621.             { 'name': 'Kaisei Tokumin', 'weight': '800'},
  622.             { 'name': 'M PLUS 1p', 'weight': '900'},
  623.             { 'name': 'Hachi Maru Pop', 'weight': '400'},
  624.         ];
  625.         font_names.map(  (item) => {
  626.              uchiwaGetFont( item.name );
  627.         })
  628.         async function uchiwaGetFont(fontName) {
  629.             const urlFamilyName = fontName.replace(/ /g, \"+\");
  630.             const googleApiUrl = `https://fonts.googleapis.com/css?family=\${urlFamilyName}`;
  631.             const response = await fetch(googleApiUrl);
  632.             if (response.ok) {
  633.                 // url()の中身のURLだけ抽出
  634.                 const cssFontFace = await response.text();
  635.                 const matchUrls = cssFontFace.match(/url\\(.+?\\)/g);
  636.                 if (!matchUrls) throw new Error(\"フォントが見つかりませんでした\");
  637.                 for (const url of matchUrls) {
  638.                     const font = new FontFace(fontName, url);
  639.                     await font.load();
  640.                     document.fonts.add(font);
  641.                 }
  642.                 // console.log('get font : ', fontName)
  643.             } else {
  644.                 console.log('error get font fetch', response);
  645.             }
  646.         }
  647.     </script>
  648. ";
  649.         
  650.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  651.         
  652.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  653.     }
  654.     public function getTemplateName()
  655.     {
  656.         return "Product/list.twig";
  657.     }
  658.     public function isTraitable()
  659.     {
  660.         return false;
  661.     }
  662.     public function getDebugInfo()
  663.     {
  664.         return array (  642 => 270,  639 => 269,  635 => 267,  633 => 266,  621 => 259,  617 => 258,  611 => 255,  607 => 254,  599 => 248,  584 => 246,  577 => 242,  573 => 240,  565 => 235,  559 => 234,  552 => 230,  549 => 229,  546 => 223,  543 => 218,  540 => 209,  537 => 204,  532 => 197,  528 => 196,  523 => 195,  520 => 194,  514 => 191,  510 => 190,  507 => 189,  505 => 188,  500 => 186,  496 => 185,  493 => 184,  491 => 183,  486 => 181,  479 => 180,  477 => 179,  474 => 178,  472 => 177,  467 => 174,  461 => 172,  458 => 171,  450 => 169,  444 => 167,  441 => 166,  439 => 165,  436 => 164,  430 => 162,  428 => 161,  424 => 160,  415 => 158,  411 => 157,  406 => 155,  403 => 154,  386 => 153,  382 => 151,  380 => 150,  376 => 148,  369 => 144,  365 => 143,  361 => 141,  359 => 140,  356 => 139,  350 => 137,  344 => 135,  342 => 134,  336 => 130,  331 => 128,  328 => 127,  325 => 126,  322 => 125,  301 => 122,  295 => 121,  292 => 120,  274 => 119,  272 => 118,  265 => 116,  260 => 113,  248 => 111,  244 => 110,  239 => 109,  235 => 108,  231 => 106,  225 => 103,  222 => 102,  219 => 101,  209 => 100,  182 => 82,  172 => 75,  141 => 47,  113 => 21,  93 => 19,  76 => 18,  72 => 16,  62 => 15,  51 => 11,  49 => 13,  36 => 11,);
  665.     }
  666.     public function getSourceContext()
  667.     {
  668.         return new Source("{#
  669. This file is part of EC-CUBE
  670. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  671. http://www.ec-cube.co.jp/
  672. For the full copyright and license information, please view the LICENSE
  673. file that was distributed with this source code.
  674. #}
  675. {% extends 'default_frame.twig' %}
  676. {% set body_class = 'product_page' %}
  677. {% block javascript %}
  678. <script>
  679.     eccube.productsClassCategories = {
  680. {% for Product in pagination %}
  681. \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  682. {% endfor %}
  683. };
  684. \$(function() {
  685. // 表示件数を変更
  686. \$('.disp-number').change(function() {
  687.     var dispNumber = \$(this).val();
  688.     \$('#disp_number').val(dispNumber);
  689.     \$('#pageno').val(1);
  690.     \$(\"#form1\").submit();
  691. });
  692. // 並び順を変更
  693. \$('.order-by').change(function() {
  694.     var orderBy = \$(this).val();
  695.     \$('#orderby').val(orderBy);
  696.     \$('#pageno').val(1);
  697.     \$(\"#form1\").submit();
  698. });
  699. \$('.add-cart').on('click', function(e) {
  700.     var \$form = \$(this).parents('li').find('form');
  701.     // 個数フォームのチェック
  702.     var \$quantity = \$form.parent().find('.quantity');
  703.     if (\$quantity.val() < 1) {
  704.         \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  705.         setTimeout(function() {
  706.             loadingOverlay('hide');
  707.         }, 100);
  708.         return true;
  709.     } else {
  710.         \$quantity[0].setCustomValidity('');
  711.     }
  712.     e.preventDefault();
  713.     \$.ajax({
  714.         url: \$form.attr('action'),
  715.         type: \$form.attr('method'),
  716.         data: \$form.serialize(),
  717.         dataType: 'json',
  718.         beforeSend: function(xhr, settings) {
  719.             // Buttonを無効にする
  720.             \$('.add-cart').prop('disabled', true);
  721.         }
  722.     }).done(function(data) {
  723.         // レスポンス内のメッセージをalertで表示
  724.         \$.each(data.messages, function() {
  725.             \$('#ec-modal-header').text(this);
  726.         });
  727.         \$('.ec-modal').show()
  728.         // カートブロックを更新する
  729.         \$.ajax({
  730.             url: '{{ url('block_cart') }}',
  731.             type: 'GET',
  732.             dataType: 'html'
  733.         }).done(function(html) {
  734.             \$('.ec-headerRole__cart').html(html);
  735.         });
  736.     }).fail(function(data) {
  737.         alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  738.     }).always(function(data) {
  739.         // Buttonを有効にする
  740.         \$('.add-cart').prop('disabled', false);
  741.     });
  742. });
  743. });
  744. \$('.ec-modal-wrap').on('click', function(e) {
  745. // モーダル内の処理は外側にバブリングさせない
  746. e.stopPropagation();
  747. });
  748. \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  749. \$('.ec-modal').hide()
  750. });
  751. </script>
  752. {% endblock %}
  753. {% block main %}
  754.     {% if search_form.category_id.vars.errors|length > 0 %}
  755.         <div class=\"ec-searchnavRole\">
  756.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  757.         </div>
  758.     {% else %}
  759.         <div class=\"ec-searchnavRole\">
  760.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  761.                 {% for item in search_form %}
  762.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  763.                            name=\"{{ item.vars.full_name }}\"
  764.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  765.                 {% endfor %}
  766.             </form>
  767.             <div class=\"ec-searchnavRole__topicpath\">
  768.                 <ol class=\"ec-topicpath\">
  769.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
  770.                     </li>
  771.                     {% if Category is not null %}
  772.                         {% for Path in Category.path %}
  773.                             <li class=\"ec-topicpath__divider\">|</li>
  774.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  775.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  776.                             </li>
  777.                         {% endfor %}
  778.                     {% endif %}
  779.                     {% if search_form.vars.value and search_form.vars.value.name %}
  780.                         <li class=\"ec-topicpath__divider\">|</li>
  781.                         <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  782.                     {% endif %}
  783.                 </ol>
  784.             </div>
  785.             <div class=\"ec-searchnavRole__infos\">
  786.                 <div class=\"ec-searchnavRole__counter\">
  787.                     {% if pagination.totalItemCount > 0 %}
  788.                         {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  789.                     {% else %}
  790.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  791.                     {% endif %}
  792.                 </div>
  793.                 {% if pagination.totalItemCount > 0 %}
  794.                     <div class=\"ec-searchnavRole__actions\">
  795.                         <div class=\"ec-select\">
  796.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  797.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  798.                         </div>
  799.                     </div>
  800.                 {% endif %}
  801.             </div>
  802.         </div>
  803.         {% if pagination.totalItemCount > 0 %}
  804.             <div class=\"ec-shelfRole\">
  805.                 <ul class=\"ec-shelfGrid\">
  806.                     {% for Product in pagination %}
  807.                         <li class=\"ec-shelfGrid__item\">
  808.                             <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  809.                                 <p class=\"ec-shelfGrid__item-image\">
  810.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\"
  811.                                          alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
  812.                                 </p>
  813.                                 <p>{{ Product.name }}</p>
  814.                                 {% if Product.description_list %}
  815.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  816.                                 {% endif %}
  817.                                 <p class=\"price02-default\">
  818.                                     {% if Product.hasProductClass %}
  819.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  820.                                             {{ Product.getPrice02IncTaxMin|price }}
  821.                                         {% else %}
  822.                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  823.                                         {% endif %}
  824.                                     {% else %}
  825.                                         {{ Product.getPrice02IncTaxMin|price }}
  826.                                     {% endif %}
  827.                                 </p>
  828.                             </a>
  829.                             {% if Product.stock_find %}
  830.                                 <div style=\"display:none;\">
  831.                                     {% set form = forms[Product.id] %}
  832.                                     <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\"
  833.                                           action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  834.                                         <div class=\"ec-productRole__actions\">
  835.                                             {% if form.classcategory_id1 is defined %}
  836.                                                 <div class=\"ec-select\">
  837.                                                     {{ form_widget(form.classcategory_id1) }}
  838.                                                     {{ form_errors(form.classcategory_id1) }}
  839.                                                 </div>
  840.                                                 {% if form.classcategory_id2 is defined %}
  841.                                                     <div class=\"ec-select\">
  842.                                                         {{ form_widget(form.classcategory_id2) }}
  843.                                                         {{ form_errors(form.classcategory_id2) }}
  844.                                                     </div>
  845.                                                 {% endif %}
  846.                                             {% endif %}
  847.                                             <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  848.                                                 {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  849.                                                 {{ form_errors(form.quantity) }}
  850.                                             </div>
  851. {#                                            <div style=\"display:none;\">#}
  852. {#                                                <div class=\"ec-numberInput\"><span>上文字</span>#}
  853. {#                                                    {{ form_widget(form.order_text1) }}#}
  854. {#                                                    {{ form_errors(form.order_text1) }}#}
  855. {#                                                </div>#}
  856. {#                                                <div class=\"ec-numberInput\"><span>文字</span>#}
  857. {#                                                    {{ form_widget(form.order_text2) }}#}
  858. {#                                                    {{ form_errors(form.order_text2) }}#}
  859. {#                                                </div>#}
  860. {#                                                <div class=\"ec-numberInput\"><span>下文字</span>#}
  861. {#                                                    {{ form_widget(form.order_text3) }}#}
  862. {#                                                    {{ form_errors(form.order_text3) }}#}
  863. {#                                                </div>#}
  864. {#                                                <div class=\"ec-numberInput\"><span>外枠の色</span>#}
  865. {#                                                    {{ form_widget(form.order_color1) }}#}
  866. {#                                                    {{ form_errors(form.order_color1) }}#}
  867. {#                                                </div>#}
  868. {#                                                <div class=\"ec-numberInput\"><span>文字の色</span>#}
  869. {#                                                    {{ form_widget(form.order_color2) }}#}
  870. {#                                                    {{ form_errors(form.order_color2) }}#}
  871. {#                                                </div>#}
  872. {#                                                <div class=\"ec-numberInput\"><span>書体</span>#}
  873. {#                                                    {{ form_widget(form.order_font) }}#}
  874. {#                                                    {{ form_errors(form.order_font) }}#}
  875. {#                                                </div>#}
  876. {#                                            </div>#}
  877.                                         </div>
  878.                                         {{ form_rest(form) }}
  879.                                     </form>
  880.                                     <div class=\"ec-productRole__btn\">
  881.                                         <button type=\"submit\" class=\"ec-blockBtn--action add-cart\"
  882.                                                 data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  883.                                             {{ 'カートに入れる'|trans }}
  884.                                         </button>
  885.                                     </div>
  886.                                 </div>
  887.                             {% else %}
  888.                                 <div class=\"ec-productRole__btn\">
  889.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  890.                                         {{ 'ただいま品切れ中です。'|trans }}
  891.                                     </button>
  892.                                 </div>
  893.                             {% endif %}
  894.                         </li>
  895.                     {% endfor %}
  896.                 </ul>
  897.             </div>
  898.             <div class=\"ec-modal\">
  899.                 <div class=\"ec-modal-overlay\">
  900.                     <div class=\"ec-modal-wrap\">
  901.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
  902.                                         src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  903.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  904.                         <div class=\"ec-modal-box\">
  905.                             <div class=\"ec-role\">
  906.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  907.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  908.                             </div>
  909.                         </div>
  910.                     </div>
  911.                 </div>
  912.             </div>
  913.             <div class=\"ec-pagerRole\">
  914.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  915.             </div>
  916.         {% endif %}
  917.     {% endif %}
  918.     <script>
  919.         const font_names = [
  920.             { 'name': 'M PLUS Rounded 1c', 'weight': '400'},
  921.             { 'name': 'RocknRoll One', 'weight': '400'},
  922.             { 'name': 'Dela Gothic One', 'weight': '400'},
  923.             { 'name': 'M PLUS Rounded 1c', 'weight': '900'},
  924.             { 'name': 'Potta One', 'weight': '400'},
  925.             { 'name': 'Kaisei Tokumin', 'weight': '800'},
  926.             { 'name': 'M PLUS 1p', 'weight': '900'},
  927.             { 'name': 'Hachi Maru Pop', 'weight': '400'},
  928.         ];
  929.         font_names.map(  (item) => {
  930.              uchiwaGetFont( item.name );
  931.         })
  932.         async function uchiwaGetFont(fontName) {
  933.             const urlFamilyName = fontName.replace(/ /g, \"+\");
  934.             const googleApiUrl = `https://fonts.googleapis.com/css?family=\${urlFamilyName}`;
  935.             const response = await fetch(googleApiUrl);
  936.             if (response.ok) {
  937.                 // url()の中身のURLだけ抽出
  938.                 const cssFontFace = await response.text();
  939.                 const matchUrls = cssFontFace.match(/url\\(.+?\\)/g);
  940.                 if (!matchUrls) throw new Error(\"フォントが見つかりませんでした\");
  941.                 for (const url of matchUrls) {
  942.                     const font = new FontFace(fontName, url);
  943.                     await font.load();
  944.                     document.fonts.add(font);
  945.                 }
  946.                 // console.log('get font : ', fontName)
  947.             } else {
  948.                 console.log('error get font fetch', response);
  949.             }
  950.         }
  951.     </script>
  952. {% endblock %}
  953. ""Product/list.twig""/home/atplus4/mirai-kanban.com/public_html/ecshop/app/template/default/Product/list.twig");
  954.     }
  955. }