var/cache/dev/twig/f3/f34ef8d3eeedf04a6e4fbad19e3a8341f5516194c87bb9525c5be468fcbf6de6.php line 16

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