var/cache/dev/twig/8e/8ee23cebc6ce73a3f618f2744a6c4f07.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_1ca899c572e87bd2dc19095f8160af08 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=\"ec-productRole\">
  442.         <div class=\"ec-grid2\">
  443.             <div class=\"ec-grid2__cell\">
  444.                 <div class=\"ec-sliderItemRole\">
  445.                     <div class=\"item_visual\">
  446.                         ";
  447.         // line 285
  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.'285$this->source); })()), "ProductImage", [], "any"falsefalsefalse285));
  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 286
  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"falsefalsefalse286)) ? (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.'286$this->source); })()), "name", [], "any"falsefalsefalse286), "html"nulltrue))) : (print ("")));
  470.             echo "\" width=\"550\" height=\"550\"";
  471.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse286) > 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 288
  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"falsefalsefalse288)) ? (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.'288$this->source); })()), "name", [], "any"falsefalsefalse288), "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 290
  499.         echo "                    </div>
  500.                     <div class=\"item_nav\">
  501.                         ";
  502.         // line 292
  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.'292$this->source); })()), "ProductImage", [], "any"falsefalsefalse292));
  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 293
  520.             echo "                            <div class=\"slideThumb\" data-index=\"";
  521.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse293), "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 295
  539.         echo "                    </div>
  540.                 </div>
  541.             </div>
  542.             <div class=\"ec-grid2__cell\">
  543.                 <div class=\"ec-productRole__profile\">
  544.                     ";
  545.         // line 301
  546.         echo "                    ";
  547.         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.'301$this->source); })()), "ProductCategories", [], "any"falsefalsefalse301))) {
  548.             // line 302
  549.             echo "                        <div class=\"ec-productRole__category\">
  550.                             ";
  551.             // line 303
  552.             $context['_parent'] = $context;
  553.             $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); })()), "ProductCategories", [], "any"falsefalsefalse303));
  554.             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  555.                 // line 304
  556.                 echo "                                <ul>
  557.                                     <li>
  558.                                         ";
  559.                 // line 306
  560.                 $context['_parent'] = $context;
  561.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsefalse306), "path", [], "any"falsefalsefalse306));
  562.                 $context['loop'] = [
  563.                   'parent' => $context['_parent'],
  564.                   'index0' => 0,
  565.                   'index'  => 1,
  566.                   'first'  => true,
  567.                 ];
  568.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  569.                     $length count($context['_seq']);
  570.                     $context['loop']['revindex0'] = $length 1;
  571.                     $context['loop']['revindex'] = $length;
  572.                     $context['loop']['length'] = $length;
  573.                     $context['loop']['last'] = === $length;
  574.                 }
  575.                 foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  576.                     // line 307
  577.                     echo "                                            <a href=\"";
  578.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  579.                     echo "?category_id=";
  580.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse307), "html"nulltrue);
  581.                     echo "\">";
  582.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse307), "html"nulltrue);
  583.                     echo "</a>";
  584.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse307) == false)) {
  585.                         // line 308
  586.                         echo "                                            <span>></span>";
  587.                     }
  588.                     ++$context['loop']['index0'];
  589.                     ++$context['loop']['index'];
  590.                     $context['loop']['first'] = false;
  591.                     if (isset($context['loop']['length'])) {
  592.                         --$context['loop']['revindex0'];
  593.                         --$context['loop']['revindex'];
  594.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  595.                     }
  596.                 }
  597.                 $_parent $context['_parent'];
  598.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  599.                 $context array_intersect_key($context$_parent) + $_parent;
  600.                 // line 310
  601.                 echo "                                    </li>
  602.                                 </ul>
  603.                             ";
  604.             }
  605.             $_parent $context['_parent'];
  606.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  607.             $context array_intersect_key($context$_parent) + $_parent;
  608.             // line 313
  609.             echo "                        </div>
  610.                     ";
  611.         }
  612.         // line 315
  613.         echo "                    ";
  614.         // line 316
  615.         echo "                    <div class=\"ec-productRole__title\">
  616.                         <h2 class=\"ec-headingTitle\">";
  617.         // line 317
  618.         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.'317$this->source); })()), "name", [], "any"falsefalsefalse317), "html"nulltrue);
  619.         echo "</h2>
  620.                         <p class=\"ec-headingPublisher\">";
  621.         // line 318
  622.         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.'318$this->source); })()), "publisher", [], "any"falsefalsefalse318), "html"nulltrue);
  623.         echo "</p>
  624.                     </div>
  625.                     ";
  626.         // line 321
  627.         echo "                    ";
  628.         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.'321$this->source); })()), "Tags", [], "any"falsefalsefalse321))) {
  629.             // line 322
  630.             echo "                    <ul class=\"ec-productRole__tags\">
  631.                         ";
  632.             // line 323
  633.             $context['_parent'] = $context;
  634.             $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.'323$this->source); })()), "Tags", [], "any"falsefalsefalse323));
  635.             foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  636.                 // line 324
  637.                 echo "                            <li class=\"ec-productRole__tag tag_";
  638.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse324), "html"nulltrue);
  639.                 echo "\">";
  640.                 echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  641.                 echo "</li>
  642.                         ";
  643.             }
  644.             $_parent $context['_parent'];
  645.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  646.             $context array_intersect_key($context$_parent) + $_parent;
  647.             // line 326
  648.             echo "                    </ul>
  649.                     ";
  650.         }
  651.         // line 328
  652.         echo "                    ";
  653.         // line 329
  654.         echo "                    <div class=\"ec-productRole__description\">";
  655.         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.'329$this->source); })()), "description_detail", [], "any"falsefalsefalse329));
  656.         echo "
  657.                     </div>
  658.                     ";
  659.         // line 332
  660.         echo "                    <div class=\"ec-productRole__publicationData\">
  661.                         <ul>
  662.                             <li>発売日:";
  663.         // line 334
  664.         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.'334$this->source); })()), "release_date", [], "any"falsefalsefalse334), "html"nulltrue);
  665.         echo "</li>
  666.                             <li>年間発行部数:";
  667.         // line 335
  668.         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.'335$this->source); })()), "annual_total", [], "any"falsefalsefalse335), "html"nulltrue);
  669.         echo "</li>
  670.                         </ul>
  671.                     </div>
  672.                     ";
  673.         // line 339
  674.         echo "                    ";
  675.         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.'339$this->source); })()), "hasProductClass", [], "any"falsefalsefalse339)) {
  676.             // line 340
  677.             echo "<div class=\"ec-productRole__priceRegular\">
  678.                             ";
  679.             // line 341
  680.             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.'341$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse341)) && (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.'341$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse341) == 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.'341$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse341)))) {
  681.                 // line 342
  682.                 echo "                                <span class=\"ec-productRole__priceRegularPrice\">";
  683.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  684.                 echo ":<span class=\"price01-default\">";
  685.                 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.'342$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse342)), "html"nulltrue);
  686.                 echo "</span></span>
  687.                                 <span class=\"ec-productRole__priceRegularTax\">";
  688.                 // line 343
  689.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  690.                 echo "</span>
  691.                             ";
  692.             } elseif (( !(null === twig_get_attribute($this->env$this->source,             // line 344
  693. (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'344$this->source); })()), "getPrice01Min", [], "any"falsefalsefalse344)) &&  !(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.'344$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse344)))) {
  694.                 // line 345
  695.                 echo "                                <span class=\"ec-productRole__priceRegularPrice\">";
  696.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  697.                 echo ":<span class=\"price01-default\">";
  698.                 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.'345$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse345)), "html"nulltrue);
  699.                 echo "~ ";
  700.                 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.'345$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsefalse345)), "html"nulltrue);
  701.                 echo "</span></span>
  702.                                 <span class=\"ec-productRole__priceRegularTax\">";
  703.                 // line 346
  704.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  705.                 echo "</span>
  706.                             ";
  707.             }
  708.             // line 348
  709.             echo "                        </div>
  710.                     ";
  711.         } else {
  712.             // line 350
  713.             echo "                        ";
  714.             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.'350$this->source); })()), "getPrice01Max", [], "any"falsefalsefalse350))) {
  715.                 // line 351
  716.                 echo "                            <span class=\"ec-productRole__priceRegularPrice\">";
  717.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("通常価格"), "html"nulltrue);
  718.                 echo ":";
  719.                 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.'351$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsefalse351)), "html"nulltrue);
  720.                 echo "</span>
  721.                             <span class=\"ec-productRole__priceRegularTax\">";
  722.                 // line 352
  723.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  724.                 echo "</span>
  725.                         ";
  726.             }
  727.             // line 354
  728.             echo "                    ";
  729.         }
  730.         // line 355
  731.         echo "                    ";
  732.         // line 356
  733.         echo "                    <div class=\"ec-productRole__price\">
  734.                         ";
  735.         // line 357
  736.         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.'357$this->source); })()), "hasProductClass", [], "any"falsefalsefalse357)) {
  737.             // line 358
  738.             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.'358$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse358) == twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'358$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse358))) {
  739.                 // line 359
  740.                 echo "                                <div class=\"ec-price\">
  741.                                     <span class=\"ec-price__price price02-default\">";
  742.                 // line 360
  743.                 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.'360$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse360)), "html"nulltrue);
  744.                 echo "</span>
  745.                                     <span class=\"ec-price__tax\">";
  746.                 // line 361
  747.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  748.                 echo "</span>
  749.                                 </div>
  750.                             ";
  751.             } else {
  752.                 // line 364
  753.                 echo "                                <div class=\"ec-price\">
  754.                                     <span class=\"ec-price__price price02-default\">";
  755.                 // line 365
  756.                 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.'365$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse365)), "html"nulltrue);
  757.                 echo " ~ ";
  758.                 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.'365$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse365)), "html"nulltrue);
  759.                 echo "</span>
  760.                                     <span class=\"ec-price__tax\">";
  761.                 // line 366
  762.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  763.                 echo "</span>
  764.                                 </div>
  765.                             ";
  766.             }
  767.             // line 369
  768.             echo "                        ";
  769.         } else {
  770.             // line 370
  771.             echo "                            <div class=\"ec-price\">
  772.                                 <span class=\"ec-price__price\">";
  773.             // line 371
  774.             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.'371$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse371)), "html"nulltrue);
  775.             echo "</span>
  776.                                 <span class=\"ec-price__tax\">";
  777.             // line 372
  778.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("(年間購読/税込)"), "html"nulltrue);
  779.             echo "</span>
  780.                             </div>
  781.                         ";
  782.         }
  783.         // line 375
  784.         echo "                    </div>
  785.                     ";
  786.         // line 377
  787.         echo "                    ";
  788.         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.'377$this->source); })()), "code_min", [], "any"falsefalsefalse377))) {
  789.             // line 378
  790.             echo "                        <div class=\"ec-productRole__code\">
  791.                             ";
  792.             // line 379
  793.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html"nulltrue);
  794.             echo ": <span class=\"product-code-default\">";
  795.             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.'379$this->source); })()), "code_min", [], "any"falsefalsefalse379), "html"nulltrue);
  796.             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.'379$this->source); })()), "code_min", [], "any"falsefalsefalse379) != 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.'379$this->source); })()), "code_max", [], "any"falsefalsefalse379))) {
  797.                 echo " ~ ";
  798.                 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.'379$this->source); })()), "code_max", [], "any"falsefalsefalse379), "html"nulltrue);
  799.             }
  800.             echo "</span>
  801.                         </div>
  802.                     ";
  803.         }
  804.         // line 382
  805.         echo "                    ";
  806.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  807.             // line 383
  808.             echo "                        <form action=\"";
  809.             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.'383$this->source); })()), "id", [], "any"falsefalsefalse383)]), "html"nulltrue);
  810.             echo "\" method=\"post\" id=\"form1\" name=\"form1\">
  811.                             ";
  812.             // line 384
  813.             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.'384$this->source); })()), "stock_find", [], "any"falsefalsefalse384)) {
  814.                 // line 385
  815.                 echo "                                <div class=\"ec-productRole__actions\">
  816.                                     ";
  817.                 // line 386
  818.                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse386)) {
  819.                     // line 387
  820.                     echo "                                        <div class=\"ec-select\">
  821.                                             ";
  822.                     // line 388
  823.                     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.'388$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse388), 'row');
  824.                     echo "
  825.                                             ";
  826.                     // line 389
  827.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'389$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse389), 'errors');
  828.                     echo "
  829.                                         </div>
  830.                                         ";
  831.                     // line 391
  832.                     if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse391)) {
  833.                         // line 392
  834.                         echo "                                            <div class=\"ec-select\">
  835.                                                 ";
  836.                         // line 393
  837.                         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.'393$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse393), 'row');
  838.                         echo "
  839.                                                 ";
  840.                         // line 394
  841.                         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.'394$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse394), 'errors');
  842.                         echo "
  843.                                             </div>
  844.                                         ";
  845.                     }
  846.                     // line 397
  847.                     echo "                                    ";
  848.                 }
  849.                 // line 398
  850.                 echo "                                    <div class=\"ec-numberInput\"><span>";
  851.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量"), "html"nulltrue);
  852.                 echo "</span>
  853.                                         ";
  854.                 // line 399
  855.                 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.'399$this->source); })()), "quantity", [], "any"falsefalsefalse399), 'widget');
  856.                 echo "
  857.                                         ";
  858.                 // line 400
  859.                 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.'400$this->source); })()), "quantity", [], "any"falsefalsefalse400), 'errors');
  860.                 echo "
  861.                                     </div>
  862.                                 </div>
  863.                                 <div class=\"ec-productRole__btn\">
  864.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  865.                                         ";
  866.                 // line 405
  867.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  868.                 echo "
  869.                                     </button>
  870.                                 </div>
  871.                             ";
  872.             } else {
  873.                 // line 409
  874.                 echo "                                <div class=\"ec-productRole__btn\">
  875.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  876.                                         ";
  877.                 // line 411
  878.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  879.                 echo "
  880.                                     </button>
  881.                                 </div>
  882.                             ";
  883.             }
  884.             // line 415
  885.             echo "
  886.                             ";
  887.             // line 416
  888.             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.'416$this->source); })()), 'rest');
  889.             echo "
  890.                         </form>
  891.                         <div class=\"ec-modal\">
  892.                             <div class=\"ec-modal-overlay\">
  893.                                 <div class=\"ec-modal-wrap\">
  894.                                     <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  895.             // line 421
  896.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  897.             echo "\" alt=\"\"/></span></span>
  898.                                     <div id=\"ec-modal-header\" class=\"text-center\">";
  899.             // line 422
  900.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  901.             echo "</div>
  902.                                     <div class=\"ec-modal-box\">
  903.                                         <div class=\"ec-role\">
  904.                                             <span class=\"ec-inlineBtn--cancel\">";
  905.             // line 425
  906.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  907.             echo "</span>
  908.                                             <a href=\"";
  909.             // line 426
  910.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  911.             echo "\" class=\"ec-inlineBtn--action\">";
  912.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  913.             echo "</a>
  914.                                         </div>
  915.                                     </div>
  916.                                 </div>
  917.                             </div>
  918.                         </div>
  919.                         ";
  920.             // line 432
  921.             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.'432$this->source); })()), "option_favorite_product", [], "any"falsefalsefalse432)) {
  922.                 // line 433
  923.                 echo "                            <form action=\"";
  924.                 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.'433$this->source); })()), "id", [], "any"falsefalsefalse433)]), "html"nulltrue);
  925.                 echo "\" method=\"post\">
  926.                                 <div class=\"ec-productRole__btn\">
  927.                                     ";
  928.                 // line 435
  929.                 if (((isset($context["is_favorite"]) || array_key_exists("is_favorite"$context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.'435$this->source); })()) == false)) {
  930.                     // line 436
  931.                     echo "                                        <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  932.                                             ";
  933.                     // line 437
  934.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html"nulltrue);
  935.                     echo "
  936.                                         </button>
  937.                                     ";
  938.                 } else {
  939.                     // line 440
  940.                     echo "                                        <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  941.                                                 disabled=\"disabled\">";
  942.                     // line 441
  943.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html"nulltrue);
  944.                     echo "
  945.                                         </button>
  946.                                     ";
  947.                 }
  948.                 // line 444
  949.                 echo "                                </div>
  950.                             </form>
  951.                         ";
  952.             }
  953.             // line 447
  954.             echo "                    ";
  955.         }
  956.         // line 448
  957.         echo "                </div>
  958.             </div>
  959.         </div>
  960.         ";
  961.         // line 451
  962.         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.'451$this->source); })()), "freearea", [], "any"falsefalsefalse451)) {
  963.             // line 452
  964.             echo "             <div class=\"ec-productRole__description\">
  965.                  ";
  966.             // line 453
  967.             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.'453$this->source); })()), "freearea", [], "any"falsefalsefalse453)));
  968.             echo "
  969.             </div>
  970.         ";
  971.         }
  972.         // line 456
  973.         echo "    </div>
  974. ";
  975.         
  976.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  977.         
  978.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  979.     }
  980.     public function getTemplateName()
  981.     {
  982.         return "Product/detail.twig";
  983.     }
  984.     public function isTraitable()
  985.     {
  986.         return false;
  987.     }
  988.     public function getDebugInfo()
  989.     {
  990.         return array (  1018 => 456,  1012 => 453,  1009 => 452,  1007 => 451,  1002 => 448,  999 => 447,  994 => 444,  988 => 441,  985 => 440,  979 => 437,  976 => 436,  974 => 435,  968 => 433,  966 => 432,  955 => 426,  951 => 425,  945 => 422,  941 => 421,  933 => 416,  930 => 415,  923 => 411,  919 => 409,  912 => 405,  904 => 400,  900 => 399,  895 => 398,  892 => 397,  886 => 394,  882 => 393,  879 => 392,  877 => 391,  872 => 389,  868 => 388,  865 => 387,  863 => 386,  860 => 385,  858 => 384,  853 => 383,  850 => 382,  838 => 379,  835 => 378,  832 => 377,  829 => 375,  823 => 372,  819 => 371,  816 => 370,  813 => 369,  807 => 366,  801 => 365,  798 => 364,  792 => 361,  788 => 360,  785 => 359,  783 => 358,  781 => 357,  778 => 356,  776 => 355,  773 => 354,  768 => 352,  761 => 351,  758 => 350,  754 => 348,  749 => 346,  740 => 345,  738 => 344,  734 => 343,  727 => 342,  725 => 341,  722 => 340,  719 => 339,  713 => 335,  709 => 334,  705 => 332,  699 => 329,  697 => 328,  693 => 326,  682 => 324,  678 => 323,  675 => 322,  672 => 321,  667 => 318,  663 => 317,  660 => 316,  658 => 315,  654 => 313,  646 => 310,  631 => 308,  622 => 307,  605 => 306,  601 => 304,  597 => 303,  594 => 302,  591 => 301,  584 => 295,  565 => 293,  548 => 292,  544 => 290,  533 => 288,  511 => 286,  493 => 285,  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,);
  991.     }
  992.     public function getSourceContext()
  993.     {
  994.         return new Source("{#
  995. This file is part of EC-CUBE
  996. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  997. http://www.ec-cube.co.jp/
  998. For the full copyright and license information, please view the LICENSE
  999. file that was distributed with this source code.
  1000. #}
  1001. {% extends 'default_frame.twig' %}
  1002. {% set body_class = 'product_page' %}
  1003. {% block stylesheet %}
  1004.     <style>
  1005.         .slick-slider {
  1006.             margin-bottom: 30px;
  1007.         }
  1008.         .slick-dots {
  1009.             position: absolute;
  1010.             bottom: -45px;
  1011.             display: block;
  1012.             width: 100%;
  1013.             padding: 0;
  1014.             list-style: none;
  1015.             text-align: center;
  1016.         }
  1017.         .slick-dots li {
  1018.             position: relative;
  1019.             display: inline-block;
  1020.             width: 20px;
  1021.             height: 20px;
  1022.             margin: 0 5px;
  1023.             padding: 0;
  1024.             cursor: pointer;
  1025.         }
  1026.         .slick-dots li button {
  1027.             font-size: 0;
  1028.             line-height: 0;
  1029.             display: block;
  1030.             width: 20px;
  1031.             height: 20px;
  1032.             padding: 5px;
  1033.             cursor: pointer;
  1034.             color: transparent;
  1035.             border: 0;
  1036.             outline: none;
  1037.             background: transparent;
  1038.         }
  1039.         .slick-dots li button:hover,
  1040.         .slick-dots li button:focus {
  1041.             outline: none;
  1042.         }
  1043.         .slick-dots li button:hover:before,
  1044.         .slick-dots li button:focus:before {
  1045.             opacity: 1;
  1046.         }
  1047.         .slick-dots li button:before {
  1048.             content: \" \";
  1049.             line-height: 20px;
  1050.             position: absolute;
  1051.             top: 0;
  1052.             left: 0;
  1053.             width: 12px;
  1054.             height: 12px;
  1055.             text-align: center;
  1056.             opacity: .25;
  1057.             background-color: black;
  1058.             border-radius: 50%;
  1059.         }
  1060.         .slick-dots li.slick-active button:before {
  1061.             opacity: .75;
  1062.             background-color: black;
  1063.         }
  1064.         .slick-dots li button.thumbnail img {
  1065.             width: 0;
  1066.             height: 0;
  1067.         }
  1068.     </style>
  1069. {% endblock %}
  1070. {% block javascript %}
  1071.     <script>
  1072.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  1073.         // 規格2に選択肢を割り当てる。
  1074.         function fnSetClassCategories(form, classcat_id2_selected) {
  1075.             var \$form = \$(form);
  1076.             var product_id = \$form.find('input[name=product_id]').val();
  1077.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  1078.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  1079.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  1080.         }
  1081.         {% if form.classcategory_id2 is defined %}
  1082.         fnSetClassCategories(
  1083.             \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  1084.         );
  1085.         {% elseif form.classcategory_id1 is defined %}
  1086.         eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  1087.         {% endif %}
  1088.     </script>
  1089.     <script>
  1090.         \$(function() {
  1091.             // bfcache無効化
  1092.             \$(window).bind('pageshow', function(event) {
  1093.                 if (event.originalEvent.persisted) {
  1094.                     location.reload(true);
  1095.                 }
  1096.             });
  1097.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  1098.             // img タグに width, height が付与されている.
  1099.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  1100.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  1101.             \$('.ec-grid2__cell').hide();
  1102.             var removeSize = function () {
  1103.                 \$('.slide-item').height('');
  1104.                 \$('.slide-item img')
  1105.                     .removeAttr('width')
  1106.                     .removeAttr('height')
  1107.                     .removeAttr('style');
  1108.             };
  1109.             var slickInitial = function(slick) {
  1110.                 \$('.ec-grid2__cell').fadeIn(1500);
  1111.                 var baseHeight = \$(slick.target).height();
  1112.                 var baseWidth = \$(slick.target).width();
  1113.                 var rate = baseWidth / baseHeight;
  1114.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  1115.                 // transform を使用することでCLSの影響を受けないようにする
  1116.                 \$('.slide-item img')
  1117.                     .css(
  1118.                         {
  1119.                             'transform-origin': 'top left',
  1120.                             'transform': 'scaleY(' + rate + ')',
  1121.                             'transition': 'transform .1s'
  1122.                         }
  1123.                     );
  1124.                 // 正しいサイズに近くなったら属性を解除する
  1125.                 setTimeout(removeSize, 500);
  1126.             };
  1127.             \$('.item_visual').on('init', slickInitial);
  1128.             // リサイズ時は CLS の影響を受けないため属性を解除する
  1129.             \$(window).resize(removeSize);
  1130.             \$('.item_visual').slick({
  1131.                 dots: false,
  1132.                 arrows: false,
  1133.                 responsive: [{
  1134.                     breakpoint: 768,
  1135.                     settings: {
  1136.                         dots: true
  1137.                     }
  1138.                 }]
  1139.             });
  1140.             \$('.slideThumb').on('click', function() {
  1141.                 var index = \$(this).attr('data-index');
  1142.                 \$('.item_visual').slick('slickGoTo', index, false);
  1143.             })
  1144.         });
  1145.     </script>
  1146.     <script>
  1147.         \$(function() {
  1148.             \$('.add-cart').on('click', function(event) {
  1149.                 {% if form.classcategory_id1 is defined %}
  1150.                 // 規格1フォームの必須チェック
  1151.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  1152.                     \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1153.                     return true;
  1154.                 } else {
  1155.                     \$('#classcategory_id1')[0].setCustomValidity('');
  1156.                 }
  1157.                 {% endif %}
  1158.                 {% if form.classcategory_id2 is defined %}
  1159.                 // 規格2フォームの必須チェック
  1160.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  1161.                     \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1162.                     return true;
  1163.                 } else {
  1164.                     \$('#classcategory_id2')[0].setCustomValidity('');
  1165.                 }
  1166.                 {% endif %}
  1167.                 // 個数フォームのチェック
  1168.                 if (\$('#quantity').val() < 1) {
  1169.                     \$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  1170.                     return true;
  1171.                 } else {
  1172.                     \$('#quantity')[0].setCustomValidity('');
  1173.                 }
  1174.                 event.preventDefault();
  1175.                 \$form = \$('#form1');
  1176.                 \$.ajax({
  1177.                     url: \$form.attr('action'),
  1178.                     type: \$form.attr('method'),
  1179.                     data: \$form.serialize(),
  1180.                     dataType: 'json',
  1181.                     beforeSend: function(xhr, settings) {
  1182.                         // Buttonを無効にする
  1183.                         \$('.add-cart').prop('disabled', true);
  1184.                     }
  1185.                 }).done(function(data) {
  1186.                     // レスポンス内のメッセージをalertで表示
  1187.                     \$.each(data.messages, function() {
  1188.                         \$('#ec-modal-header').html(this);
  1189.                     });
  1190.                     \$('.ec-modal').show()
  1191.                     // カートブロックを更新する
  1192.                     \$.ajax({
  1193.                         url: \"{{ url('block_cart') }}\",
  1194.                         type: 'GET',
  1195.                         dataType: 'html'
  1196.                     }).done(function(html) {
  1197.                         \$('.ec-headerRole__cart').html(html);
  1198.                     });
  1199.                 }).fail(function(data) {
  1200.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  1201.                 }).always(function(data) {
  1202.                     // Buttonを有効にする
  1203.                     \$('.add-cart').prop('disabled', false);
  1204.                 });
  1205.             });
  1206.         });
  1207.         \$('.ec-modal-wrap').on('click', function(e) {
  1208.             // モーダル内の処理は外側にバブリングさせない
  1209.             e.stopPropagation();
  1210.         });
  1211.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  1212.             \$('.ec-modal').hide()
  1213.         });
  1214.     </script>
  1215.     <script type=\"application/ld+json\">
  1216.     {
  1217.         \"@context\": \"https://schema.org/\",
  1218.         \"@type\": \"Product\",
  1219.         \"name\": \"{{ Product.name }}\",
  1220.         \"image\": [
  1221.             {% for img in Product.ProductImage %}
  1222.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
  1223.             {% else %}
  1224.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
  1225.             {% endfor %}
  1226.         ],
  1227.         \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
  1228.         {% if Product.code_min %}
  1229.         \"sku\": \"{{ Product.code_min }}\",
  1230.         {% endif %}
  1231.         \"offers\": {
  1232.             \"@type\": \"Offer\",
  1233.             \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
  1234.             \"priceCurrency\": \"{{ eccube_config.currency }}\",
  1235.             \"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  1236.             \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
  1237.         }
  1238.     }
  1239.     </script>
  1240. {% endblock %}
  1241. {% block main %}
  1242.     <div class=\"ec-productRole\">
  1243.         <div class=\"ec-grid2\">
  1244.             <div class=\"ec-grid2__cell\">
  1245.                 <div class=\"ec-sliderItemRole\">
  1246.                     <div class=\"item_visual\">
  1247.                         {% for ProductImage in Product.ProductImage %}
  1248.                             <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>
  1249.                         {% else %}
  1250.                             <div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
  1251.                         {% endfor %}
  1252.                     </div>
  1253.                     <div class=\"item_nav\">
  1254.                         {% for ProductImage in Product.ProductImage %}
  1255.                             <div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  1256.                         {% endfor %}
  1257.                     </div>
  1258.                 </div>
  1259.             </div>
  1260.             <div class=\"ec-grid2__cell\">
  1261.                 <div class=\"ec-productRole__profile\">
  1262.                     {# カテゴリ #}
  1263.                     {% if Product.ProductCategories is not empty %}
  1264.                         <div class=\"ec-productRole__category\">
  1265.                             {% for ProductCategory in Product.ProductCategories %}
  1266.                                 <ul>
  1267.                                     <li>
  1268.                                         {% for Category in ProductCategory.Category.path %}
  1269.                                             <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  1270.                                             <span>></span>{% endif -%}
  1271.                                         {% endfor %}
  1272.                                     </li>
  1273.                                 </ul>
  1274.                             {% endfor %}
  1275.                         </div>
  1276.                     {% endif %}
  1277.                     {# 商品名 #}
  1278.                     <div class=\"ec-productRole__title\">
  1279.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  1280.                         <p class=\"ec-headingPublisher\">{{ Product.publisher }}</p>
  1281.                     </div>
  1282.                     {# タグ #}
  1283.                     {% if Product.Tags is not empty %}
  1284.                     <ul class=\"ec-productRole__tags\">
  1285.                         {% for Tag in Product.Tags %}
  1286.                             <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  1287.                         {% endfor %}
  1288.                     </ul>
  1289.                     {% endif %}
  1290.                     {# 商品説明 #}
  1291.                     <div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
  1292.                     </div>
  1293.                     {# 発売日・発行部数 #}
  1294.                     <div class=\"ec-productRole__publicationData\">
  1295.                         <ul>
  1296.                             <li>発売日:{{ Product.release_date }}</li>
  1297.                             <li>年間発行部数:{{ Product.annual_total }}</li>
  1298.                         </ul>
  1299.                     </div>
  1300.                     {# 通常価格 #}
  1301.                     {% if Product.hasProductClass -%}
  1302.                         <div class=\"ec-productRole__priceRegular\">
  1303.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  1304.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  1305.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1306.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  1307.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  1308.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1309.                             {% endif %}
  1310.                         </div>
  1311.                     {% else %}
  1312.                         {% if Product.getPrice01Max is not null %}
  1313.                             <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  1314.                             <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1315.                         {% endif %}
  1316.                     {% endif %}
  1317.                     {# 販売価格 #}
  1318.                     <div class=\"ec-productRole__price\">
  1319.                         {% if Product.hasProductClass -%}
  1320.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  1321.                                 <div class=\"ec-price\">
  1322.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1323.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1324.                                 </div>
  1325.                             {% else %}
  1326.                                 <div class=\"ec-price\">
  1327.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  1328.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1329.                                 </div>
  1330.                             {% endif %}
  1331.                         {% else %}
  1332.                             <div class=\"ec-price\">
  1333.                                 <span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1334.                                 <span class=\"ec-price__tax\">{{ '(年間購読/税込)'|trans }}</span>
  1335.                             </div>
  1336.                         {% endif %}
  1337.                     </div>
  1338.                     {# 商品コード #}
  1339.                     {% if Product.code_min is not empty %}
  1340.                         <div class=\"ec-productRole__code\">
  1341.                             {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1342.                         </div>
  1343.                     {% endif %}
  1344.                     {% if is_granted('ROLE_USER') %}
  1345.                         <form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
  1346.                             {% if Product.stock_find %}
  1347.                                 <div class=\"ec-productRole__actions\">
  1348.                                     {% if form.classcategory_id1 is defined %}
  1349.                                         <div class=\"ec-select\">
  1350.                                             {{ form_row(form.classcategory_id1) }}
  1351.                                             {{ form_errors(form.classcategory_id1) }}
  1352.                                         </div>
  1353.                                         {% if form.classcategory_id2 is defined %}
  1354.                                             <div class=\"ec-select\">
  1355.                                                 {{ form_row(form.classcategory_id2) }}
  1356.                                                 {{ form_errors(form.classcategory_id2) }}
  1357.                                             </div>
  1358.                                         {% endif %}
  1359.                                     {% endif %}
  1360.                                     <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  1361.                                         {{ form_widget(form.quantity) }}
  1362.                                         {{ form_errors(form.quantity) }}
  1363.                                     </div>
  1364.                                 </div>
  1365.                                 <div class=\"ec-productRole__btn\">
  1366.                                     <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  1367.                                         {{ 'カートに入れる'|trans }}
  1368.                                     </button>
  1369.                                 </div>
  1370.                             {% else %}
  1371.                                 <div class=\"ec-productRole__btn\">
  1372.                                     <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1373.                                         {{ 'ただいま品切れ中です。'|trans }}
  1374.                                     </button>
  1375.                                 </div>
  1376.                             {% endif %}
  1377.                             {{ form_rest(form) }}
  1378.                         </form>
  1379.                         <div class=\"ec-modal\">
  1380.                             <div class=\"ec-modal-overlay\">
  1381.                                 <div class=\"ec-modal-wrap\">
  1382.                                     <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1383.                                     <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1384.                                     <div class=\"ec-modal-box\">
  1385.                                         <div class=\"ec-role\">
  1386.                                             <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1387.                                             <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1388.                                         </div>
  1389.                                     </div>
  1390.                                 </div>
  1391.                             </div>
  1392.                         </div>
  1393.                         {% if BaseInfo.option_favorite_product %}
  1394.                             <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  1395.                                 <div class=\"ec-productRole__btn\">
  1396.                                     {% if is_favorite == false %}
  1397.                                         <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  1398.                                             {{ 'お気に入りに追加'|trans }}
  1399.                                         </button>
  1400.                                     {% else %}
  1401.                                         <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  1402.                                                 disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
  1403.                                         </button>
  1404.                                     {% endif %}
  1405.                                 </div>
  1406.                             </form>
  1407.                         {% endif %}
  1408.                     {% endif %}
  1409.                 </div>
  1410.             </div>
  1411.         </div>
  1412.         {% if Product.freearea %}
  1413.              <div class=\"ec-productRole__description\">
  1414.                  {{ include(template_from_string(Product.freearea)) }}
  1415.             </div>
  1416.         {% endif %}
  1417.     </div>
  1418. {% endblock %}
  1419. ""Product/detail.twig""/home/xs362797/pin-dev.net/public_html/magamar/app/template/magamar/Product/detail.twig");
  1420.     }
  1421. }