var/cache/dev/twig/f6/f61f9a08d8c306a7fe7a13d20b7abc1d.php line 959

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