var/cache/dev/twig/a1/a12531506e9e45d29605aa91769142b682491406b10b87fa6b76e061779b1375.php line 40

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/detail.twig */
  14. class __TwigTemplate_2ff6fc0185ba932717ee492599358283389bbad343a0e2b97ffbfb94a9e80a46 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.             'stylesheet' => [$this'block_stylesheet'],
  24.             'javascript' => [$this'block_javascript'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 11
  31.         return "default_frame.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  40.         // line 13
  41.         $context["body_class"] = "product_page";
  42.         // line 11
  43.         $this->parent $this->loadTemplate("default_frame.twig""Product/detail.twig"11);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  47.         
  48.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  49.     }
  50.     // line 15
  51.     public function block_stylesheet($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  58.         // line 16
  59.         echo "    <style>
  60.         .slick-slider {
  61.             margin-bottom: 30px;
  62.         }
  63.         .slick-dots {
  64.             position: absolute;
  65.             bottom: -45px;
  66.             display: block;
  67.             width: 100%;
  68.             padding: 0;
  69.             list-style: none;
  70.             text-align: center;
  71.         }
  72.         .slick-dots li {
  73.             position: relative;
  74.             display: inline-block;
  75.             width: 20px;
  76.             height: 20px;
  77.             margin: 0 5px;
  78.             padding: 0;
  79.             cursor: pointer;
  80.         }
  81.         .slick-dots li button {
  82.             font-size: 0;
  83.             line-height: 0;
  84.             display: block;
  85.             width: 20px;
  86.             height: 20px;
  87.             padding: 5px;
  88.             cursor: pointer;
  89.             color: transparent;
  90.             border: 0;
  91.             outline: none;
  92.             background: transparent;
  93.         }
  94.         .slick-dots li button:hover,
  95.         .slick-dots li button:focus {
  96.             outline: none;
  97.         }
  98.         .slick-dots li button:hover:before,
  99.         .slick-dots li button:focus:before {
  100.             opacity: 1;
  101.         }
  102.         .slick-dots li button:before {
  103.             content: \" \";
  104.             line-height: 20px;
  105.             position: absolute;
  106.             top: 0;
  107.             left: 0;
  108.             width: 12px;
  109.             height: 12px;
  110.             text-align: center;
  111.             opacity: .25;
  112.             background-color: black;
  113.             border-radius: 50%;
  114.         }
  115.         .slick-dots li.slick-active button:before {
  116.             opacity: .75;
  117.             background-color: black;
  118.         }
  119.         .slick-dots li button.thumbnail img {
  120.             width: 0;
  121.             height: 0;
  122.         }
  123.     </style>
  124. ";
  125.         
  126.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  127.         
  128.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  129.     }
  130.     // line 95
  131.     public function block_javascript($context, array $blocks = [])
  132.     {
  133.         $macros $this->macros;
  134.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  135.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  136.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  137.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  138.         // line 96
  139.         echo "    <script>
  140.         eccube.classCategories = ";
  141.         // line 97
  142.         echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson((isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'97$this->source); })()));
  143.         echo ";
  144.         // 規格2に選択肢を割り当てる。
  145.         function fnSetClassCategories(form, classcat_id2_selected) {
  146.             var \$form = \$(form);
  147.             var product_id = \$form.find('input[name=product_id]').val();
  148.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  149.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  150.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  151.         }
  152.         ";
  153.         // line 108
  154.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse108)) {
  155.             // line 109
  156.             echo "        fnSetClassCategories(
  157.             \$('#form1'), ";
  158.             // line 110
  159.             echo json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'110$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse110), "vars", [], "any"falsefalsefalse110), "value", [], "any"falsefalsefalse110));
  160.             echo "
  161.         );
  162.         ";
  163.         } elseif (twig_get_attribute($this->env$this->source,         // line 112
  164. ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse112)) {
  165.             // line 113
  166.             echo "        eccube.checkStock(\$('#form1'), ";
  167.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'113$this->source); })()), "id", [], "any"falsefalsefalse113), "html"nulltrue);
  168.             echo ", ";
  169.             echo json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'113$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse113), "vars", [], "any"falsefalsefalse113), "value", [], "any"falsefalsefalse113));
  170.             echo ", null);
  171.         ";
  172.         }
  173.         // line 115
  174.         echo "    </script>
  175.     <script>
  176.         \$(function() {
  177.             // bfcache無効化
  178.             \$(window).bind('pageshow', function(event) {
  179.                 if (event.originalEvent.persisted) {
  180.                     location.reload(true);
  181.                 }
  182.             });
  183.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  184.             // img タグに width, height が付与されている.
  185.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  186.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  187.             \$('.ec-grid2__cell').hide();
  188.             var removeSize = function () {
  189.                 \$('.slide-item').height('');
  190.                 \$('.slide-item img')
  191.                     .removeAttr('width')
  192.                     .removeAttr('height')
  193.                     .removeAttr('style');
  194.             };
  195.             var slickInitial = function(slick) {
  196.                 \$('.ec-grid2__cell').fadeIn(1500);
  197.                 var baseHeight = \$(slick.target).height();
  198.                 var baseWidth = \$(slick.target).width();
  199.                 var rate = baseWidth / baseHeight;
  200.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  201.                 // transform を使用することでCLSの影響を受けないようにする
  202.                 \$('.slide-item img')
  203.                     .css(
  204.                         {
  205.                             'transform-origin': 'top left',
  206.                             'transform': 'scaleY(' + rate + ')',
  207.                             'transition': 'transform .1s'
  208.                         }
  209.                     );
  210.                 // 正しいサイズに近くなったら属性を解除する
  211.                 setTimeout(removeSize, 500);
  212.             };
  213.             \$('.item_visual').on('init', slickInitial);
  214.             // リサイズ時は CLS の影響を受けないため属性を解除する
  215.             \$(window).resize(removeSize);
  216.             \$('.item_visual').slick({
  217.                 dots: false,
  218.                 arrows: false,
  219.                 responsive: [{
  220.                     breakpoint: 768,
  221.                     settings: {
  222.                         dots: true
  223.                     }
  224.                 }]
  225.             });
  226.             \$('.slideThumb').on('click', function() {
  227.                 var index = \$(this).attr('data-index');
  228.                 \$('.item_visual').slick('slickGoTo', index, false);
  229.             })
  230.         });
  231.     </script>
  232.     <script>
  233.         \$(function() {
  234.             \$('.add-cart').on('click', function(event) {
  235.                 ";
  236.         // line 179
  237.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse179)) {
  238.             // line 180
  239.             echo "                // 規格1フォームの必須チェック
  240.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  241.                     \$('#classcategory_id1')[0].setCustomValidity('";
  242.             // line 182
  243.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  244.             echo "');
  245.                     return true;
  246.                 } else {
  247.                     \$('#classcategory_id1')[0].setCustomValidity('');
  248.                 }
  249.                 ";
  250.         }
  251.         // line 188
  252.         echo "
  253.                 ";
  254.         // line 189
  255.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse189)) {
  256.             // line 190
  257.             echo "                // 規格2フォームの必須チェック
  258.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  259.                     \$('#classcategory_id2')[0].setCustomValidity('";
  260.             // line 192
  261.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  262.             echo "');
  263.                     return true;
  264.                 } else {
  265.                     \$('#classcategory_id2')[0].setCustomValidity('');
  266.                 }
  267.                 ";
  268.         }
  269.         // line 198
  270.         echo "
  271.                 // 個数フォームのチェック
  272.                 if (\$('#quantity').val() < 1) {
  273.                     \$('#quantity')[0].setCustomValidity('";
  274.         // line 201
  275.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  276.         echo "');
  277.                     return true;
  278.                 } else {
  279.                     \$('#quantity')[0].setCustomValidity('');
  280.                 }
  281.                 event.preventDefault();
  282.                 \$form = \$('#form1');
  283.                 \$.ajax({
  284.                     url: \$form.attr('action'),
  285.                     type: \$form.attr('method'),
  286.                     data: \$form.serialize(),
  287.                     dataType: 'json',
  288.                     beforeSend: function(xhr, settings) {
  289.                         // Buttonを無効にする
  290.                         \$('.add-cart').prop('disabled', true);
  291.                     }
  292.                 }).done(function(data) {
  293.                     // レスポンス内のメッセージをalertで表示
  294.                     \$.each(data.messages, function() {
  295.                         \$('#ec-modal-header').text(this);
  296.                     });
  297.                     \$('.ec-modal').show()
  298.                     // カートブロックを更新する
  299.                     \$.ajax({
  300.                         url: \"";
  301.         // line 228
  302.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  303.         echo "\",
  304.                         type: 'GET',
  305.                         dataType: 'html'
  306.                     }).done(function(html) {
  307.                         \$('.ec-headerRole__cart').html(html);
  308.                     });
  309.                 }).fail(function(data) {
  310.                     alert('";
  311.         // line 235
  312.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  313.         echo "');
  314.                 }).always(function(data) {
  315.                     // Buttonを有効にする
  316.                     \$('.add-cart').prop('disabled', false);
  317.                 });
  318.             });
  319.         });
  320.         \$('.ec-modal-wrap').on('click', function(e) {
  321.             // モーダル内の処理は外側にバブリングさせない
  322.             e.stopPropagation();
  323.         });
  324.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  325.             \$('.ec-modal').hide()
  326.         });
  327.     </script>
  328.     <script type=\"application/ld+json\">
  329.     {
  330.         \"@context\": \"https://schema.org/\",
  331.         \"@type\": \"Product\",
  332.         \"name\": \"";
  333.         // line 255
  334.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'255$this->source); })()), "name", [], "any"falsefalsefalse255), "html"nulltrue);
  335.         echo "\",
  336.         \"image\": [
  337.             ";
  338.         // line 257
  339.         $context['_parent'] = $context;
  340.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'257$this->source); })()), "ProductImage", [], "any"falsefalsefalse257));
  341.         $context['_iterated'] = false;
  342.         $context['loop'] = [
  343.           'parent' => $context['_parent'],
  344.           'index0' => 0,
  345.           'index'  => 1,
  346.           'first'  => true,
  347.         ];
  348.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  349.             $length count($context['_seq']);
  350.             $context['loop']['revindex0'] = $length 1;
  351.             $context['loop']['revindex'] = $length;
  352.             $context['loop']['length'] = $length;
  353.             $context['loop']['last'] = === $length;
  354.         }
  355.         foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
  356.             // line 258
  357.             echo "                \"";
  358.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'258$this->source); })()), "request", [], "any"falsefalsefalse258), "schemeAndHttpHost", [], "any"falsefalsefalse258), "html"nulltrue);
  359.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html"nulltrue);
  360.             echo "\"";
  361.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse258)) {
  362.                 echo ",";
  363.             }
  364.             // line 259
  365.             echo "
  366.             ";
  367.             $context['_iterated'] = true;
  368.             ++$context['loop']['index0'];
  369.             ++$context['loop']['index'];
  370.             $context['loop']['first'] = false;
  371.             if (isset($context['loop']['length'])) {
  372.                 --$context['loop']['revindex0'];
  373.                 --$context['loop']['revindex'];
  374.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  375.             }
  376.         }
  377.         if (!$context['_iterated']) {
  378.             // line 261
  379.             echo "                \"";
  380.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'261$this->source); })()), "request", [], "any"falsefalsefalse261), "schemeAndHttpHost", [], "any"falsefalsefalse261), "html"nulltrue);
  381.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html"nulltrue);
  382.             echo "\"
  383.             ";
  384.         }
  385.         $_parent $context['_parent'];
  386.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
  387.         $context array_intersect_key($context$_parent) + $_parent;
  388.         // line 263
  389.         echo "        ],
  390.         \"description\": \"";
  391.         // line 264
  392.         echo twig_escape_filter($this->envtwig_slice($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"truetruefalse264)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"falsefalsefalse264), twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'264$this->source); })()), "description_detail", [], "any"falsefalsefalse264))) : (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'264$this->source); })()), "description_detail", [], "any"falsefalsefalse264))), ["
  393. => """ " => ""]), 0300), "html"nulltrue);
  394.         echo "\",
  395.         ";
  396.         // line 265
  397.         if (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'265$this->source); })()), "code_min", [], "any"falsefalsefalse265)) {
  398.             // line 266
  399.             echo "        \"sku\": \"";
  400.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'266$this->source); })()), "code_min", [], "any"falsefalsefalse266), "html"nulltrue);
  401.             echo "\",
  402.         ";
  403.         }
  404.         // line 268
  405.         echo "        \"offers\": {
  406.             \"@type\": \"Offer\",
  407.             \"url\": \"";
  408.         // line 270
  409.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'270$this->source); })()), "id", [], "any"falsefalsefalse270)]), "html"nulltrue);
  410.         echo "\",
  411.             \"priceCurrency\": \"";
  412.         // line 271
  413.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["eccube_config"]) || array_key_exists("eccube_config"$context) ? $context["eccube_config"] : (function () { throw new RuntimeError('Variable "eccube_config" does not exist.'271$this->source); })()), "currency", [], "any"falsefalsefalse271), "html"nulltrue);
  414.         echo "\",
  415.             \"price\": ";
  416.         // line 272
  417.         ((twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'272$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse272)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'272$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse272), "html"nulltrue))) : (print (0)));
  418.         echo ",
  419.             \"availability\": \"";
  420.         // line 273
  421.         echo ((twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'273$this->source); })()), "stock_find", [], "any"falsefalsefalse273)) ? ("InStock") : ("OutOfStock"));
  422.         echo "\"
  423.         }
  424.     }
  425.     </script>
  426. ";
  427.         
  428.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  429.         
  430.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  431.     }
  432.     // line 279
  433.     public function block_main($context, array $blocks = [])
  434.     {
  435.         $macros $this->macros;
  436.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  437.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  438.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  439.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  440.         // line 280
  441.         echo "    <div class=\"ec-productRole\">
  442.         <div class=\"ec-grid2\">
  443.             <div class=\"ec-grid2__cell\">
  444.                 <div class=\"ec-sliderItemRole\">
  445.                     <div class=\"item_visual\">
  446.                         ";
  447.         // line 286
  448.         $context['_parent'] = $context;
  449.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'286$this->source); })()), "ProductImage", [], "any"falsefalsefalse286));
  450.         $context['_iterated'] = false;
  451.         $context['loop'] = [
  452.           'parent' => $context['_parent'],
  453.           'index0' => 0,
  454.           'index'  => 1,
  455.           'first'  => true,
  456.         ];
  457.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  458.             $length count($context['_seq']);
  459.             $context['loop']['revindex0'] = $length 1;
  460.             $context['loop']['revindex'] = $length;
  461.             $context['loop']['length'] = $length;
  462.             $context['loop']['last'] = === $length;
  463.         }
  464.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  465.             // line 287
  466.             echo "                            <div class=\"slide-item\"><img src=\"";
  467.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  468.             echo "\" alt=\"";
  469.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse287)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'287$this->source); })()), "name", [], "any"falsefalsefalse287), "html"nulltrue))) : (print ("")));
  470.             echo "\" width=\"550\" height=\"550\"";
  471.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse287) > 1)) {
  472.                 echo " loading=\"lazy\"";
  473.             }
  474.             echo "></div>
  475.                         ";
  476.             $context['_iterated'] = true;
  477.             ++$context['loop']['index0'];
  478.             ++$context['loop']['index'];
  479.             $context['loop']['first'] = false;
  480.             if (isset($context['loop']['length'])) {
  481.                 --$context['loop']['revindex0'];
  482.                 --$context['loop']['revindex'];
  483.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  484.             }
  485.         }
  486.         if (!$context['_iterated']) {
  487.             // line 289
  488.             echo "                            <div class=\"slide-item\"><img src=\"";
  489.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html"nulltrue);
  490.             echo "\" alt=\"";
  491.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse289)) ? (print (twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'289$this->source); })()), "name", [], "any"falsefalsefalse289), "html"nulltrue))) : (print ("")));
  492.             echo "\" width=\"550\" height=\"550\"></div>
  493.                         ";
  494.         }
  495.         $_parent $context['_parent'];
  496.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  497.         $context array_intersect_key($context$_parent) + $_parent;
  498.         // line 291
  499.         echo "                    </div>
  500.                     <div class=\"item_nav\">
  501.                         ";
  502.         // line 293
  503.         $context['_parent'] = $context;
  504.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'293$this->source); })()), "ProductImage", [], "any"falsefalsefalse293));
  505.         $context['loop'] = [
  506.           'parent' => $context['_parent'],
  507.           'index0' => 0,
  508.           'index'  => 1,
  509.           'first'  => true,
  510.         ];
  511.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  512.             $length count($context['_seq']);
  513.             $context['loop']['revindex0'] = $length 1;
  514.             $context['loop']['revindex'] = $length;
  515.             $context['loop']['length'] = $length;
  516.             $context['loop']['last'] = === $length;
  517.         }
  518.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  519.             // line 294
  520.             echo "                            <div class=\"slideThumb\" data-index=\"";
  521.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse294), "html"nulltrue);
  522.             echo "\"><img src=\"";
  523.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  524.             echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  525.                         ";
  526.             ++$context['loop']['index0'];
  527.             ++$context['loop']['index'];
  528.             $context['loop']['first'] = false;
  529.             if (isset($context['loop']['length'])) {
  530.                 --$context['loop']['revindex0'];
  531.                 --$context['loop']['revindex'];
  532.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  533.             }
  534.         }
  535.         $_parent $context['_parent'];
  536.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  537.         $context array_intersect_key($context$_parent) + $_parent;
  538.         // line 296
  539.         echo "                    </div>
  540.                 </div>
  541.             </div>
  542.             <div class=\"ec-grid2__cell\">
  543.                 <div class=\"ec-productRole__profile\">
  544.                     ";
  545.         // line 302
  546.         echo "                    <div class=\"ec-productRole__title\">
  547.                         <h2 class=\"ec-headingTitle\">";
  548.         // line 303
  549.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'303$this->source); })()), "name", [], "any"falsefalsefalse303), "html"nulltrue);
  550.         echo "</h2>
  551.                     </div>
  552.                     ";
  553.         // line 306
  554.         echo "                    ";
  555.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'306$this->source); })()), "Tags", [], "any"falsefalsefalse306))) {
  556.             // line 307
  557.             echo "                        <ul class=\"ec-productRole__tags\">
  558.                             ";
  559.             // line 308
  560.             $context['_parent'] = $context;
  561.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'308$this->source); })()), "Tags", [], "any"falsefalsefalse308));
  562.             foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  563.                 // line 309
  564.                 echo "                                <li class=\"ec-productRole__tag tag_";
  565.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse309), "html"nulltrue);
  566.                 echo "\">";
  567.                 echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  568.                 echo "</li>
  569.                             ";
  570.             }
  571.             $_parent $context['_parent'];
  572.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  573.             $context array_intersect_key($context$_parent) + $_parent;
  574.             // line 311
  575.             echo "                        </ul>
  576.                     ";
  577.         }
  578.         // line 313
  579.         echo "                    ";
  580.         // line 314
  581.         echo "                    ";
  582.         if (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'314$this->source); })()), "hasProductClass", [], "any"falsefalsefalse314)) {
  583.             // line 315
  584.             echo "<div class=\"ec-productRole__priceRegular\">
  585.                             ";
  586.             // line 316
  587.             if (( !(null === twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'316$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse316)) && (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'316$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse316) == twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'316$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse316)))) {
  588.                 // line 317
  589.                 echo "                                <span class=\"ec-productRole__priceRegularPrice\">";
  590.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  591.                 echo ":<span class=\"price01-default\">";
  592.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'317$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse317)), "html"nulltrue);
  593.                 echo "</span></span>
  594.                                 <span class=\"ec-productRole__priceRegularTax\">";
  595.                 // line 318
  596.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  597.                 echo "</span>
  598.                             ";
  599.             } elseif (( !(null === twig_get_attribute($this->env$this->source,             // line 319
  600. (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'319$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse319)) &&  !(null === twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'319$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse319)))) {
  601.                 // line 320
  602.                 echo "                                <span class=\"ec-productRole__priceRegularPrice\">";
  603.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  604.                 echo ":<span class=\"price01-default\">";
  605.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'320$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse320)), "html"nulltrue);
  606.                 echo "~ ";
  607.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'320$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse320)), "html"nulltrue);
  608.                 echo "</span></span>
  609.                                 <span class=\"ec-productRole__priceRegularTax\">";
  610.                 // line 321
  611.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  612.                 echo "</span>
  613.                             ";
  614.             }
  615.             // line 323
  616.             echo "                        </div>
  617.                     ";
  618.         } else {
  619.             // line 325
  620.             echo "                        ";
  621.             if ( !(null === twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'325$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse325))) {
  622.                 // line 326
  623.                 echo "                            <span class=\"ec-productRole__priceRegularPrice\">";
  624.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  625.                 echo ":";
  626.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'326$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse326)), "html"nulltrue);
  627.                 echo "</span>
  628.                             <span class=\"ec-productRole__priceRegularTax\">";
  629.                 // line 327
  630.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  631.                 echo "</span>
  632.                         ";
  633.             }
  634.             // line 329
  635.             echo "                    ";
  636.         }
  637.         // line 330
  638.         echo "                    ";
  639.         // line 331
  640.         echo "                    <div class=\"ec-productRole__price\">
  641.                         ";
  642.         // line 332
  643.         if (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'332$this->source); })()), "hasProductClass", [], "any"falsefalsefalse332)) {
  644.             // line 333
  645.             if ((twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'333$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse333) == twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'333$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse333))) {
  646.                 // line 334
  647.                 echo "                                <div class=\"ec-price\">
  648.                                     <span class=\"ec-price__price price02-default\">";
  649.                 // line 335
  650.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'335$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse335)), "html"nulltrue);
  651.                 echo "</span>
  652.                                     <span class=\"ec-price__tax\">";
  653.                 // line 336
  654.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  655.                 echo "</span>
  656.                                 </div>
  657.                             ";
  658.             } else {
  659.                 // line 339
  660.                 echo "                                <div class=\"ec-price\">
  661.                                     <span class=\"ec-price__price price02-default\">";
  662.                 // line 340
  663.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'340$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse340)), "html"nulltrue);
  664.                 echo " ~ ";
  665.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'340$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse340)), "html"nulltrue);
  666.                 echo "</span>
  667.                                     <span class=\"ec-price__tax\">";
  668.                 // line 341
  669.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  670.                 echo "</span>
  671.                                 </div>
  672.                             ";
  673.             }
  674.             // line 344
  675.             echo "                        ";
  676.         } else {
  677.             // line 345
  678.             echo "                            <div class=\"ec-price\">
  679.                                 <span class=\"ec-price__price\">";
  680.             // line 346
  681.             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'346$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse346)), "html"nulltrue);
  682.             echo "</span>
  683.                                 <span class=\"ec-price__tax\">";
  684.             // line 347
  685.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  686.             echo "</span>
  687.                             </div>
  688.                         ";
  689.         }
  690.         // line 350
  691.         echo "                    </div>
  692.                     ";
  693.         // line 352
  694.         echo "                    ";
  695.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'352$this->source); })()), "code_min", [], "any"falsefalsefalse352))) {
  696.             // line 353
  697.             echo "                        <div class=\"ec-productRole__code\">
  698.                             ";
  699.             // line 354
  700.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html"nulltrue);
  701.             echo ": <span class=\"product-code-default\">";
  702.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'354$this->source); })()), "code_min", [], "any"falsefalsefalse354), "html"nulltrue);
  703.             if ((twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'354$this->source); })()), "code_min", [], "any"falsefalsefalse354) != twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'354$this->source); })()), "code_max", [], "any"falsefalsefalse354))) {
  704.                 echo " ~ ";
  705.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'354$this->source); })()), "code_max", [], "any"falsefalsefalse354), "html"nulltrue);
  706.             }
  707.             echo "</span>
  708.                         </div>
  709.                     ";
  710.         }
  711.         // line 357
  712.         echo "                    ";
  713.         // line 358
  714.         echo "                    ";
  715.         if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'358$this->source); })()), "ProductCategories", [], "any"falsefalsefalse358))) {
  716.             // line 359
  717.             echo "                        <div class=\"ec-productRole__category\">
  718.                             <div>";
  719.             // line 360
  720.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html"nulltrue);
  721.             echo "</div>
  722.                             ";
  723.             // line 361
  724.             $context['_parent'] = $context;
  725.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'361$this->source); })()), "ProductCategories", [], "any"falsefalsefalse361));
  726.             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  727.                 // line 362
  728.                 echo "                                <ul>
  729.                                     <li>
  730.                                         ";
  731.                 // line 364
  732.                 $context['_parent'] = $context;
  733.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsefalse364), "path", [], "any"falsefalsefalse364));
  734.                 $context['loop'] = [
  735.                   'parent' => $context['_parent'],
  736.                   'index0' => 0,
  737.                   'index'  => 1,
  738.                   'first'  => true,
  739.                 ];
  740.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  741.                     $length count($context['_seq']);
  742.                     $context['loop']['revindex0'] = $length 1;
  743.                     $context['loop']['revindex'] = $length;
  744.                     $context['loop']['length'] = $length;
  745.                     $context['loop']['last'] = === $length;
  746.                 }
  747.                 foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  748.                     // line 365
  749.                     echo "                                            <a href=\"";
  750.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  751.                     echo "?category_id=";
  752.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse365), "html"nulltrue);
  753.                     echo "\">";
  754.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse365), "html"nulltrue);
  755.                     echo "</a>";
  756.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse365) == false)) {
  757.                         // line 366
  758.                         echo "                                            <span>></span>";
  759.                     }
  760.                     ++$context['loop']['index0'];
  761.                     ++$context['loop']['index'];
  762.                     $context['loop']['first'] = false;
  763.                     if (isset($context['loop']['length'])) {
  764.                         --$context['loop']['revindex0'];
  765.                         --$context['loop']['revindex'];
  766.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  767.                     }
  768.                 }
  769.                 $_parent $context['_parent'];
  770.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  771.                 $context array_intersect_key($context$_parent) + $_parent;
  772.                 // line 368
  773.                 echo "                                    </li>
  774.                                 </ul>
  775.                             ";
  776.             }
  777.             $_parent $context['_parent'];
  778.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  779.             $context array_intersect_key($context$_parent) + $_parent;
  780.             // line 371
  781.             echo "                        </div>
  782.                     ";
  783.         }
  784.         // line 373
  785.         echo "                    <form action=\"";
  786.         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, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'373$this->source); })()), "id", [], "any"falsefalsefalse373)]), "html"nulltrue);
  787.         echo "\" method=\"post\" id=\"form1\" name=\"form1\">
  788.                         ";
  789.         // line 374
  790.         if (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'374$this->source); })()), "stock_find", [], "any"falsefalsefalse374)) {
  791.             // line 375
  792.             echo "                            <div class=\"ec-productRole__actions\">
  793.                                 ";
  794.             // line 376
  795.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse376)) {
  796.                 // line 377
  797.                 echo "                                    <div class=\"ec-select\">
  798.                                         ";
  799.                 // line 378
  800.                 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.'378$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse378), 'row');
  801.                 echo "
  802.                                         ";
  803.                 // line 379
  804.                 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.'379$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse379), 'errors');
  805.                 echo "
  806.                                     </div>
  807.                                     ";
  808.                 // line 381
  809.                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse381)) {
  810.                     // line 382
  811.                     echo "                                        <div class=\"ec-select\">
  812.                                             ";
  813.                     // line 383
  814.                     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.'383$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse383), 'row');
  815.                     echo "
  816.                                             ";
  817.                     // line 384
  818.                     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.'384$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse384), 'errors');
  819.                     echo "
  820.                                         </div>
  821.                                     ";
  822.                 }
  823.                 // line 387
  824.                 echo "                                ";
  825.             }
  826.             // line 388
  827.             echo "                                <div class=\"ec-numberInput\"><span>";
  828.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  829.             echo "</span>
  830.                                     ";
  831.             // line 389
  832.             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.'389$this->source); })()), "quantity", [], "any"falsefalsefalse389), 'widget');
  833.             echo "
  834.                                     ";
  835.             // line 390
  836.             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.'390$this->source); })()), "quantity", [], "any"falsefalsefalse390), 'errors');
  837.             echo "
  838.                                 </div>
  839.                             </div>
  840.                             <div class=\"ec-productRole__btn\">
  841.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  842.                                     ";
  843.             // line 395
  844.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  845.             echo "
  846.                                 </button>
  847.                             </div>
  848.                         ";
  849.         } else {
  850.             // line 399
  851.             echo "                            <div class=\"ec-productRole__btn\">
  852.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  853.                                     ";
  854.             // line 401
  855.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  856.             echo "
  857.                                 </button>
  858.                             </div>
  859.                         ";
  860.         }
  861.         // line 405
  862.         echo "
  863.                         ";
  864.         // line 406
  865.         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.'406$this->source); })()), 'rest');
  866.         echo "
  867.                     </form>
  868.                     <div class=\"ec-modal\">
  869.                         <div class=\"ec-modal-overlay\">
  870.                             <div class=\"ec-modal-wrap\">
  871.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  872.         // line 411
  873.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  874.         echo "\" alt=\"\"/></span></span>
  875.                                 <div id=\"ec-modal-header\" class=\"text-center\">";
  876.         // line 412
  877.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  878.         echo "</div>
  879.                                 <div class=\"ec-modal-box\">
  880.                                     <div class=\"ec-role\">
  881.                                         <span class=\"ec-inlineBtn--cancel\">";
  882.         // line 415
  883.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  884.         echo "</span>
  885.                                         <a href=\"";
  886.         // line 416
  887.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  888.         echo "\" class=\"ec-inlineBtn--action\">";
  889.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  890.         echo "</a>
  891.                                     </div>
  892.                                 </div>
  893.                             </div>
  894.                         </div>
  895.                     </div>
  896.                     ";
  897.         // line 422
  898.         if (twig_get_attribute($this->env$this->source, (isset($context["BaseInfo"]) || array_key_exists("BaseInfo"$context) ? $context["BaseInfo"] : (function () { throw new RuntimeError('Variable "BaseInfo" does not exist.'422$this->source); })()), "option_favorite_product", [], "any"falsefalsefalse422)) {
  899.             // line 423
  900.             echo "                        <form action=\"";
  901.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_add_favorite", ["id" => twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'423$this->source); })()), "id", [], "any"falsefalsefalse423)]), "html"nulltrue);
  902.             echo "\" method=\"post\">
  903.                             <div class=\"ec-productRole__btn\">
  904.                                 ";
  905.             // line 425
  906.             if (((isset($context["is_favorite"]) || array_key_exists("is_favorite"$context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.'425$this->source); })()) == false)) {
  907.                 // line 426
  908.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  909.                                         ";
  910.                 // line 427
  911.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html"nulltrue);
  912.                 echo "
  913.                                     </button>
  914.                                 ";
  915.             } else {
  916.                 // line 430
  917.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  918.                                             disabled=\"disabled\">";
  919.                 // line 431
  920.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html"nulltrue);
  921.                 echo "
  922.                                     </button>
  923.                                 ";
  924.             }
  925.             // line 434
  926.             echo "                            </div>
  927.                         </form>
  928.                     ";
  929.         }
  930.         // line 437
  931.         echo "                    <div class=\"ec-productRole__description\">";
  932.         echo twig_nl2br(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'437$this->source); })()), "description_detail", [], "any"falsefalsefalse437));
  933.         echo "
  934.                     </div>
  935.                 </div>
  936.             </div>
  937.         </div>
  938.         ";
  939.         // line 442
  940.         if (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'442$this->source); })()), "freearea", [], "any"falsefalsefalse442)) {
  941.             // line 443
  942.             echo "             <div class=\"ec-productRole__description\">
  943.                  ";
  944.             // line 444
  945.             echo twig_include($this->env$contexttwig_template_from_string($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'444$this->source); })()), "freearea", [], "any"falsefalsefalse444)));
  946.             echo "
  947.             </div>
  948.         ";
  949.         }
  950.         // line 447
  951.         echo "    </div>
  952. ";
  953.         
  954.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  955.         
  956.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  957.     }
  958.     public function getTemplateName()
  959.     {
  960.         return "Product/detail.twig";
  961.     }
  962.     public function isTraitable()
  963.     {
  964.         return false;
  965.     }
  966.     public function getDebugInfo()
  967.     {
  968.         return array (  997 => 447,  991 => 444,  988 => 443,  986 => 442,  977 => 437,  972 => 434,  966 => 431,  963 => 430,  957 => 427,  954 => 426,  952 => 425,  946 => 423,  944 => 422,  933 => 416,  929 => 415,  923 => 412,  919 => 411,  911 => 406,  908 => 405,  901 => 401,  897 => 399,  890 => 395,  882 => 390,  878 => 389,  873 => 388,  870 => 387,  864 => 384,  860 => 383,  857 => 382,  855 => 381,  850 => 379,  846 => 378,  843 => 377,  841 => 376,  838 => 375,  836 => 374,  831 => 373,  827 => 371,  819 => 368,  804 => 366,  795 => 365,  778 => 364,  774 => 362,  770 => 361,  766 => 360,  763 => 359,  760 => 358,  758 => 357,  746 => 354,  743 => 353,  740 => 352,  737 => 350,  731 => 347,  727 => 346,  724 => 345,  721 => 344,  715 => 341,  709 => 340,  706 => 339,  700 => 336,  696 => 335,  693 => 334,  691 => 333,  689 => 332,  686 => 331,  684 => 330,  681 => 329,  676 => 327,  669 => 326,  666 => 325,  662 => 323,  657 => 321,  648 => 320,  646 => 319,  642 => 318,  635 => 317,  633 => 316,  630 => 315,  627 => 314,  625 => 313,  621 => 311,  610 => 309,  606 => 308,  603 => 307,  600 => 306,  595 => 303,  592 => 302,  585 => 296,  566 => 294,  549 => 293,  545 => 291,  534 => 289,  512 => 287,  494 => 286,  486 => 280,  476 => 279,  461 => 273,  457 => 272,  453 => 271,  449 => 270,  445 => 268,  439 => 266,  437 => 265,  432 => 264,  429 => 263,  419 => 261,  405 => 259,  397 => 258,  379 => 257,  374 => 255,  351 => 235,  341 => 228,  311 => 201,  306 => 198,  297 => 192,  293 => 190,  291 => 189,  288 => 188,  279 => 182,  275 => 180,  273 => 179,  207 => 115,  199 => 113,  197 => 112,  192 => 110,  189 => 109,  187 => 108,  173 => 97,  170 => 96,  160 => 95,  73 => 16,  63 => 15,  52 => 11,  50 => 13,  37 => 11,);
  969.     }
  970.     public function getSourceContext()
  971.     {
  972.         return new Source("{#
  973. This file is part of EC-CUBE
  974. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  975. http://www.ec-cube.co.jp/
  976. For the full copyright and license information, please view the LICENSE
  977. file that was distributed with this source code.
  978. #}
  979. {% extends 'default_frame.twig' %}
  980. {% set body_class = 'product_page' %}
  981. {% block stylesheet %}
  982.     <style>
  983.         .slick-slider {
  984.             margin-bottom: 30px;
  985.         }
  986.         .slick-dots {
  987.             position: absolute;
  988.             bottom: -45px;
  989.             display: block;
  990.             width: 100%;
  991.             padding: 0;
  992.             list-style: none;
  993.             text-align: center;
  994.         }
  995.         .slick-dots li {
  996.             position: relative;
  997.             display: inline-block;
  998.             width: 20px;
  999.             height: 20px;
  1000.             margin: 0 5px;
  1001.             padding: 0;
  1002.             cursor: pointer;
  1003.         }
  1004.         .slick-dots li button {
  1005.             font-size: 0;
  1006.             line-height: 0;
  1007.             display: block;
  1008.             width: 20px;
  1009.             height: 20px;
  1010.             padding: 5px;
  1011.             cursor: pointer;
  1012.             color: transparent;
  1013.             border: 0;
  1014.             outline: none;
  1015.             background: transparent;
  1016.         }
  1017.         .slick-dots li button:hover,
  1018.         .slick-dots li button:focus {
  1019.             outline: none;
  1020.         }
  1021.         .slick-dots li button:hover:before,
  1022.         .slick-dots li button:focus:before {
  1023.             opacity: 1;
  1024.         }
  1025.         .slick-dots li button:before {
  1026.             content: \" \";
  1027.             line-height: 20px;
  1028.             position: absolute;
  1029.             top: 0;
  1030.             left: 0;
  1031.             width: 12px;
  1032.             height: 12px;
  1033.             text-align: center;
  1034.             opacity: .25;
  1035.             background-color: black;
  1036.             border-radius: 50%;
  1037.         }
  1038.         .slick-dots li.slick-active button:before {
  1039.             opacity: .75;
  1040.             background-color: black;
  1041.         }
  1042.         .slick-dots li button.thumbnail img {
  1043.             width: 0;
  1044.             height: 0;
  1045.         }
  1046.     </style>
  1047. {% endblock %}
  1048. {% block javascript %}
  1049.     <script>
  1050.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  1051.         // 規格2に選択肢を割り当てる。
  1052.         function fnSetClassCategories(form, classcat_id2_selected) {
  1053.             var \$form = \$(form);
  1054.             var product_id = \$form.find('input[name=product_id]').val();
  1055.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  1056.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  1057.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  1058.         }
  1059.         {% if form.classcategory_id2 is defined %}
  1060.         fnSetClassCategories(
  1061.             \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  1062.         );
  1063.         {% elseif form.classcategory_id1 is defined %}
  1064.         eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  1065.         {% endif %}
  1066.     </script>
  1067.     <script>
  1068.         \$(function() {
  1069.             // bfcache無効化
  1070.             \$(window).bind('pageshow', function(event) {
  1071.                 if (event.originalEvent.persisted) {
  1072.                     location.reload(true);
  1073.                 }
  1074.             });
  1075.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  1076.             // img タグに width, height が付与されている.
  1077.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  1078.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  1079.             \$('.ec-grid2__cell').hide();
  1080.             var removeSize = function () {
  1081.                 \$('.slide-item').height('');
  1082.                 \$('.slide-item img')
  1083.                     .removeAttr('width')
  1084.                     .removeAttr('height')
  1085.                     .removeAttr('style');
  1086.             };
  1087.             var slickInitial = function(slick) {
  1088.                 \$('.ec-grid2__cell').fadeIn(1500);
  1089.                 var baseHeight = \$(slick.target).height();
  1090.                 var baseWidth = \$(slick.target).width();
  1091.                 var rate = baseWidth / baseHeight;
  1092.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  1093.                 // transform を使用することでCLSの影響を受けないようにする
  1094.                 \$('.slide-item img')
  1095.                     .css(
  1096.                         {
  1097.                             'transform-origin': 'top left',
  1098.                             'transform': 'scaleY(' + rate + ')',
  1099.                             'transition': 'transform .1s'
  1100.                         }
  1101.                     );
  1102.                 // 正しいサイズに近くなったら属性を解除する
  1103.                 setTimeout(removeSize, 500);
  1104.             };
  1105.             \$('.item_visual').on('init', slickInitial);
  1106.             // リサイズ時は CLS の影響を受けないため属性を解除する
  1107.             \$(window).resize(removeSize);
  1108.             \$('.item_visual').slick({
  1109.                 dots: false,
  1110.                 arrows: false,
  1111.                 responsive: [{
  1112.                     breakpoint: 768,
  1113.                     settings: {
  1114.                         dots: true
  1115.                     }
  1116.                 }]
  1117.             });
  1118.             \$('.slideThumb').on('click', function() {
  1119.                 var index = \$(this).attr('data-index');
  1120.                 \$('.item_visual').slick('slickGoTo', index, false);
  1121.             })
  1122.         });
  1123.     </script>
  1124.     <script>
  1125.         \$(function() {
  1126.             \$('.add-cart').on('click', function(event) {
  1127.                 {% if form.classcategory_id1 is defined %}
  1128.                 // 規格1フォームの必須チェック
  1129.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  1130.                     \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1131.                     return true;
  1132.                 } else {
  1133.                     \$('#classcategory_id1')[0].setCustomValidity('');
  1134.                 }
  1135.                 {% endif %}
  1136.                 {% if form.classcategory_id2 is defined %}
  1137.                 // 規格2フォームの必須チェック
  1138.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  1139.                     \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1140.                     return true;
  1141.                 } else {
  1142.                     \$('#classcategory_id2')[0].setCustomValidity('');
  1143.                 }
  1144.                 {% endif %}
  1145.                 // 個数フォームのチェック
  1146.                 if (\$('#quantity').val() < 1) {
  1147.                     \$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  1148.                     return true;
  1149.                 } else {
  1150.                     \$('#quantity')[0].setCustomValidity('');
  1151.                 }
  1152.                 event.preventDefault();
  1153.                 \$form = \$('#form1');
  1154.                 \$.ajax({
  1155.                     url: \$form.attr('action'),
  1156.                     type: \$form.attr('method'),
  1157.                     data: \$form.serialize(),
  1158.                     dataType: 'json',
  1159.                     beforeSend: function(xhr, settings) {
  1160.                         // Buttonを無効にする
  1161.                         \$('.add-cart').prop('disabled', true);
  1162.                     }
  1163.                 }).done(function(data) {
  1164.                     // レスポンス内のメッセージをalertで表示
  1165.                     \$.each(data.messages, function() {
  1166.                         \$('#ec-modal-header').text(this);
  1167.                     });
  1168.                     \$('.ec-modal').show()
  1169.                     // カートブロックを更新する
  1170.                     \$.ajax({
  1171.                         url: \"{{ url('block_cart') }}\",
  1172.                         type: 'GET',
  1173.                         dataType: 'html'
  1174.                     }).done(function(html) {
  1175.                         \$('.ec-headerRole__cart').html(html);
  1176.                     });
  1177.                 }).fail(function(data) {
  1178.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  1179.                 }).always(function(data) {
  1180.                     // Buttonを有効にする
  1181.                     \$('.add-cart').prop('disabled', false);
  1182.                 });
  1183.             });
  1184.         });
  1185.         \$('.ec-modal-wrap').on('click', function(e) {
  1186.             // モーダル内の処理は外側にバブリングさせない
  1187.             e.stopPropagation();
  1188.         });
  1189.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  1190.             \$('.ec-modal').hide()
  1191.         });
  1192.     </script>
  1193.     <script type=\"application/ld+json\">
  1194.     {
  1195.         \"@context\": \"https://schema.org/\",
  1196.         \"@type\": \"Product\",
  1197.         \"name\": \"{{ Product.name }}\",
  1198.         \"image\": [
  1199.             {% for img in Product.ProductImage %}
  1200.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
  1201.             {% else %}
  1202.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
  1203.             {% endfor %}
  1204.         ],
  1205.         \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
  1206.         {% if Product.code_min %}
  1207.         \"sku\": \"{{ Product.code_min }}\",
  1208.         {% endif %}
  1209.         \"offers\": {
  1210.             \"@type\": \"Offer\",
  1211.             \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
  1212.             \"priceCurrency\": \"{{ eccube_config.currency }}\",
  1213.             \"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  1214.             \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
  1215.         }
  1216.     }
  1217.     </script>
  1218. {% endblock %}
  1219. {% block main %}
  1220.     <div class=\"ec-productRole\">
  1221.         <div class=\"ec-grid2\">
  1222.             <div class=\"ec-grid2__cell\">
  1223.                 <div class=\"ec-sliderItemRole\">
  1224.                     <div class=\"item_visual\">
  1225.                         {% for ProductImage in Product.ProductImage %}
  1226.                             <div class=\"slide-item\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
  1227.                         {% else %}
  1228.                             <div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
  1229.                         {% endfor %}
  1230.                     </div>
  1231.                     <div class=\"item_nav\">
  1232.                         {% for ProductImage in Product.ProductImage %}
  1233.                             <div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  1234.                         {% endfor %}
  1235.                     </div>
  1236.                 </div>
  1237.             </div>
  1238.             <div class=\"ec-grid2__cell\">
  1239.                 <div class=\"ec-productRole__profile\">
  1240.                     {# 商品名 #}
  1241.                     <div class=\"ec-productRole__title\">
  1242.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  1243.                     </div>
  1244.                     {# タグ #}
  1245.                     {% if Product.Tags is not empty %}
  1246.                         <ul class=\"ec-productRole__tags\">
  1247.                             {% for Tag in Product.Tags %}
  1248.                                 <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  1249.                             {% endfor %}
  1250.                         </ul>
  1251.                     {% endif %}
  1252.                     {# 通常価格 #}
  1253.                     {% if Product.hasProductClass -%}
  1254.                         <div class=\"ec-productRole__priceRegular\">
  1255.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  1256.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  1257.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1258.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  1259.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  1260.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1261.                             {% endif %}
  1262.                         </div>
  1263.                     {% else %}
  1264.                         {% if Product.getPrice01Max is not null %}
  1265.                             <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  1266.                             <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1267.                         {% endif %}
  1268.                     {% endif %}
  1269.                     {# 販売価格 #}
  1270.                     <div class=\"ec-productRole__price\">
  1271.                         {% if Product.hasProductClass -%}
  1272.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  1273.                                 <div class=\"ec-price\">
  1274.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1275.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1276.                                 </div>
  1277.                             {% else %}
  1278.                                 <div class=\"ec-price\">
  1279.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  1280.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1281.                                 </div>
  1282.                             {% endif %}
  1283.                         {% else %}
  1284.                             <div class=\"ec-price\">
  1285.                                 <span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1286.                                 <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1287.                             </div>
  1288.                         {% endif %}
  1289.                     </div>
  1290.                     {# 商品コード #}
  1291.                     {% if Product.code_min is not empty %}
  1292.                         <div class=\"ec-productRole__code\">
  1293.                             {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1294.                         </div>
  1295.                     {% endif %}
  1296.                     {# 関連カテゴリ #}
  1297.                     {% if Product.ProductCategories is not empty %}
  1298.                         <div class=\"ec-productRole__category\">
  1299.                             <div>{{ '関連カテゴリ'|trans }}</div>
  1300.                             {% for ProductCategory in Product.ProductCategories %}
  1301.                                 <ul>
  1302.                                     <li>
  1303.                                         {% for Category in ProductCategory.Category.path %}
  1304.                                             <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  1305.                                             <span>></span>{% endif -%}
  1306.                                         {% endfor %}
  1307.                                     </li>
  1308.                                 </ul>
  1309.                             {% endfor %}
  1310.                         </div>
  1311.                     {% endif %}
  1312.                     <form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
  1313.                         {% if Product.stock_find %}
  1314.                             <div class=\"ec-productRole__actions\">
  1315.                                 {% if form.classcategory_id1 is defined %}
  1316.                                     <div class=\"ec-select\">
  1317.                                         {{ form_row(form.classcategory_id1) }}
  1318.                                         {{ form_errors(form.classcategory_id1) }}
  1319.                                     </div>
  1320.                                     {% if form.classcategory_id2 is defined %}
  1321.                                         <div class=\"ec-select\">
  1322.                                             {{ form_row(form.classcategory_id2) }}
  1323.                                             {{ form_errors(form.classcategory_id2) }}
  1324.                                         </div>
  1325.                                     {% endif %}
  1326.                                 {% endif %}
  1327.                                 <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  1328.                                     {{ form_widget(form.quantity) }}
  1329.                                     {{ form_errors(form.quantity) }}
  1330.                                 </div>
  1331.                             </div>
  1332.                             <div class=\"ec-productRole__btn\">
  1333.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  1334.                                     {{ 'カートに入れる'|trans }}
  1335.                                 </button>
  1336.                             </div>
  1337.                         {% else %}
  1338.                             <div class=\"ec-productRole__btn\">
  1339.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1340.                                     {{ 'ただいま品切れ中です。'|trans }}
  1341.                                 </button>
  1342.                             </div>
  1343.                         {% endif %}
  1344.                         {{ form_rest(form) }}
  1345.                     </form>
  1346.                     <div class=\"ec-modal\">
  1347.                         <div class=\"ec-modal-overlay\">
  1348.                             <div class=\"ec-modal-wrap\">
  1349.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1350.                                 <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1351.                                 <div class=\"ec-modal-box\">
  1352.                                     <div class=\"ec-role\">
  1353.                                         <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1354.                                         <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1355.                                     </div>
  1356.                                 </div>
  1357.                             </div>
  1358.                         </div>
  1359.                     </div>
  1360.                     {% if BaseInfo.option_favorite_product %}
  1361.                         <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  1362.                             <div class=\"ec-productRole__btn\">
  1363.                                 {% if is_favorite == false %}
  1364.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  1365.                                         {{ 'お気に入りに追加'|trans }}
  1366.                                     </button>
  1367.                                 {% else %}
  1368.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  1369.                                             disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
  1370.                                     </button>
  1371.                                 {% endif %}
  1372.                             </div>
  1373.                         </form>
  1374.                     {% endif %}
  1375.                     <div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
  1376.                     </div>
  1377.                 </div>
  1378.             </div>
  1379.         </div>
  1380.         {% if Product.freearea %}
  1381.              <div class=\"ec-productRole__description\">
  1382.                  {{ include(template_from_string(Product.freearea)) }}
  1383.             </div>
  1384.         {% endif %}
  1385.     </div>
  1386. {% endblock %}""Product/detail.twig""/home/fneccube01/ichiro-sai.com/public_html/app/template/default/Product/detail.twig");
  1387.     }
  1388. }