var/cache/dev/twig/05/05d51cb3249487cd64b80ebcd069e03225794a5a4d50dfc2e192321a77ea2837.php line 40

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