var/cache/dev/twig/51/51bec560e32e35de733753964d3d8f847ccd1f1d8c92bd915cabe238011d3bfd.php line 55

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