var/cache/dev/twig/7b/7b425d07aa3cc6aae98cf8c78efbdf4b2cca8f256dca2e95e05eb128f82f1d15.php line 97

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_7720358583a040f82df7b87026608a884caa958bf558c648b7b738cecd123884 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 40
  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 12
  40.         $context["sidbar_out"] = false;
  41.         // line 13
  42.         $context["sidebar_type"] = 0;
  43.         // line 16
  44.         if (array_key_exists("Category"$context)) {
  45.             // line 17
  46.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'17$this->source); })()))) {
  47.                 // line 18
  48.                 $context['_parent'] = $context;
  49.                 $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.'18$this->source); })()), "path", [], "any"falsefalsefalse18));
  50.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  51.                     // line 19
  52.                     if ((twig_get_attribute($this->env$this->source$context["Path"], "hierarchy", [], "any"falsefalsefalse19) == 1)) {
  53.                         // line 20
  54.                         if ((twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse20) == "部品")) {
  55.                             // line 21
  56.                             $context["sidebar_type"] = 1;
  57.                             // line 22
  58.                             $context["sidbar_out"] = true;
  59.                         }
  60.                         // line 24
  61.                         if ((twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse24) == "カートリッジ")) {
  62.                             // line 25
  63.                             $context["sidebar_type"] = 2;
  64.                             // line 26
  65.                             $context["sidbar_out"] = true;
  66.                         }
  67.                         // line 28
  68.                         if ((twig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse28) == "取付工事")) {
  69.                             // line 29
  70.                             $context["sidebar_type"] = 3;
  71.                             // line 30
  72.                             $context["sidbar_out"] = true;
  73.                         }
  74.                     }
  75.                 }
  76.                 $_parent $context['_parent'];
  77.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  78.                 $context array_intersect_key($context$_parent) + $_parent;
  79.             } else {
  80.                 // line 35
  81.                 $context["sidebar_type"] = 999;
  82.             }
  83.         }
  84.         // line 42
  85.         $context["body_class"] = "product_page";
  86.         // line 40
  87.         $this->parent $this->loadTemplate("default_frame.twig""Product/list.twig"40);
  88.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  89.         
  90.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  91.         
  92.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  93.     }
  94.     // line 44
  95.     public function block_javascript($context, array $blocks = [])
  96.     {
  97.         $macros $this->macros;
  98.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  99.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  100.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  101.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  102.         // line 45
  103.         echo "    <script>
  104.         eccube.productsClassCategories = {
  105.             ";
  106.         // line 47
  107.         $context['_parent'] = $context;
  108.         $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'47$this->source); })()));
  109.         $context['loop'] = [
  110.           'parent' => $context['_parent'],
  111.           'index0' => 0,
  112.           'index'  => 1,
  113.           'first'  => true,
  114.         ];
  115.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  116.             $length count($context['_seq']);
  117.             $context['loop']['revindex0'] = $length 1;
  118.             $context['loop']['revindex'] = $length;
  119.             $context['loop']['length'] = $length;
  120.             $context['loop']['last'] = === $length;
  121.         }
  122.         foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  123.             // line 48
  124.             echo "            \"";
  125.             echo twig_escape_filter($this->envtwig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "id", [], "any"falsefalsefalse48), "js"), "html"nulltrue);
  126.             echo "\": ";
  127.             echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($context["Product"]);
  128.             if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse48) == false)) {
  129.                 echo ", ";
  130.             }
  131.             // line 49
  132.             echo "            ";
  133.             ++$context['loop']['index0'];
  134.             ++$context['loop']['index'];
  135.             $context['loop']['first'] = false;
  136.             if (isset($context['loop']['length'])) {
  137.                 --$context['loop']['revindex0'];
  138.                 --$context['loop']['revindex'];
  139.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  140.             }
  141.         }
  142.         $_parent $context['_parent'];
  143.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  144.         $context array_intersect_key($context$_parent) + $_parent;
  145.         // line 50
  146.         echo "        };
  147.         \$(function() {
  148.             // 表示件数を変更
  149.             \$('.disp-number').change(function() {
  150.                 var dispNumber = \$(this).val();
  151.                 \$('#disp_number').val(dispNumber);
  152.                 \$('#pageno').val(1);
  153.                 \$(\"#form1\").submit();
  154.             });
  155.             // 並び順を変更
  156.             \$('.order-by').change(function() {
  157.                 var orderBy = \$(this).val();
  158.                 \$('#orderby').val(orderBy);
  159.                 \$('#pageno').val(1);
  160.                 \$(\"#form1\").submit();
  161.             });
  162.             \$('.add-cart').on('click', function(e) {
  163.                 var \$form = \$(this).parents('li').find('form');
  164.                 // 個数フォームのチェック
  165.                 var \$quantity = \$form.parent().find('.quantity');
  166.                 if (\$quantity.val() < 1) {
  167.                     \$quantity[0].setCustomValidity('";
  168.         // line 76
  169.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  170.         echo "');
  171.                     setTimeout(function() {
  172.                         loadingOverlay('hide');
  173.                     }, 100);
  174.                     return true;
  175.                 } else {
  176.                     \$quantity[0].setCustomValidity('');
  177.                 }
  178.                 e.preventDefault();
  179.                 \$.ajax({
  180.                     url: \$form.attr('action'),
  181.                     type: \$form.attr('method'),
  182.                     data: \$form.serialize(),
  183.                     dataType: 'json',
  184.                     beforeSend: function(xhr, settings) {
  185.                         // Buttonを無効にする
  186.                         \$('.add-cart').prop('disabled', true);
  187.                     }
  188.                 }).done(function(data) {
  189.                     // レスポンス内のメッセージをalertで表示
  190.                     \$.each(data.messages, function() {
  191.                         \$('#ec-modal-header').html(this);
  192.                     });
  193.                     \$('.ec-modal').show()
  194.                     // カートブロックを更新する
  195.                     \$.ajax({
  196.                         url: '";
  197.         // line 104
  198.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  199.         echo "',
  200.                         type: 'GET',
  201.                         dataType: 'html'
  202.                     }).done(function(html) {
  203.                         \$('.ec-headerRole__cart').html(html);
  204.                     });
  205.                 }).fail(function(data) {
  206.                     alert('";
  207.         // line 111
  208.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  209.         echo "');
  210.                 }).always(function(data) {
  211.                     // Buttonを有効にする
  212.                     \$('.add-cart').prop('disabled', false);
  213.                 });
  214.             });
  215.             
  216.             \$('input.quantity').hide();
  217.             \$('input.quantity').prev().hide();
  218.             \$('select[name=\"classcategory_id1\"]').hide();
  219.             \$('select[name=\"classcategory_id2\"]').hide();
  220.             \$('select[name=\"classcategory_id3\"]').hide();
  221.             \$('select[name=\"classcategory_id4\"]').hide();
  222.             \$('select[name=\"classcategory_id5\"]').hide();
  223.             \$('#classcategory_id2').hide();
  224.             \$('#classcategory_id3').hide();
  225.             \$('#classcategory_id4').hide();
  226.             \$('#classcategory_id5').hide();
  227.             \$('.ec-modal-wrap').on('click', function(e) {
  228.                 // モーダル内の処理は外側にバブリングさせない
  229.                 e.stopPropagation();
  230.             });
  231.             \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  232.                 \$('.ec-modal').hide()
  233.             });
  234.         });
  235.     </script>
  236. ";
  237.         
  238.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  239.         
  240.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  241.     }
  242.     // line 142
  243.     public function block_main($context, array $blocks = [])
  244.     {
  245.         $macros $this->macros;
  246.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  247.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  248.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  249.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  250.         // line 143
  251.         echo "<style>
  252.   .ec-shelfGrid .ec-shelfGrid__item-image{
  253.     height: auto;
  254.   }
  255. .ec-productRole__tag{
  256.     text-align: justify;
  257.     display: inline-block;
  258.     background-color: #ebf0f0;
  259.     padding: 1px 1px !important;
  260.     font-size: 90%;
  261.     margin-right: 5px;
  262. }
  263.   .ec-shelfGrid .ec-shelfGrid__item {
  264.     margin-bottom: 36px;
  265.     width: 100%;
  266.     display: -ms-flexbox;
  267.     display: flex;
  268.     -ms-flex-direction: column;
  269.         flex-direction: column; 
  270.   }
  271.         
  272.   @media only screen and (min-width: 768px){
  273.     .ec-shelfGrid .ec-shelfGrid__item{
  274.         padding: 0 16px;
  275. ";
  276.         // line 169
  277.         if ((((((isset($context["sidebar_type"]) || array_key_exists("sidebar_type"$context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.'169$this->source); })()) == 1) || ((isset($context["sidebar_type"]) || array_key_exists("sidebar_type"$context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.'169$this->source); })()) == 2)) || ((isset($context["sidebar_type"]) || array_key_exists("sidebar_type"$context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.'169$this->source); })()) == 3)) || ((isset($context["sidebar_type"]) || array_key_exists("sidebar_type"$context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.'169$this->source); })()) == 999))) {
  278.             // line 170
  279.             echo "        width: 25%;
  280. ";
  281.         } else {
  282.             // line 172
  283.             echo "        width: 33%;
  284. ";
  285.         }
  286.         // line 174
  287.         echo "    }
  288.   }
  289. </style>
  290.     ";
  291.         // line 178
  292.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'178$this->source); })()), "category_id", [], "any"falsefalsefalse178), "vars", [], "any"falsefalsefalse178), "errors", [], "any"falsefalsefalse178)) > 0)) {
  293.             // line 179
  294.             echo "        <div class=\"ec-searchnavRole\">
  295.             <p class=\"errormsg text-danger\">";
  296.             // line 180
  297.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ご指定のカテゴリは存在しません"), "html"nulltrue);
  298.             echo "</p>
  299.         </div>
  300.     ";
  301.         } else {
  302.             // line 183
  303.             echo "        <div class=\"ec-searchnavRole\">
  304.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  305.                 ";
  306.             // line 185
  307.             $context['_parent'] = $context;
  308.             $context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form"$context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.'185$this->source); })()));
  309.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  310.                 // line 186
  311.                 echo "                    <input type=\"hidden\" id=\"";
  312.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse186), "id", [], "any"falsefalsefalse186), "html"nulltrue);
  313.                 echo "\"
  314.                            name=\"";
  315.                 // line 187
  316.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse187), "full_name", [], "any"falsefalsefalse187), "html"nulltrue);
  317.                 echo "\"
  318.                            ";
  319.                 // line 188
  320.                 if ( !twig_test_empty(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse188), "value", [], "any"falsefalsefalse188))) {
  321.                     echo "value=\"";
  322.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "vars", [], "any"falsefalsefalse188), "value", [], "any"falsefalsefalse188), "html"nulltrue);
  323.                     echo "\" ";
  324.                 }
  325.                 echo "/>
  326.                 ";
  327.             }
  328.             $_parent $context['_parent'];
  329.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  330.             $context array_intersect_key($context$_parent) + $_parent;
  331.             // line 190
  332.             echo "            </form>
  333.             <div class=\"ec-searchnavRole__topicpath\">
  334.                 <ol class=\"ec-topicpath\">
  335.                     ";
  336.             // line 194
  337.             echo "                    ";
  338.             // line 195
  339.             echo "                    ";
  340.             if ( !(null === (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'195$this->source); })()))) {
  341.                 // line 196
  342.                 echo "                        ";
  343.                 $context['_parent'] = $context;
  344.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'196$this->source); })()), "path", [], "any"falsefalsefalse196));
  345.                 $context['loop'] = [
  346.                   'parent' => $context['_parent'],
  347.                   'index0' => 0,
  348.                   'index'  => 1,
  349.                   'first'  => true,
  350.                 ];
  351.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  352.                     $length count($context['_seq']);
  353.                     $context['loop']['revindex0'] = $length 1;
  354.                     $context['loop']['revindex'] = $length;
  355.                     $context['loop']['length'] = $length;
  356.                     $context['loop']['last'] = === $length;
  357.                 }
  358.                 foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  359.                     // line 197
  360.                     echo "                            ";
  361.                     // line 198
  362.                     echo "                            <li class=\"ec-topicpath__item";
  363.                     if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse198)) {
  364.                         echo "--active";
  365.                     }
  366.                     echo "\"><a
  367.                                         href=\"";
  368.                     // line 199
  369.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  370.                     echo "?category_id=";
  371.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "id", [], "any"falsefalsefalse199), "html"nulltrue);
  372.                     echo "\">";
  373.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse199), "html"nulltrue);
  374.                     echo "</a>
  375.                             </li>
  376.                             <li class=\"ec-topicpath__divider\">|</li>
  377.                         ";
  378.                     ++$context['loop']['index0'];
  379.                     ++$context['loop']['index'];
  380.                     $context['loop']['first'] = false;
  381.                     if (isset($context['loop']['length'])) {
  382.                         --$context['loop']['revindex0'];
  383.                         --$context['loop']['revindex'];
  384.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  385.                     }
  386.                 }
  387.                 $_parent $context['_parent'];
  388.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  389.                 $context array_intersect_key($context$_parent) + $_parent;
  390.                 // line 203
  391.                 echo "                    ";
  392.             }
  393.             // line 204
  394.             echo "                    ";
  395.             // line 205
  396.             echo "                    ";
  397.             // line 206
  398.             echo "                    ";
  399.             // line 207
  400.             echo "                    ";
  401.             // line 208
  402.             echo "                </ol>
  403.             </div>
  404.             <div class=\"ec-searchnavRole__infos\">
  405.                 ";
  406.             // line 212
  407.             echo "                ";
  408.             // line 213
  409.             echo "                ";
  410.             // line 214
  411.             echo "                ";
  412.             // line 215
  413.             echo "                ";
  414.             // line 216
  415.             echo "                ";
  416.             // line 217
  417.             echo "                ";
  418.             // line 218
  419.             echo "                ";
  420.             // line 219
  421.             echo "                ";
  422.             // line 220
  423.             echo "                ";
  424.             // line 221
  425.             echo "                ";
  426.             // line 222
  427.             echo "                ";
  428.             // line 223
  429.             echo "                ";
  430.             // line 224
  431.             echo "                ";
  432.             // line 225
  433.             echo "                ";
  434.             // line 226
  435.             echo "            </div>
  436.         </div>
  437.         ";
  438.             // line 228
  439.             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.'228$this->source); })()), "totalItemCount", [], "any"falsefalsefalse228) > 0)) {
  440.                 // line 229
  441.                 echo "            <div class=\"ec-shelfRole\">
  442.                 <ul class=\"ec-shelfGrid\">
  443.                     ";
  444.                 // line 231
  445.                 $context['_parent'] = $context;
  446.                 $context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'231$this->source); })()));
  447.                 foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  448.                     // line 232
  449.                     echo "                        <li class=\"ec-shelfGrid__item\">
  450.                                 <p class=\"ec-shelfGrid__item-image\">
  451.                             <a href=\"";
  452.                     // line 234
  453.                     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"falsefalsefalse234)]), "html"nulltrue);
  454.                     echo "\">
  455.                                 <p class=\"ec-shelfGrid__item-image\">
  456.                                     <img src=\"";
  457.                     // line 236
  458.                     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"falsefalsefalse236)), "save_image"), "html"nulltrue);
  459.                     echo "\" alt=\"";
  460.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse236), "html"nulltrue);
  461.                     echo "\" loading=\"lazy\">
  462.                                 </p>
  463. ";
  464.                     // line 239
  465.                     if (((isset($context["sidebar_type"]) || array_key_exists("sidebar_type"$context) ? $context["sidebar_type"] : (function () { throw new RuntimeError('Variable "sidebar_type" does not exist.'239$this->source); })()) == 1)) {
  466.                         // line 240
  467.                         echo "                    ";
  468.                         if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["Product"], "code_min", [], "any"falsefalsefalse240))) {
  469.                             // line 241
  470.                             echo "                        ";
  471.                             // line 242
  472.                             echo "                        <span class=\"product-code-default\">";
  473.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "code_min", [], "any"falsefalsefalse242), "html"nulltrue);
  474.                             if ((twig_get_attribute($this->env$this->source$context["Product"], "code_min", [], "any"falsefalsefalse242) != twig_get_attribute($this->env$this->source$context["Product"], "code_max", [], "any"falsefalsefalse242))) {
  475.                                 echo " ~ ";
  476.                                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "code_max", [], "any"falsefalsefalse242), "html"nulltrue);
  477.                             }
  478.                             echo "</span>
  479.                     ";
  480.                         }
  481.                     }
  482.                     // line 244
  483.                     echo "\t
  484.                                 <p>";
  485.                     // line 245
  486.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsefalse245), "html"nulltrue);
  487.                     echo "</p>
  488.                                 ";
  489.                     // line 246
  490.                     if (twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsefalse246)) {
  491.                         // line 247
  492.                         echo "                                    <p>";
  493.                         echo twig_nl2br(twig_get_attribute($this->env$this->source$context["Product"], "description_list", [], "any"falsefalsefalse247));
  494.                         echo "</p>
  495.                                 ";
  496.                     }
  497.                     // line 249
  498.                     echo "                                <p>
  499.                                     ";
  500.                     // line 250
  501.                     $context["flgRental"] = false;
  502.                     // line 251
  503.                     echo "                                    ";
  504.                     $context['_parent'] = $context;
  505.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "ProductClasses", [], "any"falsefalsefalse251));
  506.                     foreach ($context['_seq'] as $context["_key"] => $context["class"]) {
  507.                         // line 252
  508.                         echo "                                        ";
  509.                         if (twig_get_attribute($this->env$this->source, ($context["CustomSaleType"] ?? null), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["class"], "SaleType", [], "any"falsefalsefalse252), "Id", [], "any"falsefalsefalse252), [], "array"truetruefalse252)) {
  510.                             // line 253
  511.                             echo "                                        ";
  512.                             if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["CustomSaleType"]) || array_key_exists("CustomSaleType"$context) ? $context["CustomSaleType"] : (function () { throw new RuntimeError('Variable "CustomSaleType" does not exist.'253$this->source); })()), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["class"], "SaleType", [], "any"falsefalsefalse253), "Id", [], "any"falsefalsefalse253), [], "array"falsefalsefalse253), "Rental", [], "any"falsefalsefalse253)) {
  513.                                 // line 254
  514.                                 echo "                                            
  515.                                             ";
  516.                                 // line 255
  517.                                 $context["flgRental"] = true;
  518.                                 // line 256
  519.                                 echo "                                        ";
  520.                             }
  521.                             // line 257
  522.                             echo "                                        ";
  523.                         }
  524.                         // line 258
  525.                         echo "                                    ";
  526.                     }
  527.                     $_parent $context['_parent'];
  528.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['class'], $context['_parent'], $context['loop']);
  529.                     $context array_intersect_key($context$_parent) + $_parent;
  530.                     // line 259
  531.                     echo "                                    ";
  532.                     if ((isset($context["flgRental"]) || array_key_exists("flgRental"$context) ? $context["flgRental"] : (function () { throw new RuntimeError('Variable "flgRental" does not exist.'259$this->source); })())) {
  533.                         // line 260
  534.                         echo "                                    レンタル月額
  535.                                     ";
  536.                     }
  537.                     // line 262
  538.                     echo "                                </p>
  539.                                 <p class=\"xxxx\">
  540.                                    ";
  541.                     // line 264
  542.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMax", [], "any"falsefalsefalse264)), "html"nulltrue);
  543.                     echo "円税込
  544.                                 </p>
  545.                                 <p class=\"xxxx\">
  546.                                     ";
  547.                     // line 267
  548.                     if (twig_get_attribute($this->env$this->source$context["Product"], "hasProductClass", [], "any"falsefalsefalse267)) {
  549.                         // line 268
  550.                         echo "                                        ";
  551.                         if ((twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Min", [], "any"falsefalsefalse268) == twig_get_attribute($this->env$this->source$context["Product"], "getPrice02Max", [], "any"falsefalsefalse268))) {
  552.                             // line 269
  553.                             echo "                                        ";
  554.                         } else {
  555.                             // line 270
  556.                             echo "                                            <span class=\"txt\" style=\"font-size: 10px;\">(オートシップメント契約価格";
  557.                             echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->source$context["Product"], "getPrice02IncTaxMin", [], "any"falsefalsefalse270)), "html"nulltrue);
  558.                             echo "円税込)</span>
  559.                                         ";
  560.                         }
  561.                         // line 272
  562.                         echo "                                    ";
  563.                     } else {
  564.                         // line 273
  565.                         echo "                                    ";
  566.                     }
  567.                     // line 274
  568.                     echo "                                </p>
  569.                             ";
  570.                     // line 277
  571.                     echo "                            <ul class=\"ec-productRole__tags\">
  572.                                 ";
  573.                     // line 278
  574.                     $context['_parent'] = $context;
  575.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "Tags", [], "any"falsefalsefalse278));
  576.                     $context['loop'] = [
  577.                       'parent' => $context['_parent'],
  578.                       'index0' => 0,
  579.                       'index'  => 1,
  580.                       'first'  => true,
  581.                     ];
  582.                     if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  583.                         $length count($context['_seq']);
  584.                         $context['loop']['revindex0'] = $length 1;
  585.                         $context['loop']['revindex'] = $length;
  586.                         $context['loop']['length'] = $length;
  587.                         $context['loop']['last'] = === $length;
  588.                     }
  589.                     foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  590.                         // line 279
  591.                         echo "                                    <li class=\"ec-productRole__tag tag_";
  592.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse279), "html"nulltrue);
  593.                         echo "\">";
  594.                         echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  595.                         echo "</li>
  596.                                     ";
  597.                         // line 280
  598.                         if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse280)) {
  599.                             // line 281
  600.                             echo "                                    ";
  601.                         } else {
  602.                             // line 282
  603.                             echo "                                    /
  604.                                     ";
  605.                         }
  606.                         // line 284
  607.                         echo "                                ";
  608.                         ++$context['loop']['index0'];
  609.                         ++$context['loop']['index'];
  610.                         $context['loop']['first'] = false;
  611.                         if (isset($context['loop']['length'])) {
  612.                             --$context['loop']['revindex0'];
  613.                             --$context['loop']['revindex'];
  614.                             $context['loop']['last'] = === $context['loop']['revindex0'];
  615.                         }
  616.                     }
  617.                     $_parent $context['_parent'];
  618.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  619.                     $context array_intersect_key($context$_parent) + $_parent;
  620.                     // line 285
  621.                     echo "                            </ul>
  622.                             ";
  623.                     // line 287
  624.                     echo "                            ";
  625.                     if (twig_get_attribute($this->env$this->source$context["Product"], "stock_find", [], "any"falsefalsefalse287)) {
  626.                         // line 288
  627.                         echo "                                ";
  628.                         // line 289
  629.                         echo "                                ";
  630.                         // line 290
  631.                         echo "                                    ";
  632.                         // line 291
  633.                         echo "                                        ";
  634.                         // line 292
  635.                         echo "                                            ";
  636.                         // line 293
  637.                         echo "                                                ";
  638.                         // line 294
  639.                         echo "                                                ";
  640.                         // line 295
  641.                         echo "                                            ";
  642.                         // line 296
  643.                         echo "                                            ";
  644.                         // line 297
  645.                         echo "                                                ";
  646.                         // line 298
  647.                         echo "                                                    ";
  648.                         // line 299
  649.                         echo "                                                    ";
  650.                         // line 300
  651.                         echo "                                                ";
  652.                         // line 301
  653.                         echo "                                            ";
  654.                         // line 302
  655.                         echo "                                        ";
  656.                         // line 303
  657.                         echo "                                        ";
  658.                         // line 304
  659.                         echo "                                            ";
  660.                         // line 305
  661.                         echo "                                            ";
  662.                         // line 306
  663.                         echo "                                        ";
  664.                         // line 307
  665.                         echo "                                    ";
  666.                         // line 308
  667.                         echo "                                    ";
  668.                         // line 309
  669.                         echo "                                ";
  670.                         // line 310
  671.                         echo "                                <div class=\"ec-productRole__btn\">
  672.                                     ";
  673.                         // line 312
  674.                         echo "                                    ";
  675.                         // line 313
  676.                         echo "                                    ";
  677.                         // line 314
  678.                         echo "                                    ";
  679.                         // line 315
  680.                         echo "                                    ";
  681.                         // line 316
  682.                         echo "                                    ";
  683.                         // line 317
  684.                         echo "                                    ";
  685.                         // line 318
  686.                         echo "                                    ";
  687.                         // line 319
  688.                         echo "
  689.                                     ";
  690.                         // line 321
  691.                         echo "                                    ";
  692.                         // line 322
  693.                         echo "                                    ";
  694.                         // line 323
  695.                         echo "                                    ";
  696.                         // line 324
  697.                         echo "                                    ";
  698.                         // line 325
  699.                         echo "                                    ";
  700.                         // line 326
  701.                         echo "                                    ";
  702.                         // line 327
  703.                         echo "                                    ";
  704.                         // line 328
  705.                         echo "                                    ";
  706.                         // line 329
  707.                         echo "                                    ";
  708.                         // line 330
  709.                         echo "                                    ";
  710.                         // line 331
  711.                         echo "                                </div>
  712.                                 ";
  713.                     } else {
  714.                         // line 333
  715.                         echo "                                ";
  716.                         // line 334
  717.                         echo "                                ";
  718.                         // line 335
  719.                         echo "                                ";
  720.                         // line 336
  721.                         echo "                                ";
  722.                         // line 337
  723.                         echo "                                ";
  724.                         // line 338
  725.                         echo "                            ";
  726.                     }
  727.                     // line 339
  728.                     echo "                        </li>
  729.                     ";
  730.                 }
  731.                 $_parent $context['_parent'];
  732.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  733.                 $context array_intersect_key($context$_parent) + $_parent;
  734.                 // line 341
  735.                 echo "                </ul>
  736.             </div>
  737.             <div class=\"ec-modal\">
  738.                 <div class=\"ec-modal-overlay\">
  739.                     <div class=\"ec-modal-wrap\">
  740.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  741.                 // line 346
  742.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  743.                 echo "\" alt=\"\"/></span></span>
  744.                         <div id=\"ec-modal-header\" class=\"text-center\">";
  745.                 // line 347
  746.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  747.                 echo "</div>
  748.                         <div class=\"ec-modal-box\">
  749.                             <div class=\"ec-role\">
  750.                                 <span class=\"ec-inlineBtn--cancel\">";
  751.                 // line 350
  752.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  753.                 echo "</span>
  754.                                 <a href=\"";
  755.                 // line 351
  756.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  757.                 echo "\" class=\"ec-inlineBtn--action\">";
  758.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  759.                 echo "</a>
  760.                             </div>
  761.                         </div>
  762.                     </div>
  763.                 </div>
  764.             </div>
  765.             <div class=\"ec-pagerRole\">
  766.                 ";
  767.                 // line 358
  768.                 $this->loadTemplate("pager.twig""Product/list.twig"358)->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.'358$this->source); })()), "paginationData", [], "any"falsefalsefalse358)]));
  769.                 // line 359
  770.                 echo "            </div>
  771.         ";
  772.             }
  773.             // line 361
  774.             echo "    ";
  775.         }
  776.         
  777.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  778.         
  779.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  780.     }
  781.     public function getTemplateName()
  782.     {
  783.         return "Product/list.twig";
  784.     }
  785.     public function isTraitable()
  786.     {
  787.         return false;
  788.     }
  789.     public function getDebugInfo()
  790.     {
  791.         return array (  806 => 361,  802 => 359,  800 => 358,  788 => 351,  784 => 350,  778 => 347,  774 => 346,  767 => 341,  760 => 339,  757 => 338,  755 => 337,  753 => 336,  751 => 335,  749 => 334,  747 => 333,  743 => 331,  741 => 330,  739 => 329,  737 => 328,  735 => 327,  733 => 326,  731 => 325,  729 => 324,  727 => 323,  725 => 322,  723 => 321,  720 => 319,  718 => 318,  716 => 317,  714 => 316,  712 => 315,  710 => 314,  708 => 313,  706 => 312,  703 => 310,  701 => 309,  699 => 308,  697 => 307,  695 => 306,  693 => 305,  691 => 304,  689 => 303,  687 => 302,  685 => 301,  683 => 300,  681 => 299,  679 => 298,  677 => 297,  675 => 296,  673 => 295,  671 => 294,  669 => 293,  667 => 292,  665 => 291,  663 => 290,  661 => 289,  659 => 288,  656 => 287,  653 => 285,  639 => 284,  635 => 282,  632 => 281,  630 => 280,  623 => 279,  606 => 278,  603 => 277,  599 => 274,  596 => 273,  593 => 272,  587 => 270,  584 => 269,  581 => 268,  579 => 267,  573 => 264,  569 => 262,  565 => 260,  562 => 259,  556 => 258,  553 => 257,  550 => 256,  548 => 255,  545 => 254,  542 => 253,  539 => 252,  534 => 251,  532 => 250,  529 => 249,  523 => 247,  521 => 246,  517 => 245,  514 => 244,  503 => 242,  501 => 241,  498 => 240,  496 => 239,  489 => 236,  484 => 234,  480 => 232,  476 => 231,  472 => 229,  470 => 228,  466 => 226,  464 => 225,  462 => 224,  460 => 223,  458 => 222,  456 => 221,  454 => 220,  452 => 219,  450 => 218,  448 => 217,  446 => 216,  444 => 215,  442 => 214,  440 => 213,  438 => 212,  433 => 208,  431 => 207,  429 => 206,  427 => 205,  425 => 204,  422 => 203,  400 => 199,  393 => 198,  391 => 197,  373 => 196,  370 => 195,  368 => 194,  363 => 190,  351 => 188,  347 => 187,  342 => 186,  338 => 185,  334 => 183,  328 => 180,  325 => 179,  323 => 178,  317 => 174,  313 => 172,  309 => 170,  307 => 169,  279 => 143,  269 => 142,  229 => 111,  219 => 104,  188 => 76,  160 => 50,  146 => 49,  138 => 48,  121 => 47,  117 => 45,  107 => 44,  96 => 40,  94 => 42,  90 => 35,  81 => 30,  79 => 29,  77 => 28,  74 => 26,  72 => 25,  70 => 24,  67 => 22,  65 => 21,  63 => 20,  61 => 19,  57 => 18,  55 => 17,  53 => 16,  51 => 13,  49 => 12,  36 => 40,);
  792.     }
  793.     public function getSourceContext()
  794.     {
  795.         return new Source("{#
  796. This file is part of EC-CUBE
  797. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  798. http://www.ec-cube.co.jp/
  799. For the full copyright and license information, please view the LICENSE
  800. file that was distributed with this source code.
  801. #}
  802. {% set sidbar_out = false %}
  803. {% set sidebar_type = 0 %}
  804. {# 商品一覧からの場合 #}
  805. {% if Category is defined %}
  806. {% if Category is not null %}
  807.     {% for Path in Category.path %}
  808.         {% if Path.hierarchy == 1 %}
  809.             {% if Path.name == '部品' %}
  810.                 {% set sidebar_type = 1 %}
  811.                 {% set sidbar_out = true %}
  812.             {% endif %}
  813.             {% if Path.name == 'カートリッジ' %}
  814.                 {% set sidebar_type = 2 %}
  815.                 {% set sidbar_out = true %}
  816.             {% endif %}
  817.             {% if Path.name == '取付工事' %}
  818.                 {% set sidebar_type = 3 %}
  819.                 {% set sidbar_out = true %}
  820.             {% endif %}
  821.         {% endif %}
  822.     {% endfor %}
  823. {% else %}
  824.     {% set sidebar_type = 999 %}
  825. {% endif %}
  826. {% endif %}
  827. {% extends 'default_frame.twig' %}
  828. {% set body_class = 'product_page' %}
  829. {% block javascript %}
  830.     <script>
  831.         eccube.productsClassCategories = {
  832.             {% for Product in pagination %}
  833.             \"{{ Product.id|escape('js') }}\": {{ class_categories_as_json(Product)|raw }}{% if loop.last == false %}, {% endif %}
  834.             {% endfor %}
  835.         };
  836.         \$(function() {
  837.             // 表示件数を変更
  838.             \$('.disp-number').change(function() {
  839.                 var dispNumber = \$(this).val();
  840.                 \$('#disp_number').val(dispNumber);
  841.                 \$('#pageno').val(1);
  842.                 \$(\"#form1\").submit();
  843.             });
  844.             // 並び順を変更
  845.             \$('.order-by').change(function() {
  846.                 var orderBy = \$(this).val();
  847.                 \$('#orderby').val(orderBy);
  848.                 \$('#pageno').val(1);
  849.                 \$(\"#form1\").submit();
  850.             });
  851.             \$('.add-cart').on('click', function(e) {
  852.                 var \$form = \$(this).parents('li').find('form');
  853.                 // 個数フォームのチェック
  854.                 var \$quantity = \$form.parent().find('.quantity');
  855.                 if (\$quantity.val() < 1) {
  856.                     \$quantity[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  857.                     setTimeout(function() {
  858.                         loadingOverlay('hide');
  859.                     }, 100);
  860.                     return true;
  861.                 } else {
  862.                     \$quantity[0].setCustomValidity('');
  863.                 }
  864.                 e.preventDefault();
  865.                 \$.ajax({
  866.                     url: \$form.attr('action'),
  867.                     type: \$form.attr('method'),
  868.                     data: \$form.serialize(),
  869.                     dataType: 'json',
  870.                     beforeSend: function(xhr, settings) {
  871.                         // Buttonを無効にする
  872.                         \$('.add-cart').prop('disabled', true);
  873.                     }
  874.                 }).done(function(data) {
  875.                     // レスポンス内のメッセージをalertで表示
  876.                     \$.each(data.messages, function() {
  877.                         \$('#ec-modal-header').html(this);
  878.                     });
  879.                     \$('.ec-modal').show()
  880.                     // カートブロックを更新する
  881.                     \$.ajax({
  882.                         url: '{{ url('block_cart') }}',
  883.                         type: 'GET',
  884.                         dataType: 'html'
  885.                     }).done(function(html) {
  886.                         \$('.ec-headerRole__cart').html(html);
  887.                     });
  888.                 }).fail(function(data) {
  889.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  890.                 }).always(function(data) {
  891.                     // Buttonを有効にする
  892.                     \$('.add-cart').prop('disabled', false);
  893.                 });
  894.             });
  895.             
  896.             \$('input.quantity').hide();
  897.             \$('input.quantity').prev().hide();
  898.             \$('select[name=\"classcategory_id1\"]').hide();
  899.             \$('select[name=\"classcategory_id2\"]').hide();
  900.             \$('select[name=\"classcategory_id3\"]').hide();
  901.             \$('select[name=\"classcategory_id4\"]').hide();
  902.             \$('select[name=\"classcategory_id5\"]').hide();
  903.             \$('#classcategory_id2').hide();
  904.             \$('#classcategory_id3').hide();
  905.             \$('#classcategory_id4').hide();
  906.             \$('#classcategory_id5').hide();
  907.             \$('.ec-modal-wrap').on('click', function(e) {
  908.                 // モーダル内の処理は外側にバブリングさせない
  909.                 e.stopPropagation();
  910.             });
  911.             \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  912.                 \$('.ec-modal').hide()
  913.             });
  914.         });
  915.     </script>
  916. {% endblock %}
  917. {% block main %}
  918. <style>
  919.   .ec-shelfGrid .ec-shelfGrid__item-image{
  920.     height: auto;
  921.   }
  922. .ec-productRole__tag{
  923.     text-align: justify;
  924.     display: inline-block;
  925.     background-color: #ebf0f0;
  926.     padding: 1px 1px !important;
  927.     font-size: 90%;
  928.     margin-right: 5px;
  929. }
  930.   .ec-shelfGrid .ec-shelfGrid__item {
  931.     margin-bottom: 36px;
  932.     width: 100%;
  933.     display: -ms-flexbox;
  934.     display: flex;
  935.     -ms-flex-direction: column;
  936.         flex-direction: column; 
  937.   }
  938.         
  939.   @media only screen and (min-width: 768px){
  940.     .ec-shelfGrid .ec-shelfGrid__item{
  941.         padding: 0 16px;
  942. {% if sidebar_type == 1 or sidebar_type == 2  or sidebar_type == 3 or sidebar_type == 999 %}
  943.         width: 25%;
  944. {% else %}
  945.         width: 33%;
  946. {% endif %}
  947.     }
  948.   }
  949. </style>
  950.     {% if search_form.category_id.vars.errors|length > 0 %}
  951.         <div class=\"ec-searchnavRole\">
  952.             <p class=\"errormsg text-danger\">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  953.         </div>
  954.     {% else %}
  955.         <div class=\"ec-searchnavRole\">
  956.             <form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
  957.                 {% for item in search_form %}
  958.                     <input type=\"hidden\" id=\"{{ item.vars.id }}\"
  959.                            name=\"{{ item.vars.full_name }}\"
  960.                            {% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
  961.                 {% endfor %}
  962.             </form>
  963.             <div class=\"ec-searchnavRole__topicpath\">
  964.                 <ol class=\"ec-topicpath\">
  965.                     {# <li class=\"ec-topicpath__item\"><a href=\"{{ url('product_list') }}\">{{ '全て'|trans }}</a> #}
  966.                     {# </li> #}
  967.                     {% if Category is not null %}
  968.                         {% for Path in Category.path %}
  969.                             {# <li class=\"ec-topicpath__divider\">|</li> #}
  970.                             <li class=\"ec-topicpath__item{% if loop.last %}--active{% endif %}\"><a
  971.                                         href=\"{{ url('product_list') }}?category_id={{ Path.id }}\">{{ Path.name }}</a>
  972.                             </li>
  973.                             <li class=\"ec-topicpath__divider\">|</li>
  974.                         {% endfor %}
  975.                     {% endif %}
  976.                     {#{% if search_form.vars.value and search_form.vars.value.name %}#}
  977.                     {#    <li class=\"ec-topicpath__divider\">|</li>#}
  978.                     {#    <li class=\"ec-topicpath__item\">{{ '「%name%」の検索結果'|trans({ '%name%': search_form.vars.value.name }) }}</li>#}
  979.                     {#{% endif %}#}
  980.                 </ol>
  981.             </div>
  982.             <div class=\"ec-searchnavRole__infos\">
  983.                 {#<div class=\"ec-searchnavRole__counter\">#}
  984.                 {#    {% if pagination.totalItemCount > 0 %}#}
  985.                 {#        {{ '<span class=\"ec-font-bold\">%count%件</span><span>の商品が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}#}
  986.                 {#    {% else %}#}
  987.                 {#        <span>{{ 'お探しの商品は見つかりませんでした'|trans }}</span>#}
  988.                 {#    {% endif %}#}
  989.                 {#</div>#}
  990.                 {#{% if pagination.totalItemCount > 0 %}#}
  991.                 {#    <div class=\"ec-searchnavRole__actions\">#}
  992.                 {#        <div class=\"ec-select\">#}
  993.                 {#            {{ form_widget(disp_number_form, {'id': '', 'attr': {'class': 'disp-number'}}) }}#}
  994.                 {#            {{ form_widget(order_by_form, {'id': '', 'attr': {'class': 'order-by'}}) }}#}
  995.                 {#        </div>#}
  996.                 {#    </div>#}
  997.                 {#{% endif %}#}
  998.             </div>
  999.         </div>
  1000.         {% if pagination.totalItemCount > 0 %}
  1001.             <div class=\"ec-shelfRole\">
  1002.                 <ul class=\"ec-shelfGrid\">
  1003.                     {% for Product in pagination %}
  1004.                         <li class=\"ec-shelfGrid__item\">
  1005.                                 <p class=\"ec-shelfGrid__item-image\">
  1006.                             <a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  1007.                                 <p class=\"ec-shelfGrid__item-image\">
  1008.                                     <img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\" alt=\"{{ Product.name }}\" loading=\"lazy\">
  1009.                                 </p>
  1010. {# 部品の場合 #}
  1011. {% if sidebar_type == 1 %}
  1012.                     {% if Product.code_min is not empty %}
  1013.                         {#<p style=\"font-size: 12px;\">型番<br /></p>#}
  1014.                         <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1015.                     {% endif %}
  1016. {% endif %}\t
  1017.                                 <p>{{ Product.name }}</p>
  1018.                                 {% if Product.description_list %}
  1019.                                     <p>{{ Product.description_list|raw|nl2br }}</p>
  1020.                                 {% endif %}
  1021.                                 <p>
  1022.                                     {% set flgRental = false %}
  1023.                                     {% for class in Product.ProductClasses %}
  1024.                                         {% if CustomSaleType[class.SaleType.Id] is defined %}
  1025.                                         {% if CustomSaleType[class.SaleType.Id].Rental %}
  1026.                                             
  1027.                                             {% set flgRental = true %}
  1028.                                         {% endif %}
  1029.                                         {% endif %}
  1030.                                     {% endfor %}
  1031.                                     {% if flgRental %}
  1032.                                     レンタル月額
  1033.                                     {% endif %}
  1034.                                 </p>
  1035.                                 <p class=\"xxxx\">
  1036.                                    {{ Product.getPrice02IncTaxMax|number_format }}円税込
  1037.                                 </p>
  1038.                                 <p class=\"xxxx\">
  1039.                                     {% if Product.hasProductClass %}
  1040.                                         {% if Product.getPrice02Min == Product.getPrice02Max %}
  1041.                                         {% else %}
  1042.                                             <span class=\"txt\" style=\"font-size: 10px;\">(オートシップメント契約価格{{ Product.getPrice02IncTaxMin|number_format }}円税込)</span>
  1043.                                         {% endif %}
  1044.                                     {% else %}
  1045.                                     {% endif %}
  1046.                                 </p>
  1047.                             {# タグ #}
  1048.                             <ul class=\"ec-productRole__tags\">
  1049.                                 {% for Tag in Product.Tags %}
  1050.                                     <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  1051.                                     {% if loop.last %}
  1052.                                     {% else %}
  1053.                                     /
  1054.                                     {% endif %}
  1055.                                 {% endfor %}
  1056.                             </ul>
  1057.                             {# タグ #}
  1058.                             {% if Product.stock_find %}
  1059.                                 {#{% set form = forms[Product.id] %}#}
  1060.                                 {#<form name=\"form{{ Product.id }}\" id=\"productForm{{ Product.id }}\" action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\">#}
  1061.                                     {#<div class=\"ec-productRole__actions\">#}
  1062.                                         {#{% if form.classcategory_id1 is defined %}#}
  1063.                                             {#<div class=\"ec-select\">#}
  1064.                                                 {#{{ form_widget(form.classcategory_id1) }}#}
  1065.                                                 {#{{ form_errors(form.classcategory_id1) }}#}
  1066.                                             {#</div>#}
  1067.                                             {#{% if form.classcategory_id2 is defined %}#}
  1068.                                                 {#<div class=\"ec-select\">#}
  1069.                                                     {#{{ form_widget(form.classcategory_id2) }}#}
  1070.                                                     {#{{ form_errors(form.classcategory_id2) }}#}
  1071.                                                 {#</div>#}
  1072.                                             {#{% endif %}#}
  1073.                                         {#{% endif %}#}
  1074.                                         {#<div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>#}
  1075.                                             {#{{ form_widget(form.quantity, {'attr': {'class': 'quantity'}}) }}#}
  1076.                                             {#{{ form_errors(form.quantity) }}#}
  1077.                                         {#</div>#}
  1078.                                     {#</div>#}
  1079.                                     {#{{ form_rest(form) }}#}
  1080.                                 {#</form>#}
  1081.                                 <div class=\"ec-productRole__btn\">
  1082.                                     {#{% set flgCartridge = false %}#}
  1083.                                     {#{% for class in Product.ProductClasses %}#}
  1084.                                     {#    {% if CustomSaleType[class.SaleType.Id] is defined %}#}
  1085.                                     {#    {% if CustomSaleType[class.SaleType.Id].ExchageCartridge %}#}
  1086.                                     {#        {% set flgCartridge = true %}#}
  1087.                                     {#    {% endif %}#}
  1088.                                     {#    {% endif %}#}
  1089.                                     {#{% endfor %}#}
  1090.                                     {#{% if Product.IsChangeCartridge %}#}
  1091.                                     {#    {% if flgCartridge %}#}
  1092.                                     {#    <p style=\"color:red\">{{ 'customize.cartridge.replacement.supplement.message'|trans }}</p>#}
  1093.                                     {#    {% endif %}#}
  1094.                                     {#{% endif %}#}
  1095.                                     {#{% if Product.IsRental %}#}
  1096.                                     {#{% else %}#}
  1097.                                     {#<button type=\"submit\" class=\"ec-blockBtn--action add-cart\" data-cartid=\"{{ Product.id }}\" form=\"productForm{{ Product.id }}\">#}
  1098.                                     {#    {{ 'カートに入れる'|trans }}#}
  1099.                                     {#</button>#}
  1100.                                     {#{% endif %}#}
  1101.                                 </div>
  1102.                                 {% else %}
  1103.                                 {#<div class=\"ec-productRole__btn\">#}
  1104.                                 {#    <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">#}
  1105.                                 {#        {{ 'ただいま品切れ中です。'|trans }}#}
  1106.                                 {#    </button>#}
  1107.                                 {#</div>#}
  1108.                             {% endif %}
  1109.                         </li>
  1110.                     {% endfor %}
  1111.                 </ul>
  1112.             </div>
  1113.             <div class=\"ec-modal\">
  1114.                 <div class=\"ec-modal-overlay\">
  1115.                     <div class=\"ec-modal-wrap\">
  1116.                         <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1117.                         <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1118.                         <div class=\"ec-modal-box\">
  1119.                             <div class=\"ec-role\">
  1120.                                 <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1121.                                 <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1122.                             </div>
  1123.                         </div>
  1124.                     </div>
  1125.                 </div>
  1126.             </div>
  1127.             <div class=\"ec-pagerRole\">
  1128.                 {% include \"pager.twig\" with {'pages': pagination.paginationData} %}
  1129.             </div>
  1130.         {% endif %}
  1131.     {% endif %}
  1132. {% endblock %}
  1133. ""Product/list.twig""/home/multipure03/multipure.co.jp/public_html/dev-shop.multipure.co.jp/app/template/default/Product/list.twig");
  1134.     }
  1135. }