var/cache/dev/twig/f0/f04056c371887938dcee4194d77b98ca.php line 42

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