var/cache/dev/twig/a0/a084bd8fc3a786c799fbad5ef2d501d6.php line 53

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