var/cache/dev/twig/31/31a2660668cfac9a4ecd69e653b9955366e17357033e5f676ee3791570362f12.php line 52

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. /* __string_template__9fdf1f4823b5bb57824e9631b737690f45c3bdcb3223bb302d3721856cab2d59 */
  14. class __TwigTemplate_6352ea6d68d38bd94f28f186f04e46945a7bb2f239f9aa9508b84812196392a0 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.             'javascript' => [$this'block_javascript'],
  24.             'main' => [$this'block_main'],
  25.         ];
  26.     }
  27.     protected function doGetParent(array $context)
  28.     {
  29.         // line 11
  30.         return "default_frame.twig";
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__9fdf1f4823b5bb57824e9631b737690f45c3bdcb3223bb302d3721856cab2d59"));
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""__string_template__9fdf1f4823b5bb57824e9631b737690f45c3bdcb3223bb302d3721856cab2d59"));
  39.         // line 13
  40.         $context["body_class"] = "product_page";
  41.         // line 11
  42.         $this->parent $this->loadTemplate("default_frame.twig""__string_template__9fdf1f4823b5bb57824e9631b737690f45c3bdcb3223bb302d3721856cab2d59"11);
  43.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  44.         
  45.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  46.         
  47.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  48.     }
  49.     // line 17
  50.     public function block_javascript($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  57.         // line 18
  58.         echo "    <script>
  59.         eccube.classCategories = ";
  60.         // line 19
  61.         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.'19$this->source); })()));
  62.         echo ";
  63.         // 規格2に選択肢を割り当てる。
  64.         function fnSetClassCategories(form, classcat_id2_selected) {
  65.             var \$form = \$(form);
  66.             var product_id = \$form.find('input[name=product_id]').val();
  67.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  68.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  69.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  70.         }
  71.         ";
  72.         // line 30
  73.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse30)) {
  74.             // line 31
  75.             echo "        fnSetClassCategories(
  76.             \$('#form1'), ";
  77.             // line 32
  78.             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.'32$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse32), "vars", [], "any"falsefalsefalse32), "value", [], "any"falsefalsefalse32));
  79.             echo "
  80.         );
  81.         ";
  82.         } elseif (twig_get_attribute($this->env$this->source,         // line 34
  83. ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse34)) {
  84.             // line 35
  85.             echo "        eccube.checkStock(\$('#form1'), ";
  86.             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.'35$this->source); })()), "id", [], "any"falsefalsefalse35), "html"nulltrue);
  87.             echo ", ";
  88.             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.'35$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse35), "vars", [], "any"falsefalsefalse35), "value", [], "any"falsefalsefalse35));
  89.             echo ", null);
  90.         ";
  91.         }
  92.         // line 37
  93.         echo "    </script>
  94.     <script>
  95.         \$(function() {
  96.             // bfcache無効化
  97.             \$(window).bind('pageshow', function(event) {
  98.                 if (event.originalEvent.persisted) {
  99.                     location.reload(true);
  100.                 }
  101.             });
  102.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  103.             // img タグに width, height が付与されている.
  104.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  105.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  106.             \$('.ec-grid2__cell').hide();
  107.             var removeSize = function () {
  108.                 \$('.slide-item').height('');
  109.                 \$('.slide-item img')
  110.                     .removeAttr('width')
  111.                     .removeAttr('height')
  112.                     .removeAttr('style');
  113.             };
  114.             var slickInitial = function(slick) {
  115.                 \$('.ec-grid2__cell').fadeIn(1500);
  116.                 var baseHeight = \$(slick.target).height();
  117.                 var baseWidth = \$(slick.target).width();
  118.                 var rate = baseWidth / baseHeight;
  119.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  120.                 // transform を使用することでCLSの影響を受けないようにする
  121.                 \$('.slide-item img')
  122.                     .css(
  123.                         {
  124.                             'transform-origin': 'top left',
  125.                             'transform': 'scaleY(' + rate + ')',
  126.                             'transition': 'transform .1s'
  127.                         }
  128.                     );
  129.                 // 正しいサイズに近くなったら属性を解除する
  130.                 setTimeout(removeSize, 500);
  131.             };
  132.             \$('.item_visual').on('init', slickInitial);
  133.             // リサイズ時は CLS の影響を受けないため属性を解除する
  134.             \$(window).resize(removeSize);
  135.             \$('.item_visual').slick({
  136.                 dots: false,
  137.                 arrows: false,
  138.                 responsive: [{
  139.                     breakpoint: 768,
  140.                     settings: {
  141.                     }
  142.                 }]
  143.             });
  144.             \$('.slideThumb').on('click', function() {
  145.                 var index = \$(this).attr('data-index');
  146.                 \$('.item_visual').slick('slickGoTo', index, false);
  147.             })
  148.         });
  149.     </script>
  150.     <script>
  151.         \$(function() {
  152.             \$('.add-cart').on('click', function(event) {
  153.                 ";
  154.         // line 100
  155.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse100)) {
  156.             // line 101
  157.             echo "                // 規格1フォームの必須チェック
  158.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  159.                     \$('#classcategory_id1')[0].setCustomValidity('";
  160.             // line 103
  161.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  162.             echo "');
  163.                     return true;
  164.                 } else {
  165.                     \$('#classcategory_id1')[0].setCustomValidity('');
  166.                 }
  167.                 ";
  168.         }
  169.         // line 109
  170.         echo "
  171.                 ";
  172.         // line 110
  173.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse110)) {
  174.             // line 111
  175.             echo "                // 規格2フォームの必須チェック
  176.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  177.                     \$('#classcategory_id2')[0].setCustomValidity('";
  178.             // line 113
  179.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  180.             echo "');
  181.                     return true;
  182.                 } else {
  183.                     \$('#classcategory_id2')[0].setCustomValidity('');
  184.                 }
  185.                 ";
  186.         }
  187.         // line 119
  188.         echo "
  189.                 // 個数フォームのチェック
  190.                 if (\$('#quantity').val() < 1) {
  191.                     \$('#quantity')[0].setCustomValidity('";
  192.         // line 122
  193.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  194.         echo "');
  195.                     return true;
  196.                 } else {
  197.                     \$('#quantity')[0].setCustomValidity('');
  198.                 }
  199.                 event.preventDefault();
  200.                 \$form = \$('#form1');
  201.                 \$.ajax({
  202.                     url: \$form.attr('action'),
  203.                     type: \$form.attr('method'),
  204.                     data: \$form.serialize(),
  205.                     dataType: 'json',
  206.                     beforeSend: function(xhr, settings) {
  207.                         // Buttonを無効にする
  208.                         \$('.add-cart').prop('disabled', true);
  209.                     }
  210.                 }).done(function(data) {
  211.                     // レスポンス内のメッセージをalertで表示
  212.                     \$.each(data.messages, function() {
  213.                         \$('#ec-modal-header').html(this);
  214.                     });
  215.                     \$('.ec-modal').show()
  216.                     // カートブロックを更新する
  217.                     \$.ajax({
  218.                         url: \"";
  219.         // line 149
  220.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  221.         echo "\",
  222.                         type: 'GET',
  223.                         dataType: 'html'
  224.                     }).done(function(html) {
  225.                         \$('.cart_content').html(html);
  226.                         //固定フッターのバッジ更新
  227.                         const out_html = \$(\$.parseHTML(html));
  228.                         const badge = out_html.find('#head_cartNavi_badge').text();
  229.                         \$('#fixed_footer_badge').text(badge);
  230.                     });
  231.                 }).fail(function(data) {
  232.                     alert('";
  233.         // line 160
  234.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  235.         echo "');
  236.                 }).always(function(data) {
  237.                     // Buttonを有効にする
  238.                     \$('.add-cart').prop('disabled', false);
  239.                 });
  240.             });
  241.         });
  242.         \$('.ec-modal-wrap').on('click', function(e) {
  243.             // モーダル内の処理は外側にバブリングさせない
  244.             e.stopPropagation();
  245.         });
  246.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  247.             \$('.ec-modal').hide()
  248.         });
  249.     </script>
  250.     <script type=\"application/ld+json\">
  251.     {
  252.         \"@context\": \"https://schema.org/\",
  253.         \"@type\": \"Product\",
  254.         \"name\": \"";
  255.         // line 180
  256.         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.'180$this->source); })()), "name", [], "any"falsefalsefalse180), "html"nulltrue);
  257.         echo "\",
  258.         \"image\": [
  259.             ";
  260.         // line 182
  261.         $context['_parent'] = $context;
  262.         $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.'182$this->source); })()), "ProductImage", [], "any"falsefalsefalse182));
  263.         $context['_iterated'] = false;
  264.         $context['loop'] = [
  265.           'parent' => $context['_parent'],
  266.           'index0' => 0,
  267.           'index'  => 1,
  268.           'first'  => true,
  269.         ];
  270.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  271.             $length count($context['_seq']);
  272.             $context['loop']['revindex0'] = $length 1;
  273.             $context['loop']['revindex'] = $length;
  274.             $context['loop']['length'] = $length;
  275.             $context['loop']['last'] = === $length;
  276.         }
  277.         foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
  278.             // line 183
  279.             echo "                \"";
  280.             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.'183$this->source); })()), "request", [], "any"falsefalsefalse183), "schemeAndHttpHost", [], "any"falsefalsefalse183), "html"nulltrue);
  281.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html"nulltrue);
  282.             echo "\"";
  283.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse183)) {
  284.                 echo ",";
  285.             }
  286.             // line 184
  287.             echo "
  288.             ";
  289.             $context['_iterated'] = true;
  290.             ++$context['loop']['index0'];
  291.             ++$context['loop']['index'];
  292.             $context['loop']['first'] = false;
  293.             if (isset($context['loop']['length'])) {
  294.                 --$context['loop']['revindex0'];
  295.                 --$context['loop']['revindex'];
  296.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  297.             }
  298.         }
  299.         if (!$context['_iterated']) {
  300.             // line 186
  301.             echo "                \"";
  302.             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.'186$this->source); })()), "request", [], "any"falsefalsefalse186), "schemeAndHttpHost", [], "any"falsefalsefalse186), "html"nulltrue);
  303.             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);
  304.             echo "\"
  305.             ";
  306.         }
  307.         $_parent $context['_parent'];
  308.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
  309.         $context array_intersect_key($context$_parent) + $_parent;
  310.         // line 188
  311.         echo "        ],
  312.         \"description\": \"";
  313.         // line 189
  314.         echo twig_escape_filter($this->envtwig_slice($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"truetruefalse189)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"falsefalsefalse189), 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.'189$this->source); })()), "description_detail", [], "any"falsefalsefalse189))) : (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.'189$this->source); })()), "description_detail", [], "any"falsefalsefalse189))), ["
  315. => """ " => ""]), 0300), "html"nulltrue);
  316.         echo "\",
  317.         ";
  318.         // line 190
  319.         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.'190$this->source); })()), "code_min", [], "any"falsefalsefalse190)) {
  320.             // line 191
  321.             echo "        \"sku\": \"";
  322.             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.'191$this->source); })()), "code_min", [], "any"falsefalsefalse191), "html"nulltrue);
  323.             echo "\",
  324.         ";
  325.         }
  326.         // line 193
  327.         echo "        \"offers\": {
  328.             \"@type\": \"Offer\",
  329.             \"url\": \"";
  330.         // line 195
  331.         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.'195$this->source); })()), "id", [], "any"falsefalsefalse195)]), "html"nulltrue);
  332.         echo "\",
  333.             \"priceCurrency\": \"";
  334.         // line 196
  335.         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.'196$this->source); })()), "currency", [], "any"falsefalsefalse196), "html"nulltrue);
  336.         echo "\",
  337.             \"availability\": \"";
  338.         // line 197
  339.         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.'197$this->source); })()), "stock_find", [], "any"falsefalsefalse197)) ? ("InStock") : ("OutOfStock"));
  340.         echo "\"
  341.         }
  342.     }
  343.     </script>
  344. ";
  345.         
  346.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  347.         
  348.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  349.     }
  350.     // line 203
  351.     public function block_main($context, array $blocks = [])
  352.     {
  353.         $macros $this->macros;
  354.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  355.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  356.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  357.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  358.         // line 204
  359.         echo "    
  360. <div class=\"back_btn\">
  361.     <a href=\"javascript:history.back();\" class=\"ec-inlineBtn\">< 戻る</a>
  362. </div>
  363.     
  364.     <div class=\"ec-productRole\">
  365.         <div class=\"ec-grid2 product_detail_wrap\">
  366.             <div class=\"product_detail_img slide\">
  367.                 <div class=\"ec-sliderItemRole\">
  368.                     <div class=\"item_visual\">
  369.                         ";
  370.         // line 216
  371.         $context['_parent'] = $context;
  372.         $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.'216$this->source); })()), "ProductImage", [], "any"falsefalsefalse216));
  373.         $context['_iterated'] = false;
  374.         $context['loop'] = [
  375.           'parent' => $context['_parent'],
  376.           'index0' => 0,
  377.           'index'  => 1,
  378.           'first'  => true,
  379.         ];
  380.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  381.             $length count($context['_seq']);
  382.             $context['loop']['revindex0'] = $length 1;
  383.             $context['loop']['revindex'] = $length;
  384.             $context['loop']['length'] = $length;
  385.             $context['loop']['last'] = === $length;
  386.         }
  387.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  388.             // line 217
  389.             echo "                            <div class=\"slide-item slide_img\"><img src=\"";
  390.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  391.             echo "\" alt=\"";
  392.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse217)) ? (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.'217$this->source); })()), "name", [], "any"falsefalsefalse217), "html"nulltrue))) : (print ("")));
  393.             echo "\" width=\"550\" height=\"550\"";
  394.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse217) > 1)) {
  395.                 echo " loading=\"lazy\"";
  396.             }
  397.             echo "></div>
  398.                         ";
  399.             $context['_iterated'] = true;
  400.             ++$context['loop']['index0'];
  401.             ++$context['loop']['index'];
  402.             $context['loop']['first'] = false;
  403.             if (isset($context['loop']['length'])) {
  404.                 --$context['loop']['revindex0'];
  405.                 --$context['loop']['revindex'];
  406.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  407.             }
  408.         }
  409.         if (!$context['_iterated']) {
  410.             // line 219
  411.             echo "                            <div class=\"slide-item slide_img\"><img src=\"";
  412.             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);
  413.             echo "\" alt=\"";
  414.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse219)) ? (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.'219$this->source); })()), "name", [], "any"falsefalsefalse219), "html"nulltrue))) : (print ("")));
  415.             echo "\" width=\"550\" height=\"550\"></div>
  416.                         ";
  417.         }
  418.         $_parent $context['_parent'];
  419.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  420.         $context array_intersect_key($context$_parent) + $_parent;
  421.         // line 221
  422.         echo "                    </div>
  423.                     <div class=\"item_nav\">
  424.                         ";
  425.         // line 223
  426.         $context['_parent'] = $context;
  427.         $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.'223$this->source); })()), "ProductImage", [], "any"falsefalsefalse223));
  428.         $context['loop'] = [
  429.           'parent' => $context['_parent'],
  430.           'index0' => 0,
  431.           'index'  => 1,
  432.           'first'  => true,
  433.         ];
  434.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  435.             $length count($context['_seq']);
  436.             $context['loop']['revindex0'] = $length 1;
  437.             $context['loop']['revindex'] = $length;
  438.             $context['loop']['length'] = $length;
  439.             $context['loop']['last'] = === $length;
  440.         }
  441.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  442.             // line 224
  443.             echo "                            <div class=\"slideThumb\" data-index=\"";
  444.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse224), "html"nulltrue);
  445.             echo "\"><img src=\"";
  446.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  447.             echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  448.                         ";
  449.             ++$context['loop']['index0'];
  450.             ++$context['loop']['index'];
  451.             $context['loop']['first'] = false;
  452.             if (isset($context['loop']['length'])) {
  453.                 --$context['loop']['revindex0'];
  454.                 --$context['loop']['revindex'];
  455.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  456.             }
  457.         }
  458.         $_parent $context['_parent'];
  459.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  460.         $context array_intersect_key($context$_parent) + $_parent;
  461.         // line 226
  462.         echo "                    </div>
  463.                 </div>
  464.             </div>
  465.             <div class=\"product_detail_main\">
  466.                 <div class=\"ec-productRole__profile\">
  467.                     ";
  468.         // line 232
  469.         echo "                    <div class=\"ec-productRole__title\">
  470.                         <h2 class=\"ec-headingTitle\">";
  471.         // line 233
  472.         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.'233$this->source); })()), "name", [], "any"falsefalsefalse233), "html"nulltrue);
  473.         echo "</h2>
  474.                     </div>
  475.                     ";
  476.         // line 236
  477.         echo "                    <ul class=\"ec-productRole__tags\">
  478.                         ";
  479.         // line 237
  480.         $context['_parent'] = $context;
  481.         $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.'237$this->source); })()), "Tags", [], "any"falsefalsefalse237));
  482.         foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  483.             // line 238
  484.             echo "                            <li class=\"ec-productRole__tag tag_";
  485.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse238), "html"nulltrue);
  486.             echo "\">";
  487.             echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  488.             echo "</li>
  489.                         ";
  490.         }
  491.         $_parent $context['_parent'];
  492.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  493.         $context array_intersect_key($context$_parent) + $_parent;
  494.         // line 240
  495.         echo "                    </ul>
  496.                     ";
  497.         // line 242
  498.         echo "                    ";
  499.         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.'242$this->source); })()), "code_min", [], "any"falsefalsefalse242))) {
  500.             // line 243
  501.             echo "                        <div class=\"ec-productRole__code product_detail_text\">
  502.                             <div class=\"product_detail_text_l fw\">";
  503.             // line 244
  504.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html"nulltrue);
  505.             echo "</div>
  506.                             <div>
  507.                                 <span class=\"product-code-default\">";
  508.             // line 246
  509.             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.'246$this->source); })()), "code_min", [], "any"falsefalsefalse246), "html"nulltrue);
  510.             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.'246$this->source); })()), "code_min", [], "any"falsefalsefalse246) != 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.'246$this->source); })()), "code_max", [], "any"falsefalsefalse246))) {
  511.                 echo " ~ ";
  512.                 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.'246$this->source); })()), "code_max", [], "any"falsefalsefalse246), "html"nulltrue);
  513.             }
  514.             echo "</span>
  515.                             </div>
  516.                         </div>
  517.                     ";
  518.         }
  519.         // line 250
  520.         echo "                    ";
  521.         // line 251
  522.         echo "                    ";
  523.         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.'251$this->source); })()), "ProductCategories", [], "any"falsefalsefalse251))) {
  524.             // line 252
  525.             echo "                        <div class=\"ec-productRole__category product_detail_text\">
  526.                             <div class=\"product_detail_text_l fw\">";
  527.             // line 253
  528.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html"nulltrue);
  529.             echo "</div>
  530.                             <div>
  531.                                 ";
  532.             // line 255
  533.             $context['_parent'] = $context;
  534.             $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.'255$this->source); })()), "ProductCategories", [], "any"falsefalsefalse255));
  535.             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  536.                 // line 256
  537.                 echo "                                    <ul>
  538.                                         <li>
  539.                                             ";
  540.                 // line 258
  541.                 $context['_parent'] = $context;
  542.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsefalse258), "path", [], "any"falsefalsefalse258));
  543.                 $context['loop'] = [
  544.                   'parent' => $context['_parent'],
  545.                   'index0' => 0,
  546.                   'index'  => 1,
  547.                   'first'  => true,
  548.                 ];
  549.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  550.                     $length count($context['_seq']);
  551.                     $context['loop']['revindex0'] = $length 1;
  552.                     $context['loop']['revindex'] = $length;
  553.                     $context['loop']['length'] = $length;
  554.                     $context['loop']['last'] = === $length;
  555.                 }
  556.                 foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  557.                     // line 259
  558.                     echo "                                                <a href=\"";
  559.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  560.                     echo "?category_id=";
  561.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse259), "html"nulltrue);
  562.                     echo "\">";
  563.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse259), "html"nulltrue);
  564.                     echo "</a>";
  565.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse259) == false)) {
  566.                         // line 260
  567.                         echo "                                                <span>></span>";
  568.                     }
  569.                     ++$context['loop']['index0'];
  570.                     ++$context['loop']['index'];
  571.                     $context['loop']['first'] = false;
  572.                     if (isset($context['loop']['length'])) {
  573.                         --$context['loop']['revindex0'];
  574.                         --$context['loop']['revindex'];
  575.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  576.                     }
  577.                 }
  578.                 $_parent $context['_parent'];
  579.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  580.                 $context array_intersect_key($context$_parent) + $_parent;
  581.                 // line 262
  582.                 echo "                                        </li>
  583.                                     </ul>
  584.                                 ";
  585.             }
  586.             $_parent $context['_parent'];
  587.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  588.             $context array_intersect_key($context$_parent) + $_parent;
  589.             // line 265
  590.             echo "                            </div>
  591.                         </div>
  592.                     ";
  593.         }
  594.         // line 268
  595.         echo "                    ";
  596.         echo twig_include($this->env$context"Product/sales_restrictions_cart.twig");
  597.         echo "
  598.                     <div class=\"ec-modal\">
  599.                         <div class=\"ec-modal-overlay\">
  600.                             <div class=\"ec-modal-wrap\">
  601.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\">×</span></span>
  602.                                 <div id=\"ec-modal-header\" class=\"text-center\">";
  603.         // line 273
  604.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  605.         echo "</div>
  606.                                 <div class=\"ec-modal-box\">
  607.                                     <div class=\"ec-role\">
  608.                                         <span class=\"ec-inlineBtn--cancel\">";
  609.         // line 276
  610.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  611.         echo "</span>
  612.                                         <a href=\"";
  613.         // line 277
  614.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  615.         echo "\" class=\"ec-inlineBtn--action\">";
  616.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  617.         echo "</a>
  618.                                     </div>
  619.                                 </div>
  620.                             </div>
  621.                         </div>
  622.                     </div>
  623.                     ";
  624.         // line 283
  625.         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.'283$this->source); })()), "option_favorite_product", [], "any"falsefalsefalse283)) {
  626.             // line 284
  627.             echo "                        <form action=\"";
  628.             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.'284$this->source); })()), "id", [], "any"falsefalsefalse284)]), "html"nulltrue);
  629.             echo "\" method=\"post\">
  630.                             <div class=\"ec-productRole__btn\">
  631.                                 ";
  632.             // line 286
  633.             if (((isset($context["is_favorite"]) || array_key_exists("is_favorite"$context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.'286$this->source); })()) == false)) {
  634.                 // line 287
  635.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  636.                                         ";
  637.                 // line 288
  638.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html"nulltrue);
  639.                 echo "
  640.                                     </button>
  641.                                 ";
  642.             } else {
  643.                 // line 291
  644.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  645.                                             disabled=\"disabled\">";
  646.                 // line 292
  647.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です"), "html"nulltrue);
  648.                 echo "
  649.                                     </button>
  650.                                 ";
  651.             }
  652.             // line 295
  653.             echo "                            </div>
  654.                         </form>
  655.                     ";
  656.         }
  657.         // line 298
  658.         echo "                    <div class=\"ec-productRole__description\">";
  659.         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.'298$this->source); })()), "description_detail", [], "any"falsefalsefalse298));
  660.         echo "
  661.                     </div>
  662.                 </div>
  663.             </div>
  664.         </div>
  665.         ";
  666.         // line 303
  667.         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.'303$this->source); })()), "freearea", [], "any"falsefalsefalse303)) {
  668.             // line 304
  669.             echo "             <div class=\"mt_large\">
  670.                  ";
  671.             // line 305
  672.             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.'305$this->source); })()), "freearea", [], "any"falsefalsefalse305)));
  673.             echo "
  674.             </div>
  675.         ";
  676.         }
  677.         // line 308
  678.         echo "    </div>
  679. ";
  680.         
  681.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  682.         
  683.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  684.     }
  685.     public function getTemplateName()
  686.     {
  687.         return "__string_template__9fdf1f4823b5bb57824e9631b737690f45c3bdcb3223bb302d3721856cab2d59";
  688.     }
  689.     public function isTraitable()
  690.     {
  691.         return false;
  692.     }
  693.     public function getDebugInfo()
  694.     {
  695.         return array (  708 => 308,  702 => 305,  699 => 304,  697 => 303,  688 => 298,  683 => 295,  677 => 292,  674 => 291,  668 => 288,  665 => 287,  663 => 286,  657 => 284,  655 => 283,  644 => 277,  640 => 276,  634 => 273,  625 => 268,  620 => 265,  612 => 262,  597 => 260,  588 => 259,  571 => 258,  567 => 256,  563 => 255,  558 => 253,  555 => 252,  552 => 251,  550 => 250,  539 => 246,  534 => 244,  531 => 243,  528 => 242,  525 => 240,  514 => 238,  510 => 237,  507 => 236,  502 => 233,  499 => 232,  492 => 226,  473 => 224,  456 => 223,  452 => 221,  441 => 219,  419 => 217,  401 => 216,  387 => 204,  377 => 203,  362 => 197,  358 => 196,  354 => 195,  350 => 193,  344 => 191,  342 => 190,  337 => 189,  334 => 188,  324 => 186,  310 => 184,  302 => 183,  284 => 182,  279 => 180,  256 => 160,  242 => 149,  212 => 122,  207 => 119,  198 => 113,  194 => 111,  192 => 110,  189 => 109,  180 => 103,  176 => 101,  174 => 100,  109 => 37,  101 => 35,  99 => 34,  94 => 32,  91 => 31,  89 => 30,  75 => 19,  72 => 18,  62 => 17,  51 => 11,  49 => 13,  36 => 11,);
  696.     }
  697.     public function getSourceContext()
  698.     {
  699.         return new Source("{#
  700. This file is part of EC-CUBE
  701. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  702. http://www.ec-cube.co.jp/
  703. For the full copyright and license information, please view the LICENSE
  704. file that was distributed with this source code.
  705. #}
  706. {% extends 'default_frame.twig' %}
  707. {% set body_class = 'product_page' %}
  708. {% block javascript %}
  709.     <script>
  710.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  711.         // 規格2に選択肢を割り当てる。
  712.         function fnSetClassCategories(form, classcat_id2_selected) {
  713.             var \$form = \$(form);
  714.             var product_id = \$form.find('input[name=product_id]').val();
  715.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  716.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  717.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  718.         }
  719.         {% if form.classcategory_id2 is defined %}
  720.         fnSetClassCategories(
  721.             \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  722.         );
  723.         {% elseif form.classcategory_id1 is defined %}
  724.         eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  725.         {% endif %}
  726.     </script>
  727.     <script>
  728.         \$(function() {
  729.             // bfcache無効化
  730.             \$(window).bind('pageshow', function(event) {
  731.                 if (event.originalEvent.persisted) {
  732.                     location.reload(true);
  733.                 }
  734.             });
  735.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  736.             // img タグに width, height が付与されている.
  737.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  738.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  739.             \$('.ec-grid2__cell').hide();
  740.             var removeSize = function () {
  741.                 \$('.slide-item').height('');
  742.                 \$('.slide-item img')
  743.                     .removeAttr('width')
  744.                     .removeAttr('height')
  745.                     .removeAttr('style');
  746.             };
  747.             var slickInitial = function(slick) {
  748.                 \$('.ec-grid2__cell').fadeIn(1500);
  749.                 var baseHeight = \$(slick.target).height();
  750.                 var baseWidth = \$(slick.target).width();
  751.                 var rate = baseWidth / baseHeight;
  752.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  753.                 // transform を使用することでCLSの影響を受けないようにする
  754.                 \$('.slide-item img')
  755.                     .css(
  756.                         {
  757.                             'transform-origin': 'top left',
  758.                             'transform': 'scaleY(' + rate + ')',
  759.                             'transition': 'transform .1s'
  760.                         }
  761.                     );
  762.                 // 正しいサイズに近くなったら属性を解除する
  763.                 setTimeout(removeSize, 500);
  764.             };
  765.             \$('.item_visual').on('init', slickInitial);
  766.             // リサイズ時は CLS の影響を受けないため属性を解除する
  767.             \$(window).resize(removeSize);
  768.             \$('.item_visual').slick({
  769.                 dots: false,
  770.                 arrows: false,
  771.                 responsive: [{
  772.                     breakpoint: 768,
  773.                     settings: {
  774.                     }
  775.                 }]
  776.             });
  777.             \$('.slideThumb').on('click', function() {
  778.                 var index = \$(this).attr('data-index');
  779.                 \$('.item_visual').slick('slickGoTo', index, false);
  780.             })
  781.         });
  782.     </script>
  783.     <script>
  784.         \$(function() {
  785.             \$('.add-cart').on('click', function(event) {
  786.                 {% if form.classcategory_id1 is defined %}
  787.                 // 規格1フォームの必須チェック
  788.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  789.                     \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  790.                     return true;
  791.                 } else {
  792.                     \$('#classcategory_id1')[0].setCustomValidity('');
  793.                 }
  794.                 {% endif %}
  795.                 {% if form.classcategory_id2 is defined %}
  796.                 // 規格2フォームの必須チェック
  797.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  798.                     \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  799.                     return true;
  800.                 } else {
  801.                     \$('#classcategory_id2')[0].setCustomValidity('');
  802.                 }
  803.                 {% endif %}
  804.                 // 個数フォームのチェック
  805.                 if (\$('#quantity').val() < 1) {
  806.                     \$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  807.                     return true;
  808.                 } else {
  809.                     \$('#quantity')[0].setCustomValidity('');
  810.                 }
  811.                 event.preventDefault();
  812.                 \$form = \$('#form1');
  813.                 \$.ajax({
  814.                     url: \$form.attr('action'),
  815.                     type: \$form.attr('method'),
  816.                     data: \$form.serialize(),
  817.                     dataType: 'json',
  818.                     beforeSend: function(xhr, settings) {
  819.                         // Buttonを無効にする
  820.                         \$('.add-cart').prop('disabled', true);
  821.                     }
  822.                 }).done(function(data) {
  823.                     // レスポンス内のメッセージをalertで表示
  824.                     \$.each(data.messages, function() {
  825.                         \$('#ec-modal-header').html(this);
  826.                     });
  827.                     \$('.ec-modal').show()
  828.                     // カートブロックを更新する
  829.                     \$.ajax({
  830.                         url: \"{{ url('block_cart') }}\",
  831.                         type: 'GET',
  832.                         dataType: 'html'
  833.                     }).done(function(html) {
  834.                         \$('.cart_content').html(html);
  835.                         //固定フッターのバッジ更新
  836.                         const out_html = \$(\$.parseHTML(html));
  837.                         const badge = out_html.find('#head_cartNavi_badge').text();
  838.                         \$('#fixed_footer_badge').text(badge);
  839.                     });
  840.                 }).fail(function(data) {
  841.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  842.                 }).always(function(data) {
  843.                     // Buttonを有効にする
  844.                     \$('.add-cart').prop('disabled', false);
  845.                 });
  846.             });
  847.         });
  848.         \$('.ec-modal-wrap').on('click', function(e) {
  849.             // モーダル内の処理は外側にバブリングさせない
  850.             e.stopPropagation();
  851.         });
  852.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  853.             \$('.ec-modal').hide()
  854.         });
  855.     </script>
  856.     <script type=\"application/ld+json\">
  857.     {
  858.         \"@context\": \"https://schema.org/\",
  859.         \"@type\": \"Product\",
  860.         \"name\": \"{{ Product.name }}\",
  861.         \"image\": [
  862.             {% for img in Product.ProductImage %}
  863.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
  864.             {% else %}
  865.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
  866.             {% endfor %}
  867.         ],
  868.         \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
  869.         {% if Product.code_min %}
  870.         \"sku\": \"{{ Product.code_min }}\",
  871.         {% endif %}
  872.         \"offers\": {
  873.             \"@type\": \"Offer\",
  874.             \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
  875.             \"priceCurrency\": \"{{ eccube_config.currency }}\",
  876.             \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
  877.         }
  878.     }
  879.     </script>
  880. {% endblock %}
  881. {% block main %}
  882.     
  883. <div class=\"back_btn\">
  884.     <a href=\"javascript:history.back();\" class=\"ec-inlineBtn\">< 戻る</a>
  885. </div>
  886.     
  887.     <div class=\"ec-productRole\">
  888.         <div class=\"ec-grid2 product_detail_wrap\">
  889.             <div class=\"product_detail_img slide\">
  890.                 <div class=\"ec-sliderItemRole\">
  891.                     <div class=\"item_visual\">
  892.                         {% for ProductImage in Product.ProductImage %}
  893.                             <div class=\"slide-item slide_img\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"{% if loop.index > 1 %} loading=\"lazy\"{% endif %}></div>
  894.                         {% else %}
  895.                             <div class=\"slide-item slide_img\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
  896.                         {% endfor %}
  897.                     </div>
  898.                     <div class=\"item_nav\">
  899.                         {% for ProductImage in Product.ProductImage %}
  900.                             <div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  901.                         {% endfor %}
  902.                     </div>
  903.                 </div>
  904.             </div>
  905.             <div class=\"product_detail_main\">
  906.                 <div class=\"ec-productRole__profile\">
  907.                     {# 商品名 #}
  908.                     <div class=\"ec-productRole__title\">
  909.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  910.                     </div>
  911.                     {# タグ #}
  912.                     <ul class=\"ec-productRole__tags\">
  913.                         {% for Tag in Product.Tags %}
  914.                             <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  915.                         {% endfor %}
  916.                     </ul>
  917.                     {# 商品コード #}
  918.                     {% if Product.code_min is not empty %}
  919.                         <div class=\"ec-productRole__code product_detail_text\">
  920.                             <div class=\"product_detail_text_l fw\">{{ '商品コード'|trans }}</div>
  921.                             <div>
  922.                                 <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  923.                             </div>
  924.                         </div>
  925.                     {% endif %}
  926.                     {# 関連カテゴリ #}
  927.                     {% if Product.ProductCategories is not empty %}
  928.                         <div class=\"ec-productRole__category product_detail_text\">
  929.                             <div class=\"product_detail_text_l fw\">{{ '関連カテゴリ'|trans }}</div>
  930.                             <div>
  931.                                 {% for ProductCategory in Product.ProductCategories %}
  932.                                     <ul>
  933.                                         <li>
  934.                                             {% for Category in ProductCategory.Category.path %}
  935.                                                 <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  936.                                                 <span>></span>{% endif -%}
  937.                                             {% endfor %}
  938.                                         </li>
  939.                                     </ul>
  940.                                 {% endfor %}
  941.                             </div>
  942.                         </div>
  943.                     {% endif %}
  944.                     {{ include('Product/sales_restrictions_cart.twig') }}
  945.                     <div class=\"ec-modal\">
  946.                         <div class=\"ec-modal-overlay\">
  947.                             <div class=\"ec-modal-wrap\">
  948.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\">×</span></span>
  949.                                 <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  950.                                 <div class=\"ec-modal-box\">
  951.                                     <div class=\"ec-role\">
  952.                                         <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  953.                                         <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  954.                                     </div>
  955.                                 </div>
  956.                             </div>
  957.                         </div>
  958.                     </div>
  959.                     {% if BaseInfo.option_favorite_product %}
  960.                         <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  961.                             <div class=\"ec-productRole__btn\">
  962.                                 {% if is_favorite == false %}
  963.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  964.                                         {{ 'お気に入りに追加'|trans }}
  965.                                     </button>
  966.                                 {% else %}
  967.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  968.                                             disabled=\"disabled\">{{ 'お気に入りに追加済です'|trans }}
  969.                                     </button>
  970.                                 {% endif %}
  971.                             </div>
  972.                         </form>
  973.                     {% endif %}
  974.                     <div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
  975.                     </div>
  976.                 </div>
  977.             </div>
  978.         </div>
  979.         {% if Product.freearea %}
  980.              <div class=\"mt_large\">
  981.                  {{ include(template_from_string(Product.freearea)) }}
  982.             </div>
  983.         {% endif %}
  984.     </div>
  985. {% endblock %}""__string_template__9fdf1f4823b5bb57824e9631b737690f45c3bdcb3223bb302d3721856cab2d59""");
  986.     }
  987. }