var/cache/dev/twig/a7/a743a881f344b82a67c463663e966dad.php line 456

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