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.                                             <div style=\"display:none;\">
  508.                                                 <div class=\"ec-numberInput\"><span>上文字</span>
  509.                                                     ";
  510.                         // line 201
  511.                         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.'201$this->source); })()), "order_text1", [], "any"falsefalsefalse201), 'widget');
  512.                         echo "
  513.                                                     ";
  514.                         // line 202
  515.                         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.'202$this->source); })()), "order_text1", [], "any"falsefalsefalse202), 'errors');
  516.                         echo "
  517.                                                 </div>
  518.                                                 <div class=\"ec-numberInput\"><span>文字</span>
  519.                                                     ";
  520.                         // line 206
  521.                         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.'206$this->source); })()), "order_text2", [], "any"falsefalsefalse206), 'widget');
  522.                         echo "
  523.                                                     ";
  524.                         // line 207
  525.                         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.'207$this->source); })()), "order_text2", [], "any"falsefalsefalse207), 'errors');
  526.                         echo "
  527.                                                 </div>
  528.                                                 <div class=\"ec-numberInput\"><span>下文字</span>
  529.                                                     ";
  530.                         // line 211
  531.                         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.'211$this->source); })()), "order_text3", [], "any"falsefalsefalse211), 'widget');
  532.                         echo "
  533.                                                     ";
  534.                         // line 212
  535.                         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.'212$this->source); })()), "order_text3", [], "any"falsefalsefalse212), 'errors');
  536.                         echo "
  537.                                                 </div>
  538.                                                 <div class=\"ec-numberInput\"><span>外枠の色</span>
  539.                                                     ";
  540.                         // line 215
  541.                         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.'215$this->source); })()), "order_color1", [], "any"falsefalsefalse215), 'widget');
  542.                         echo "
  543.                                                     ";
  544.                         // line 216
  545.                         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.'216$this->source); })()), "order_color1", [], "any"falsefalsefalse216), 'errors');
  546.                         echo "
  547.                                                 </div>
  548.                                                 <div class=\"ec-numberInput\"><span>文字の色</span>
  549.                                                     ";
  550.                         // line 220
  551.                         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.'220$this->source); })()), "order_color2", [], "any"falsefalsefalse220), 'widget');
  552.                         echo "
  553.                                                     ";
  554.                         // line 221
  555.                         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.'221$this->source); })()), "order_color2", [], "any"falsefalsefalse221), 'errors');
  556.                         echo "
  557.                                                 </div>
  558.                                                 <div class=\"ec-numberInput\"><span>書体</span>
  559.                                                     ";
  560.                         // line 225
  561.                         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.'225$this->source); })()), "order_font", [], "any"falsefalsefalse225), 'widget');
  562.                         echo "
  563.                                                     ";
  564.                         // line 226
  565.                         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.'226$this->source); })()), "order_font", [], "any"falsefalsefalse226), 'errors');
  566.                         echo "
  567.                                                 </div>
  568.                                             </div>
  569.                                         </div>
  570.                                         ";
  571.                         // line 230
  572.                         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');
  573.                         echo "
  574.                                     </form>
  575.                                     <div class=\"ec-productRole__btn\">
  576.                                         <button type=\"submit\" class=\"ec-blockBtn--action add-cart\"
  577.                                                 data-cartid=\"";
  578.                         // line 234
  579.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse234), "html"nulltrue);
  580.                         echo "\" form=\"productForm";
  581.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse234), "html"nulltrue);
  582.                         echo "\">
  583.                                             ";
  584.                         // line 235
  585.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  586.                         echo "
  587.                                         </button>
  588.                                     </div>
  589.                                 </div>
  590.                             ";
  591.                     } else {
  592.                         // line 240
  593.                         echo "                                <div class=\"ec-productRole__btn\">
  594.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  595.                                         ";
  596.                         // line 242
  597.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  598.                         echo "
  599.                                     </button>
  600.                                 </div>
  601.                             ";
  602.                     }
  603.                     // line 246
  604.                     echo "                        </li>
  605.                     ";
  606.                     ++$context['loop']['index0'];
  607.                     ++$context['loop']['index'];
  608.                     $context['loop']['first'] = false;
  609.                     if (isset($context['loop']['length'])) {
  610.                         --$context['loop']['revindex0'];
  611.                         --$context['loop']['revindex'];
  612.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  613.                     }
  614.                 }
  615.                 $_parent $context['_parent'];
  616.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  617.                 $context array_intersect_key($context$_parent) + $_parent;
  618.                 // line 248
  619.                 echo "                </ul>
  620.             </div>
  621.             <div class=\"ec-modal\">
  622.                 <div class=\"ec-modal-overlay\">
  623.                     <div class=\"ec-modal-wrap\">
  624.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
  625.                                         src=\"";
  626.                 // line 254
  627.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  628.                 echo "\" alt=\"\"/></span></span>
  629.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  630.                 // line 255
  631.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  632.                 echo "</div>
  633.                         <div class=\"ec-modal-box\">
  634.                             <div class=\"ec-role\">
  635.                                 <span class=\"ec-inlineBtn--cancel\">";
  636.                 // line 258
  637.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  638.                 echo "</span>
  639.                                 <a href=\"";
  640.                 // line 259
  641.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  642.                 echo "\" class=\"ec-inlineBtn--action\">";
  643.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  644.                 echo "</a>
  645.                             </div>
  646.                         </div>
  647.                     </div>
  648.                 </div>
  649.             </div>
  650.             <div class=\"ec-pagerRole\">
  651.                 ";
  652.                 // line 266
  653.                 $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)]));
  654.                 // line 267
  655.                 echo "            </div>
  656.         ";
  657.             }
  658.             // line 269
  659.             echo "    ";
  660.         }
  661.         // line 270
  662.         echo "    <script>
  663.         const font_names = [
  664.             { 'name': 'M PLUS Rounded 1c', 'weight': '400'},
  665.             { 'name': 'RocknRoll One', 'weight': '400'},
  666.             { 'name': 'Dela Gothic One', 'weight': '400'},
  667.             { 'name': 'M PLUS Rounded 1c', 'weight': '900'},
  668.             { 'name': 'Potta One', 'weight': '400'},
  669.             { 'name': 'Kaisei Tokumin', 'weight': '800'},
  670.             { 'name': 'M PLUS 1p', 'weight': '900'},
  671.             { 'name': 'Hachi Maru Pop', 'weight': '400'},
  672.         ];
  673.         font_names.map(  (item) => {
  674.              uchiwaGetFont( item.name );
  675.         })
  676.         async function uchiwaGetFont(fontName) {
  677.             const urlFamilyName = fontName.replace(/ /g, \"+\");
  678.             const googleApiUrl = `https://fonts.googleapis.com/css?family=\${urlFamilyName}`;
  679.             const response = await fetch(googleApiUrl);
  680.             if (response.ok) {
  681.                 // url()の中身のURLだけ抽出
  682.                 const cssFontFace = await response.text();
  683.                 const matchUrls = cssFontFace.match(/url\\(.+?\\)/g);
  684.                 if (!matchUrls) throw new Error(\"フォントが見つかりませんでした\");
  685.                 for (const url of matchUrls) {
  686.                     const font = new FontFace(fontName, url);
  687.                     await font.load();
  688.                     document.fonts.add(font);
  689.                 }
  690.                 // console.log('get font : ', fontName)
  691.             } else {
  692.                 console.log('error get font fetch', response);
  693.             }
  694.         }
  695.     </script>
  696. ";
  697.         
  698.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  699.         
  700.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  701.     }
  702.     public function getTemplateName()
  703.     {
  704.         return "Product/list.twig";
  705.     }
  706.     public function isTraitable()
  707.     {
  708.         return false;
  709.     }
  710.     public function getDebugInfo()
  711.     {
  712.         return array (  694 => 270,  691 => 269,  687 => 267,  685 => 266,  673 => 259,  669 => 258,  663 => 255,  659 => 254,  651 => 248,  636 => 246,  629 => 242,  625 => 240,  617 => 235,  611 => 234,  604 => 230,  597 => 226,  593 => 225,  586 => 221,  582 => 220,  575 => 216,  571 => 215,  565 => 212,  561 => 211,  554 => 207,  550 => 206,  543 => 202,  539 => 201,  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,);
  713.     }
  714.     public function getSourceContext()
  715.     {
  716.         return new Source("{#
  717. This file is part of EC-CUBE
  718. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  719. http://www.ec-cube.co.jp/
  720. For the full copyright and license information, please view the LICENSE
  721. file that was distributed with this source code.
  722. #}
  723. {% extends 'default_frame.twig' %}
  724. {% set body_class = 'product_page' %}
  725. {% block javascript %}
  726. <script>
  727.     eccube.productsClassCategories = {
  728. {% for Product in pagination %}
  729. \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  730. {% endfor %}
  731. };
  732. \$(function() {
  733. // 表示件数を変更
  734. \$('.disp-number').change(function() {
  735.     var dispNumber = \$(this).val();
  736.     \$('#disp_number').val(dispNumber);
  737.     \$('#pageno').val(1);
  738.     \$(\"#form1\").submit();
  739. });
  740. // 並び順を変更
  741. \$('.order-by').change(function() {
  742.     var orderBy = \$(this).val();
  743.     \$('#orderby').val(orderBy);
  744.     \$('#pageno').val(1);
  745.     \$(\"#form1\").submit();
  746. });
  747. \$('.add-cart').on('click', function(e) {
  748.     var \$form = \$(this).parents('li').find('form');
  749.     // 個数フォームのチェック
  750.     var \$quantity = \$form.parent().find('.quantity');
  751.     if (\$quantity.val() < 1) {
  752.         \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  753.         setTimeout(function() {
  754.             loadingOverlay('hide');
  755.         }, 100);
  756.         return true;
  757.     } else {
  758.         \$quantity[0].setCustomValidity('');
  759.     }
  760.     e.preventDefault();
  761.     \$.ajax({
  762.         url: \$form.attr('action'),
  763.         type: \$form.attr('method'),
  764.         data: \$form.serialize(),
  765.         dataType: 'json',
  766.         beforeSend: function(xhr, settings) {
  767.             // Buttonを無効にする
  768.             \$('.add-cart').prop('disabled', true);
  769.         }
  770.     }).done(function(data) {
  771.         // レスポンス内のメッセージをalertで表示
  772.         \$.each(data.messages, function() {
  773.             \$('#ec-modal-header').text(this);
  774.         });
  775.         \$('.ec-modal').show()
  776.         // カートブロックを更新する
  777.         \$.ajax({
  778.             url: '{{ url('block_cart') }}',
  779.             type: 'GET',
  780.             dataType: 'html'
  781.         }).done(function(html) {
  782.             \$('.ec-headerRole__cart').html(html);
  783.         });
  784.     }).fail(function(data) {
  785.         alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  786.     }).always(function(data) {
  787.         // Buttonを有効にする
  788.         \$('.add-cart').prop('disabled', false);
  789.     });
  790. });
  791. });
  792. \$('.ec-modal-wrap').on('click', function(e) {
  793. // モーダル内の処理は外側にバブリングさせない
  794. e.stopPropagation();
  795. });
  796. \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  797. \$('.ec-modal').hide()
  798. });
  799. </script>
  800. {% endblock %}
  801. {% block main %}
  802.     {% if search_form.category_id.vars.errors|length > 0 %}
  803.         <div class=\"ec-searchnavRole\">
  804.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  805.         </div>
  806.     {% else %}
  807.         <div class=\"ec-searchnavRole\">
  808.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  809.                 {% for item in search_form %}
  810.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  811.                            name=\"{{ item.vars.full_name }}\"
  812.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  813.                 {% endfor %}
  814.             </form>
  815.             <div class=\"ec-searchnavRole__topicpath\">
  816.                 <ol class=\"ec-topicpath\">
  817.                     <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a>
  818.                     </li>
  819.                     {% if Category is not null %}
  820.                         {% for Path in Category.path %}
  821.                             <li class=\"ec-topicpath__divider\">|</li>
  822.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  823.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  824.                             </li>
  825.                         {% endfor %}
  826.                     {% endif %}
  827.                     {% if search_form.vars.value and search_form.vars.value.name %}
  828.                         <li class=\"ec-topicpath__divider\">|</li>
  829.                         <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>
  830.                     {% endif %}
  831.                 </ol>
  832.             </div>
  833.             <div class=\"ec-searchnavRole__infos\">
  834.                 <div class=\"ec-searchnavRole__counter\">
  835.                     {% if pagination.totalItemCount > 0 %}
  836.                         {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  837.                     {% else %}
  838.                         <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>
  839.                     {% endif %}
  840.                 </div>
  841.                 {% if pagination.totalItemCount > 0 %}
  842.                     <div class=\"ec-searchnavRole__actions\">
  843.                         <div class=\"ec-select\">
  844.                             {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  845.                             {{ form_widget(search_form.orderby, {'id': '', 'attr': {'class': 'order-by'}}) }}
  846.                         </div>
  847.                     </div>
  848.                 {% endif %}
  849.             </div>
  850.         </div>
  851.         {% if pagination.totalItemCount > 0 %}
  852.             <div class=\"ec-shelfRole\">
  853.                 <ul class=\"ec-shelfGrid\">
  854.                     {% for Product in pagination %}
  855.                         <li class=\"ec-shelfGrid__item\">
  856.                             <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  857.                                 <p class=\"ec-shelfGrid__item-image\">
  858.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\"
  859.                                          alt=\"{{ Product.name }}\" {% if loop.index > 5 %} loading=\"lazy\"{% endif %}>
  860.                                 </p>
  861.                                 <p>{{ Product.name }}</p>
  862.                                 {% if Product.description_list %}
  863.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  864.                                 {% endif %}
  865.                                 <p class=\"price02-default\">
  866.                                     {% if Product.hasProductClass %}
  867.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  868.                                             {{ Product.getPrice02IncTaxMin|price }}
  869.                                         {% else %}
  870.                                             {{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}
  871.                                         {% endif %}
  872.                                     {% else %}
  873.                                         {{ Product.getPrice02IncTaxMin|price }}
  874.                                     {% endif %}
  875.                                 </p>
  876.                             </a>
  877.                             {% if Product.stock_find %}
  878.                                 <div style=\"display:none;\">
  879.                                     {% set form = forms[Product.id] %}
  880.                                     <form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\"
  881.                                           action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">
  882.                                         <div class=\"ec-productRole__actions\">
  883.                                             {% if form.classcategory_id1 is defined %}
  884.                                                 <div class=\"ec-select\">
  885.                                                     {{ form_widget(form.classcategory_id1) }}
  886.                                                     {{ form_errors(form.classcategory_id1) }}
  887.                                                 </div>
  888.                                                 {% if form.classcategory_id2 is defined %}
  889.                                                     <div class=\"ec-select\">
  890.                                                         {{ form_widget(form.classcategory_id2) }}
  891.                                                         {{ form_errors(form.classcategory_id2) }}
  892.                                                     </div>
  893.                                                 {% endif %}
  894.                                             {% endif %}
  895.                                             <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  896.                                                 {{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}
  897.                                                 {{ form_errors(form.quantity) }}
  898.                                             </div>
  899.                                             <div style=\"display:none;\">
  900.                                                 <div class=\"ec-numberInput\"><span>上文字</span>
  901.                                                     {{ form_widget(form.order_text1) }}
  902.                                                     {{ form_errors(form.order_text1) }}
  903.                                                 </div>
  904.                                                 <div class=\"ec-numberInput\"><span>文字</span>
  905.                                                     {{ form_widget(form.order_text2) }}
  906.                                                     {{ form_errors(form.order_text2) }}
  907.                                                 </div>
  908.                                                 <div class=\"ec-numberInput\"><span>下文字</span>
  909.                                                     {{ form_widget(form.order_text3) }}
  910.                                                     {{ form_errors(form.order_text3) }}
  911.                                                 </div>
  912.                                                 <div class=\"ec-numberInput\"><span>外枠の色</span>
  913.                                                     {{ form_widget(form.order_color1) }}
  914.                                                     {{ form_errors(form.order_color1) }}
  915.                                                 </div>
  916.                                                 <div class=\"ec-numberInput\"><span>文字の色</span>
  917.                                                     {{ form_widget(form.order_color2) }}
  918.                                                     {{ form_errors(form.order_color2) }}
  919.                                                 </div>
  920.                                                 <div class=\"ec-numberInput\"><span>書体</span>
  921.                                                     {{ form_widget(form.order_font) }}
  922.                                                     {{ form_errors(form.order_font) }}
  923.                                                 </div>
  924.                                             </div>
  925.                                         </div>
  926.                                         {{ form_rest(form) }}
  927.                                     </form>
  928.                                     <div class=\"ec-productRole__btn\">
  929.                                         <button type=\"submit\" class=\"ec-blockBtn--action add-cart\"
  930.                                                 data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">
  931.                                             {{ 'カートに入れる'|trans }}
  932.                                         </button>
  933.                                     </div>
  934.                                 </div>
  935.                             {% else %}
  936.                                 <div class=\"ec-productRole__btn\">
  937.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  938.                                         {{ 'ただいま品切れ中です。'|trans }}
  939.                                     </button>
  940.                                 </div>
  941.                             {% endif %}
  942.                         </li>
  943.                     {% endfor %}
  944.                 </ul>
  945.             </div>
  946.             <div class=\"ec-modal\">
  947.                 <div class=\"ec-modal-overlay\">
  948.                     <div class=\"ec-modal-wrap\">
  949.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img
  950.                                         src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  951.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  952.                         <div class=\"ec-modal-box\">
  953.                             <div class=\"ec-role\">
  954.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  955.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  956.                             </div>
  957.                         </div>
  958.                     </div>
  959.                 </div>
  960.             </div>
  961.             <div class=\"ec-pagerRole\">
  962.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  963.             </div>
  964.         {% endif %}
  965.     {% endif %}
  966.     <script>
  967.         const font_names = [
  968.             { 'name': 'M PLUS Rounded 1c', 'weight': '400'},
  969.             { 'name': 'RocknRoll One', 'weight': '400'},
  970.             { 'name': 'Dela Gothic One', 'weight': '400'},
  971.             { 'name': 'M PLUS Rounded 1c', 'weight': '900'},
  972.             { 'name': 'Potta One', 'weight': '400'},
  973.             { 'name': 'Kaisei Tokumin', 'weight': '800'},
  974.             { 'name': 'M PLUS 1p', 'weight': '900'},
  975.             { 'name': 'Hachi Maru Pop', 'weight': '400'},
  976.         ];
  977.         font_names.map(  (item) => {
  978.              uchiwaGetFont( item.name );
  979.         })
  980.         async function uchiwaGetFont(fontName) {
  981.             const urlFamilyName = fontName.replace(/ /g, \"+\");
  982.             const googleApiUrl = `https://fonts.googleapis.com/css?family=\${urlFamilyName}`;
  983.             const response = await fetch(googleApiUrl);
  984.             if (response.ok) {
  985.                 // url()の中身のURLだけ抽出
  986.                 const cssFontFace = await response.text();
  987.                 const matchUrls = cssFontFace.match(/url\\(.+?\\)/g);
  988.                 if (!matchUrls) throw new Error(\"フォントが見つかりませんでした\");
  989.                 for (const url of matchUrls) {
  990.                     const font = new FontFace(fontName, url);
  991.                     await font.load();
  992.                     document.fonts.add(font);
  993.                 }
  994.                 // console.log('get font : ', fontName)
  995.             } else {
  996.                 console.log('error get font fetch', response);
  997.             }
  998.         }
  999.     </script>
  1000. {% endblock %}
  1001. ""Product/list.twig""/home/atplus4/mirai-kanban.com/public_html/ecshop/app/template/default/Product/list.twig");
  1002.     }
  1003. }