var/cache/dev/twig/ef/ef1893e7ea280c4aa312b392250fb298.php line 55

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_50c55b3c841638c7a625c25b7c20f276 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  28.         $this->checkSecurity();
  29.     }
  30.     protected function doGetParent(array $context)
  31.     {
  32.         // line 11
  33.         return "default_frame.twig";
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = [])
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  42.         // line 13
  43.         $context["body_class"] = "product_page";
  44.         // line 11
  45.         $this->parent $this->loadTemplate("default_frame.twig""Product/detail.twig"11);
  46.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  49.         
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51.     }
  52.     // line 15
  53.     public function block_stylesheet($context, array $blocks = [])
  54.     {
  55.         $macros $this->macros;
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  60.         // line 16
  61.         echo "    <style>
  62.         .slick-slider {
  63.             margin-bottom: 30px;
  64.         }
  65.         .slick-dots {
  66.             position: absolute;
  67.             bottom: -45px;
  68.             display: block;
  69.             width: 100%;
  70.             padding: 0;
  71.             list-style: none;
  72.             text-align: center;
  73.         }
  74.         .slick-dots li {
  75.             position: relative;
  76.             display: inline-block;
  77.             width: 20px;
  78.             height: 20px;
  79.             margin: 0 5px;
  80.             padding: 0;
  81.             cursor: pointer;
  82.         }
  83.         .slick-dots li button {
  84.             font-size: 0;
  85.             line-height: 0;
  86.             display: block;
  87.             width: 20px;
  88.             height: 20px;
  89.             padding: 5px;
  90.             cursor: pointer;
  91.             color: transparent;
  92.             border: 0;
  93.             outline: none;
  94.             background: transparent;
  95.         }
  96.         .slick-dots li button:hover,
  97.         .slick-dots li button:focus {
  98.             outline: none;
  99.         }
  100.         .slick-dots li button:hover:before,
  101.         .slick-dots li button:focus:before {
  102.             opacity: 1;
  103.         }
  104.         .slick-dots li button:before {
  105.             content: \" \";
  106.             line-height: 20px;
  107.             position: absolute;
  108.             top: 0;
  109.             left: 0;
  110.             width: 12px;
  111.             height: 12px;
  112.             text-align: center;
  113.             opacity: .25;
  114.             background-color: black;
  115.             border-radius: 50%;
  116.         }
  117.         .slick-dots li.slick-active button:before {
  118.             opacity: .75;
  119.             background-color: black;
  120.         }
  121.         .slick-dots li button.thumbnail img {
  122.             width: 0;
  123.             height: 0;
  124.         }
  125.     </style>
  126. ";
  127.         
  128.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  129.         
  130.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  131.     }
  132.     // line 95
  133.     public function block_javascript($context, array $blocks = [])
  134.     {
  135.         $macros $this->macros;
  136.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  137.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  138.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  139.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  140.         // line 96
  141.         echo "    <script>
  142.         eccube.classCategories = ";
  143.         // line 97
  144.         echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson($this->sandbox->ensureToStringAllowed((isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'97$this->source); })()), 97$this->source));
  145.         echo ";
  146.         // 規格2に選択肢を割り当てる。
  147.         function fnSetClassCategories(form, classcat_id2_selected) {
  148.             var \$form = \$(form);
  149.             var product_id = \$form.find('input[name=product_id]').val();
  150.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  151.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  152.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  153.         }
  154.         ";
  155.         // line 108
  156.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruetrue108)) {
  157.             // line 109
  158.             echo "        fnSetClassCategories(
  159.             \$('#form1'), ";
  160.             // line 110
  161.             echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'110$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue110), "vars", [], "any"falsefalsetrue110), "value", [], "any"falsefalsetrue110), 110$this->source));
  162.             echo "
  163.         );
  164.         ";
  165.         } elseif (twig_get_attribute($this->env$this->source,         // line 112
  166. ($context["form"] ?? null), "classcategory_id1", [], "any"truetruetrue112)) {
  167.             // line 113
  168.             echo "        eccube.checkStock(\$('#form1'), ";
  169.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'113$this->source); })()), "id", [], "any"falsefalsetrue113), 113$this->source), "html"nulltrue);
  170.             echo ", ";
  171.             echo json_encode($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'113$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue113), "vars", [], "any"falsefalsetrue113), "value", [], "any"falsefalsetrue113), 113$this->source));
  172.             echo ", null);
  173.         ";
  174.         }
  175.         // line 115
  176.         echo "    </script>
  177.     <script>
  178.         \$(function() {
  179.             // bfcache無効化
  180.             \$(window).bind('pageshow', function(event) {
  181.                 if (event.originalEvent.persisted) {
  182.                     location.reload(true);
  183.                 }
  184.             });
  185.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  186.             // img タグに width, height が付与されている.
  187.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  188.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  189.             \$('.ec-grid2__cell').hide();
  190.             var removeSize = function () {
  191.                 \$('.slide-item').height('');
  192.                 \$('.slide-item img')
  193.                     .removeAttr('width')
  194.                     .removeAttr('height')
  195.                     .removeAttr('style');
  196.             };
  197.             var slickInitial = function(slick) {
  198.                 \$('.ec-grid2__cell').fadeIn(1500);
  199.                 var baseHeight = \$(slick.target).height();
  200.                 var baseWidth = \$(slick.target).width();
  201.                 var rate = baseWidth / baseHeight;
  202.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  203.                 // transform を使用することでCLSの影響を受けないようにする
  204.                 \$('.slide-item img')
  205.                     .css(
  206.                         {
  207.                             'transform-origin': 'top left',
  208.                             'transform': 'scaleY(' + rate + ')',
  209.                             'transition': 'transform .1s'
  210.                         }
  211.                     );
  212.                 // 正しいサイズに近くなったら属性を解除する
  213.                 setTimeout(removeSize, 500);
  214.             };
  215.             \$('.item_visual').on('init', slickInitial);
  216.             // リサイズ時は CLS の影響を受けないため属性を解除する
  217.             \$(window).resize(removeSize);
  218.             \$('.item_visual').slick({
  219.                 dots: false,
  220.                 arrows: false,
  221.                 responsive: [{
  222.                     breakpoint: 768,
  223.                     settings: {
  224.                         dots: true
  225.                     }
  226.                 }]
  227.             });
  228.             \$('.slide-thumb').on('click', function() {
  229.                 var index = \$(this).attr('data-index');
  230.                 \$('.item_visual').slick('slickGoTo', index, false);
  231.             })
  232.         });
  233.     </script>
  234.     <script>
  235.         \$(function() {
  236.             \$('.add-cart').on('click', function(event) {
  237.                 ";
  238.         // line 179
  239.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruetrue179)) {
  240.             // line 180
  241.             echo "                // 規格1フォームの必須チェック
  242.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  243.                     \$('#classcategory_id1')[0].setCustomValidity('";
  244.             // line 182
  245.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  246.             echo "');
  247.                     return true;
  248.                 } else {
  249.                     \$('#classcategory_id1')[0].setCustomValidity('');
  250.                 }
  251.                 ";
  252.         }
  253.         // line 188
  254.         echo "
  255.                 ";
  256.         // line 189
  257.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruetrue189)) {
  258.             // line 190
  259.             echo "                // 規格2フォームの必須チェック
  260.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  261.                     \$('#classcategory_id2')[0].setCustomValidity('";
  262.             // line 192
  263.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  264.             echo "');
  265.                     return true;
  266.                 } else {
  267.                     \$('#classcategory_id2')[0].setCustomValidity('');
  268.                 }
  269.                 ";
  270.         }
  271.         // line 198
  272.         echo "
  273.                 // 個数フォームのチェック
  274.                 if (\$('#quantity').val() < 1) {
  275.                     \$('#quantity')[0].setCustomValidity('";
  276.         // line 201
  277.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("1以上で入力してください。"), "html"nulltrue);
  278.         echo "');
  279.                     return true;
  280.                 } else {
  281.                     \$('#quantity')[0].setCustomValidity('');
  282.                 }
  283.                 event.preventDefault();
  284.                 \$form = \$('#form1');
  285.                 \$.ajax({
  286.                     url: \$form.attr('action'),
  287.                     type: \$form.attr('method'),
  288.                     data: \$form.serialize(),
  289.                     dataType: 'json',
  290.                     beforeSend: function(xhr, settings) {
  291.                         // Buttonを無効にする
  292.                         \$('.add-cart').prop('disabled', true);
  293.                     }
  294.                 }).done(function(data) {
  295.                     // レスポンス内のメッセージをalertで表示
  296.                     \$.each(data.messages, function() {
  297.                         \$('#ec-modal-header').text(this);
  298.                     });
  299.                     \$('.ec-modal').show()
  300.                     // カートブロックを更新する
  301.                     \$.ajax({
  302.                         url: \"";
  303.         // line 228
  304.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  305.         echo "\",
  306.                         type: 'GET',
  307.                         dataType: 'html'
  308.                     }).done(function(html) {
  309.                         \$('.ec-headerRole__cart').html(html);
  310.                     });
  311.                 }).fail(function(data) {
  312.                     alert('";
  313.         // line 235
  314.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  315.         echo "');
  316.                 }).always(function(data) {
  317.                     // Buttonを有効にする
  318.                     \$('.add-cart').prop('disabled', false);
  319.                 });
  320.             });
  321.         });
  322.         \$('.ec-modal-wrap').on('click', function(e) {
  323.             // モーダル内の処理は外側にバブリングさせない
  324.             e.stopPropagation();
  325.         });
  326.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  327.             \$('.ec-modal').hide()
  328.         });
  329.     </script>
  330.     <script type=\"application/ld+json\">
  331.     {
  332.         \"@context\": \"https://schema.org/\",
  333.         \"@type\": \"Product\",
  334.         \"name\": \"";
  335.         // line 255
  336.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'255$this->source); })()), "name", [], "any"falsefalsetrue255), 255$this->source), "html"nulltrue);
  337.         echo "\",
  338.         \"image\": [
  339.             ";
  340.         // line 257
  341.         $context['_parent'] = $context;
  342.         $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"falsefalsetrue257));
  343.         $context['_iterated'] = false;
  344.         $context['loop'] = [
  345.           'parent' => $context['_parent'],
  346.           'index0' => 0,
  347.           'index'  => 1,
  348.           'first'  => true,
  349.         ];
  350.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  351.             $length count($context['_seq']);
  352.             $context['loop']['revindex0'] = $length 1;
  353.             $context['loop']['revindex'] = $length;
  354.             $context['loop']['length'] = $length;
  355.             $context['loop']['last'] = === $length;
  356.         }
  357.         foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
  358.             // line 258
  359.             echo "                \"";
  360.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'258$this->source); })()), "request", [], "any"falsefalsetrue258), "schemeAndHttpHost", [], "any"falsefalsetrue258), 258$this->source), "html"nulltrue);
  361.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["img"], 258$this->source), "save_image"), "html"nulltrue);
  362.             echo "\"";
  363.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue258)) {
  364.                 echo ",";
  365.             }
  366.             // line 259
  367.             echo "
  368.             ";
  369.             $context['_iterated'] = true;
  370.             ++$context['loop']['index0'];
  371.             ++$context['loop']['index'];
  372.             $context['loop']['first'] = false;
  373.             if (isset($context['loop']['length'])) {
  374.                 --$context['loop']['revindex0'];
  375.                 --$context['loop']['revindex'];
  376.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  377.             }
  378.         }
  379.         if (!$context['_iterated']) {
  380.             // line 261
  381.             echo "                \"";
  382.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'261$this->source); })()), "request", [], "any"falsefalsetrue261), "schemeAndHttpHost", [], "any"falsefalsetrue261), 261$this->source), "html"nulltrue);
  383.             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);
  384.             echo "\"
  385.             ";
  386.         }
  387.         $_parent $context['_parent'];
  388.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
  389.         $context array_intersect_key($context$_parent) + $_parent;
  390.         // line 263
  391.         echo "        ],
  392.         \"description\": \"";
  393.         // line 264
  394.         echo twig_escape_filter($this->envtwig_slice($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"truetruetrue264)) ? (_twig_default_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"falsefalsetrue264), 264$this->source), $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'264$this->source); })()), "description_detail", [], "any"falsefalsetrue264), 264$this->source))) : (twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'264$this->source); })()), "description_detail", [], "any"falsefalsetrue264))), ["
  395. => """ " => ""]), 0300), "html"nulltrue);
  396.         echo "\",
  397.         ";
  398.         // line 265
  399.         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"falsefalsetrue265)) {
  400.             // line 266
  401.             echo "        \"sku\": \"";
  402.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'266$this->source); })()), "code_min", [], "any"falsefalsetrue266), 266$this->source), "html"nulltrue);
  403.             echo "\",
  404.         ";
  405.         }
  406.         // line 268
  407.         echo "        \"offers\": {
  408.             \"@type\": \"Offer\",
  409.             \"url\": \"";
  410.         // line 270
  411.         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"falsefalsetrue270)]), "html"nulltrue);
  412.         echo "\",
  413.             \"priceCurrency\": \"";
  414.         // line 271
  415.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["eccube_config"]) || array_key_exists("eccube_config"$context) ? $context["eccube_config"] : (function () { throw new RuntimeError('Variable "eccube_config" does not exist.'271$this->source); })()), "currency", [], "any"falsefalsetrue271), 271$this->source), "html"nulltrue);
  416.         echo "\",
  417.             \"price\": ";
  418.         // line 272
  419.         ((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"falsefalsetrue272)) ? (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"falsefalsetrue272), "html"nulltrue))) : (print (0)));
  420.         echo ",
  421.             \"availability\": \"";
  422.         // line 273
  423.         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"falsefalsetrue273)) ? ("InStock") : ("OutOfStock"));
  424.         echo "\"
  425.         }
  426.     }
  427.     </script>
  428. ";
  429.         
  430.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  431.         
  432.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  433.     }
  434.     // line 279
  435.     public function block_main($context, array $blocks = [])
  436.     {
  437.         $macros $this->macros;
  438.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  439.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  440.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  441.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  442.         // line 280
  443.         echo "    <div class=\"ec-productRole mt-4\">
  444.         <div class=\"row\">
  445.             <div class=\"col-12 col-lg-6\">
  446.                 <div class=\"ec-sliderItemRole px-0\">
  447.                     <div class=\"item_visual\">
  448.                         ";
  449.         // line 286
  450.         $context['_parent'] = $context;
  451.         $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"falsefalsetrue286));
  452.         $context['_iterated'] = false;
  453.         $context['loop'] = [
  454.           'parent' => $context['_parent'],
  455.           'index0' => 0,
  456.           'index'  => 1,
  457.           'first'  => true,
  458.         ];
  459.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  460.             $length count($context['_seq']);
  461.             $context['loop']['revindex0'] = $length 1;
  462.             $context['loop']['revindex'] = $length;
  463.             $context['loop']['length'] = $length;
  464.             $context['loop']['last'] = === $length;
  465.         }
  466.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  467.             // line 287
  468.             echo "                            <div class=\"slide-item\"><img src=\"";
  469.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 287$this->source), "save_image"), "html"nulltrue);
  470.             echo "\" alt=\"";
  471.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsetrue287)) ? (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"falsefalsetrue287), "html"nulltrue))) : (print ("")));
  472.             echo "\"></div>
  473.                         ";
  474.             $context['_iterated'] = true;
  475.             ++$context['loop']['index0'];
  476.             ++$context['loop']['index'];
  477.             $context['loop']['first'] = false;
  478.             if (isset($context['loop']['length'])) {
  479.                 --$context['loop']['revindex0'];
  480.                 --$context['loop']['revindex'];
  481.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  482.             }
  483.         }
  484.         if (!$context['_iterated']) {
  485.             // line 289
  486.             echo "                            <div class=\"slide-item\"><img src=\"";
  487.             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);
  488.             echo "\" alt=\"";
  489.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsetrue289)) ? (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"falsefalsetrue289), "html"nulltrue))) : (print ("")));
  490.             echo "\" /></div>
  491.                         ";
  492.         }
  493.         $_parent $context['_parent'];
  494.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  495.         $context array_intersect_key($context$_parent) + $_parent;
  496.         // line 291
  497.         echo "                    </div>
  498.                     <div class=\"item_nav\">
  499.                         <div class=\"row\" style=\"width: 100%;\">
  500.                             ";
  501.         // line 294
  502.         $context['_parent'] = $context;
  503.         $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.'294$this->source); })()), "ProductImage", [], "any"falsefalsetrue294));
  504.         $context['loop'] = [
  505.           'parent' => $context['_parent'],
  506.           'index0' => 0,
  507.           'index'  => 1,
  508.           'first'  => true,
  509.         ];
  510.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  511.             $length count($context['_seq']);
  512.             $context['loop']['revindex0'] = $length 1;
  513.             $context['loop']['revindex'] = $length;
  514.             $context['loop']['length'] = $length;
  515.             $context['loop']['last'] = === $length;
  516.         }
  517.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  518.             // line 295
  519.             echo "                                <div class=\"slide-thumb col-4\" data-index=\"";
  520.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsetrue295), 295$this->source), "html"nulltrue);
  521.             echo "\"><img class=\"img-fluid\" src=\"";
  522.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed($context["ProductImage"], 295$this->source), "save_image"), "html"nulltrue);
  523.             echo "\" alt=\"\"></div>
  524.                             ";
  525.             ++$context['loop']['index0'];
  526.             ++$context['loop']['index'];
  527.             $context['loop']['first'] = false;
  528.             if (isset($context['loop']['length'])) {
  529.                 --$context['loop']['revindex0'];
  530.                 --$context['loop']['revindex'];
  531.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  532.             }
  533.         }
  534.         $_parent $context['_parent'];
  535.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  536.         $context array_intersect_key($context$_parent) + $_parent;
  537.         // line 297
  538.         echo "                        </div>
  539.                     </div>
  540.                 </div>
  541.             </div>
  542.             <div class=\"col-12 col-lg-6\">
  543.                 <div class=\"ec-productRole__profile ml-0\">
  544.                     ";
  545.         // line 304
  546.         echo "                    <div class=\"ec-productRole__title\">
  547.                         <h2 class=\"ec-headingTitle\">";
  548.         // line 305
  549.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'305$this->source); })()), "name", [], "any"falsefalsetrue305), 305$this->source), "html"nulltrue);
  550.         echo "</h2>
  551.                     </div>
  552.                     ";
  553.         // line 308
  554.         echo "                    <ul class=\"ec-productRole__tags\">
  555.                         ";
  556.         // line 309
  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.'309$this->source); })()), "Tags", [], "any"falsefalsetrue309));
  559.         foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  560.             // line 310
  561.             echo "                            <li class=\"ec-productRole__tag tag_";
  562.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsetrue310), 310$this->source), "html"nulltrue);
  563.             echo "\">";
  564.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed($context["Tag"], 310$this->source), "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 312
  572.         echo "                    </ul>
  573.                     ";
  574.         // line 314
  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.'314$this->source); })()), "hasProductClass", [], "any"falsefalsetrue314)) {
  577.             // line 315
  578.             echo "<div class=\"ec-productRole__priceRegular\">
  579.                             ";
  580.             // line 316
  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.'316$this->source); })()), "getPrice01Min", [], "any"falsefalsetrue316)) && (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.'316$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsetrue316) == 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.'316$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsetrue316)))) {
  582.                 // line 317
  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($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'317$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsetrue317), 317$this->source)), "html"nulltrue);
  587.                 echo "</span></span>
  588.                                 <span class=\"ec-productRole__priceRegularTax\">";
  589.                 // line 318
  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 319
  594. (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'319$this->source); })()), "getPrice01Min", [], "any"falsefalsetrue319)) &&  !(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.'319$this->source); })()), "getPrice01Max", [], "any"falsefalsetrue319)))) {
  595.                 // line 320
  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($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'320$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsetrue320), 320$this->source)), "html"nulltrue);
  600.                 echo "~ ";
  601.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'320$this->source); })()), "getPrice01IncTaxMax", [], "any"falsefalsetrue320), 320$this->source)), "html"nulltrue);
  602.                 echo "</span></span>
  603.                                 <span class=\"ec-productRole__priceRegularTax\">";
  604.                 // line 321
  605.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  606.                 echo "</span>
  607.                             ";
  608.             }
  609.             // line 323
  610.             echo "                        </div>
  611.                     ";
  612.         } else {
  613.             // line 325
  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.'325$this->source); })()), "getPrice01Max", [], "any"falsefalsetrue325))) {
  616.                 // line 326
  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($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'326$this->source); })()), "getPrice01IncTaxMin", [], "any"falsefalsetrue326), 326$this->source)), "html"nulltrue);
  621.                 echo "</span>
  622.                             <span class=\"ec-productRole__priceRegularTax\">";
  623.                 // line 327
  624.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  625.                 echo "</span>
  626.                         ";
  627.             }
  628.             // line 329
  629.             echo "                    ";
  630.         }
  631.         // line 330
  632.         echo "                    ";
  633.         // line 331
  634.         echo "                    <div class=\"ec-productRole__price\">
  635.                         ";
  636.         // line 332
  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.'332$this->source); })()), "hasProductClass", [], "any"falsefalsetrue332)) {
  638.             // line 333
  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.'333$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsetrue333) == 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); })()), "getPrice02IncTaxMax", [], "any"falsefalsetrue333))) {
  640.                 // line 334
  641.                 echo "                                <div class=\"ec-price\">
  642.                                     <span class=\"ec-price__price price02-default\">";
  643.                 // line 335
  644.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'335$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsetrue335), 335$this->source)), "html"nulltrue);
  645.                 echo "</span>
  646.                                     <span class=\"ec-price__tax\">";
  647.                 // line 336
  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 339
  654.                 echo "                                <div class=\"ec-price\">
  655.                                     <span class=\"ec-price__price price02-default\">";
  656.                 // line 340
  657.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'340$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsetrue340), 340$this->source)), "html"nulltrue);
  658.                 echo " ~ ";
  659.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'340$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsetrue340), 340$this->source)), "html"nulltrue);
  660.                 echo "</span>
  661.                                     <span class=\"ec-price__tax\">";
  662.                 // line 341
  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 344
  669.             echo "                        ";
  670.         } else {
  671.             // line 345
  672.             echo "                            <div class=\"ec-price\">
  673.                                 <span class=\"ec-price__price\">";
  674.             // line 346
  675.             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'346$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsetrue346), 346$this->source)), "html"nulltrue);
  676.             echo "</span>
  677.                                 <span class=\"ec-price__tax\">";
  678.             // line 347
  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 350
  685.         echo "                    </div>
  686.                     ";
  687.         // line 352
  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.'352$this->source); })()), "code_min", [], "any"falsefalsetrue352))) {
  690.             // line 353
  691.             echo "                        <div class=\"ec-productRole__code\">
  692.                             ";
  693.             // line 354
  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->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'354$this->source); })()), "code_min", [], "any"falsefalsetrue354), 354$this->source), "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.'354$this->source); })()), "code_min", [], "any"falsefalsetrue354) != 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.'354$this->source); })()), "code_max", [], "any"falsefalsetrue354))) {
  698.                 echo " ~ ";
  699.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'354$this->source); })()), "code_max", [], "any"falsefalsetrue354), 354$this->source), "html"nulltrue);
  700.             }
  701.             echo "</span>
  702.                         </div>
  703.                     ";
  704.         }
  705.         // line 357
  706.         echo "                    ";
  707.         // line 358
  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.'358$this->source); })()), "ProductCategories", [], "any"falsefalsetrue358))) {
  710.             // line 359
  711.             echo "                        <div class=\"ec-productRole__category\">
  712.                             <div>";
  713.             // line 360
  714.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html"nulltrue);
  715.             echo "</div>
  716.                             ";
  717.             // line 361
  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.'361$this->source); })()), "ProductCategories", [], "any"falsefalsetrue361));
  720.             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  721.                 // line 362
  722.                 echo "                                <ul>
  723.                                     <li>
  724.                                         ";
  725.                 // line 364
  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"falsefalsetrue364), "path", [], "any"falsefalsetrue364));
  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 365
  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->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsetrue365), 365$this->source), "html"nulltrue);
  747.                     echo "\">";
  748.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsetrue365), 365$this->source), "html"nulltrue);
  749.                     echo "</a>";
  750.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsetrue365) == false)) {
  751.                         // line 366
  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 368
  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 371
  775.             echo "                        </div>
  776.                     ";
  777.         }
  778.         // line 373
  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.'373$this->source); })()), "id", [], "any"falsefalsetrue373)]), "html"nulltrue);
  781.         echo "\" method=\"post\" id=\"form1\" name=\"form1\">
  782.                         ";
  783.         // line 374
  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.'374$this->source); })()), "stock_find", [], "any"falsefalsetrue374)) {
  785.             // line 375
  786.             echo "                            <div class=\"ec-productRole__actions\">
  787.                                 ";
  788.             // line 376
  789.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruetrue376)) {
  790.                 // line 377
  791.                 echo "                                    <div class=\"ec-select\">
  792.                                         ";
  793.                 // line 378
  794.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'378$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue378), 378$this->source), 'widget');
  795.                 echo "
  796.                                         ";
  797.                 // line 379
  798.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'379$this->source); })()), "classcategory_id1", [], "any"falsefalsetrue379), 379$this->source), 'errors');
  799.                 echo "
  800.                                     </div>
  801.                                     ";
  802.                 // line 381
  803.                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruetrue381)) {
  804.                     // line 382
  805.                     echo "                                        <div class=\"ec-select\">
  806.                                             ";
  807.                     // line 383
  808.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'383$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue383), 383$this->source), 'widget');
  809.                     echo "
  810.                                             ";
  811.                     // line 384
  812.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'384$this->source); })()), "classcategory_id2", [], "any"falsefalsetrue384), 384$this->source), 'errors');
  813.                     echo "
  814.                                         </div>
  815.                                     ";
  816.                 }
  817.                 // line 387
  818.                 echo "                                ";
  819.             }
  820.             // line 388
  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 389
  826.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'389$this->source); })()), "quantity", [], "any"falsefalsetrue389), 389$this->source), 'widget');
  827.             echo "
  828.                                     ";
  829.             // line 390
  830.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'390$this->source); })()), "quantity", [], "any"falsefalsetrue390), 390$this->source), '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 395
  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 399
  845.             echo "                            <div class=\"ec-productRole__btn\">
  846.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  847.                                     ";
  848.             // line 401
  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 405
  856.         echo "
  857.                         ";
  858.         // line 406
  859.         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($this->sandbox->ensureToStringAllowed((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'406$this->source); })()), 406$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 411
  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 412
  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 415
  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 416
  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 422
  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.'422$this->source); })()), "option_favorite_product", [], "any"falsefalsetrue422)) {
  893.             // line 423
  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.'423$this->source); })()), "id", [], "any"falsefalsetrue423)]), "html"nulltrue);
  896.             echo "\" method=\"post\">
  897.                             <div class=\"ec-productRole__btn\">
  898.                                 ";
  899.             // line 425
  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.'425$this->source); })()) == false)) {
  901.                 // line 426
  902.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  903.                                         ";
  904.                 // line 427
  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 430
  911.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  912.                                             disabled=\"disabled\">";
  913.                 // line 431
  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 434
  920.             echo "                            </div>
  921.                         </form>
  922.                     ";
  923.         }
  924.         // line 437
  925.         echo "                    <div class=\"ec-productRole__description\">";
  926.         echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'437$this->source); })()), "description_detail", [], "any"falsefalsetrue437), 437$this->source));
  927.         echo "
  928.                     </div>
  929.                 </div>
  930.             </div>
  931.         </div>
  932.         ";
  933.         // line 442
  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.'442$this->source); })()), "freearea", [], "any"falsefalsetrue442)) {
  935.             // line 443
  936.             echo "             <div class=\"ec-productRole__description\">
  937.                  ";
  938.             // line 444
  939.             echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env$contexttwig_template_from_string($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'444$this->source); })()), "freearea", [], "any"falsefalsetrue444), 444$this->source)));
  940.             echo "
  941.             </div>
  942.         ";
  943.         }
  944.         // line 447
  945.         echo "    </div>
  946. ";
  947.         
  948.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  949.         
  950.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_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 => 447,  985 => 444,  982 => 443,  980 => 442,  971 => 437,  966 => 434,  960 => 431,  957 => 430,  951 => 427,  948 => 426,  946 => 425,  940 => 423,  938 => 422,  927 => 416,  923 => 415,  917 => 412,  913 => 411,  905 => 406,  902 => 405,  895 => 401,  891 => 399,  884 => 395,  876 => 390,  872 => 389,  867 => 388,  864 => 387,  858 => 384,  854 => 383,  851 => 382,  849 => 381,  844 => 379,  840 => 378,  837 => 377,  835 => 376,  832 => 375,  830 => 374,  825 => 373,  821 => 371,  813 => 368,  798 => 366,  789 => 365,  772 => 364,  768 => 362,  764 => 361,  760 => 360,  757 => 359,  754 => 358,  752 => 357,  740 => 354,  737 => 353,  734 => 352,  731 => 350,  725 => 347,  721 => 346,  718 => 345,  715 => 344,  709 => 341,  703 => 340,  700 => 339,  694 => 336,  690 => 335,  687 => 334,  685 => 333,  683 => 332,  680 => 331,  678 => 330,  675 => 329,  670 => 327,  663 => 326,  660 => 325,  656 => 323,  651 => 321,  642 => 320,  640 => 319,  636 => 318,  629 => 317,  627 => 316,  624 => 315,  621 => 314,  618 => 312,  607 => 310,  603 => 309,  600 => 308,  595 => 305,  592 => 304,  584 => 297,  565 => 295,  548 => 294,  543 => 291,  532 => 289,  514 => 287,  496 => 286,  488 => 280,  478 => 279,  463 => 273,  459 => 272,  455 => 271,  451 => 270,  447 => 268,  441 => 266,  439 => 265,  434 => 264,  431 => 263,  421 => 261,  407 => 259,  399 => 258,  381 => 257,  376 => 255,  353 => 235,  343 => 228,  313 => 201,  308 => 198,  299 => 192,  295 => 190,  293 => 189,  290 => 188,  281 => 182,  277 => 180,  275 => 179,  209 => 115,  201 => 113,  199 => 112,  194 => 110,  191 => 109,  189 => 108,  175 => 97,  172 => 96,  162 => 95,  75 => 16,  65 => 15,  54 => 11,  52 => 13,  39 => 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.             \$('.slide-thumb').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').text(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 mt-4\">
  1215.         <div class=\"row\">
  1216.             <div class=\"col-12 col-lg-6\">
  1217.                 <div class=\"ec-sliderItemRole px-0\">
  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 : '' }}\"></div>
  1221.                         {% else %}
  1222.                             <div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" /></div>
  1223.                         {% endfor %}
  1224.                     </div>
  1225.                     <div class=\"item_nav\">
  1226.                         <div class=\"row\" style=\"width: 100%;\">
  1227.                             {% for ProductImage in Product.ProductImage %}
  1228.                                 <div class=\"slide-thumb col-4\" data-index=\"{{ loop.index0 }}\"><img class=\"img-fluid\" src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\"></div>
  1229.                             {% endfor %}
  1230.                         </div>
  1231.                     </div>
  1232.                 </div>
  1233.             </div>
  1234.             <div class=\"col-12 col-lg-6\">
  1235.                 <div class=\"ec-productRole__profile ml-0\">
  1236.                     {# 商品名 #}
  1237.                     <div class=\"ec-productRole__title\">
  1238.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  1239.                     </div>
  1240.                     {# タグ #}
  1241.                     <ul class=\"ec-productRole__tags\">
  1242.                         {% for Tag in Product.Tags %}
  1243.                             <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  1244.                         {% endfor %}
  1245.                     </ul>
  1246.                     {# 通常価格 #}
  1247.                     {% if Product.hasProductClass -%}
  1248.                         <div class=\"ec-productRole__priceRegular\">
  1249.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  1250.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  1251.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1252.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  1253.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  1254.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1255.                             {% endif %}
  1256.                         </div>
  1257.                     {% else %}
  1258.                         {% if Product.getPrice01Max is not null %}
  1259.                             <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  1260.                             <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  1261.                         {% endif %}
  1262.                     {% endif %}
  1263.                     {# 販売価格 #}
  1264.                     <div class=\"ec-productRole__price\">
  1265.                         {% if Product.hasProductClass -%}
  1266.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  1267.                                 <div class=\"ec-price\">
  1268.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1269.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1270.                                 </div>
  1271.                             {% else %}
  1272.                                 <div class=\"ec-price\">
  1273.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  1274.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1275.                                 </div>
  1276.                             {% endif %}
  1277.                         {% else %}
  1278.                             <div class=\"ec-price\">
  1279.                                 <span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
  1280.                                 <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  1281.                             </div>
  1282.                         {% endif %}
  1283.                     </div>
  1284.                     {# 商品コード #}
  1285.                     {% if Product.code_min is not empty %}
  1286.                         <div class=\"ec-productRole__code\">
  1287.                             {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  1288.                         </div>
  1289.                     {% endif %}
  1290.                     {# 関連カテゴリ #}
  1291.                     {% if Product.ProductCategories is not empty %}
  1292.                         <div class=\"ec-productRole__category\">
  1293.                             <div>{{ '関連カテゴリ'|trans }}</div>
  1294.                             {% for ProductCategory in Product.ProductCategories %}
  1295.                                 <ul>
  1296.                                     <li>
  1297.                                         {% for Category in ProductCategory.Category.path %}
  1298.                                             <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  1299.                                             <span>></span>{% endif -%}
  1300.                                         {% endfor %}
  1301.                                     </li>
  1302.                                 </ul>
  1303.                             {% endfor %}
  1304.                         </div>
  1305.                     {% endif %}
  1306.                     <form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
  1307.                         {% if Product.stock_find %}
  1308.                             <div class=\"ec-productRole__actions\">
  1309.                                 {% if form.classcategory_id1 is defined %}
  1310.                                     <div class=\"ec-select\">
  1311.                                         {{ form_widget(form.classcategory_id1) }}
  1312.                                         {{ form_errors(form.classcategory_id1) }}
  1313.                                     </div>
  1314.                                     {% if form.classcategory_id2 is defined %}
  1315.                                         <div class=\"ec-select\">
  1316.                                             {{ form_widget(form.classcategory_id2) }}
  1317.                                             {{ form_errors(form.classcategory_id2) }}
  1318.                                         </div>
  1319.                                     {% endif %}
  1320.                                 {% endif %}
  1321.                                 <div class=\"ec-numberInput\"><span>{{ '数量'|trans }}</span>
  1322.                                     {{ form_widget(form.quantity) }}
  1323.                                     {{ form_errors(form.quantity) }}
  1324.                                 </div>
  1325.                             </div>
  1326.                             <div class=\"ec-productRole__btn\">
  1327.                                 <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  1328.                                     {{ 'カートに入れる'|trans }}
  1329.                                 </button>
  1330.                             </div>
  1331.                         {% else %}
  1332.                             <div class=\"ec-productRole__btn\">
  1333.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1334.                                     {{ 'ただいま品切れ中です。'|trans }}
  1335.                                 </button>
  1336.                             </div>
  1337.                         {% endif %}
  1338.                         {{ form_rest(form) }}
  1339.                     </form>
  1340.                     <div class=\"ec-modal\">
  1341.                         <div class=\"ec-modal-overlay\">
  1342.                             <div class=\"ec-modal-wrap\">
  1343.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  1344.                                 <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  1345.                                 <div class=\"ec-modal-box\">
  1346.                                     <div class=\"ec-role\">
  1347.                                         <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  1348.                                         <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  1349.                                     </div>
  1350.                                 </div>
  1351.                             </div>
  1352.                         </div>
  1353.                     </div>
  1354.                     {% if BaseInfo.option_favorite_product %}
  1355.                         <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  1356.                             <div class=\"ec-productRole__btn\">
  1357.                                 {% if is_favorite == false %}
  1358.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  1359.                                         {{ 'お気に入りに追加'|trans }}
  1360.                                     </button>
  1361.                                 {% else %}
  1362.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  1363.                                             disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
  1364.                                     </button>
  1365.                                 {% endif %}
  1366.                             </div>
  1367.                         </form>
  1368.                     {% endif %}
  1369.                     <div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
  1370.                     </div>
  1371.                 </div>
  1372.             </div>
  1373.         </div>
  1374.         {% if Product.freearea %}
  1375.              <div class=\"ec-productRole__description\">
  1376.                  {{ include(template_from_string(Product.freearea)) }}
  1377.             </div>
  1378.         {% endif %}
  1379.     </div>
  1380. {% endblock %}
  1381. ""Product/detail.twig""/home/okinawastore/okinawa-store.com/public_html/app/template/bootcube/Product/detail.twig");
  1382.     }
  1383.     
  1384.     public function checkSecurity()
  1385.     {
  1386.         static $tags = array("set" => 13"if" => 108"for" => 257);
  1387.         static $filters = array("raw" => 97"json_encode" => 110"escape" => 113"trans" => 182"no_image_product" => 261"slice" => 264"replace" => 264"default" => 264"price" => 317"nl2br" => 437);
  1388.         static $functions = array("class_categories_as_json" => 97"url" => 228"asset" => 258"form_widget" => 378"form_errors" => 379"form_rest" => 406"include" => 444"template_from_string" => 444);
  1389.         try {
  1390.             $this->sandbox->checkSecurity(
  1391.                 ['set''if''for'],
  1392.                 ['raw''json_encode''escape''trans''no_image_product''slice''replace''default''price''nl2br'],
  1393.                 ['class_categories_as_json''url''asset''form_widget''form_errors''form_rest''include''template_from_string']
  1394.             );
  1395.         } catch (SecurityError $e) {
  1396.             $e->setSourceContext($this->source);
  1397.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  1398.                 $e->setTemplateLine($tags[$e->getTagName()]);
  1399.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  1400.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  1401.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  1402.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  1403.             }
  1404.             throw $e;
  1405.         }
  1406.     }
  1407. }