var/cache/dev/twig/fc/fc75e01c7e3fb88b5ce26f76365a75a8.php line 1318

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_5634727c89aa670b2185bc4292a0e1df extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'stylesheet' => [$this'block_stylesheet'],
  24.             'javascript' => [$this'block_javascript'],
  25.             'main' => [$this'block_main'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 11
  31.         return "default_frame.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Product/detail.twig"));
  40.         // line 13
  41.         $context["body_class"] = "product_page";
  42.         // line 110
  43.         $context["is_calendar"] = false;
  44.         // line 111
  45.         $context['_parent'] = $context;
  46.         $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.'111$this->source); })()), "ProductCategories", [], "any"falsefalsefalse111));
  47.         foreach ($context['_seq'] as $context["_key"] => $context["pc"]) {
  48.             // line 112
  49.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["pc"], "Category", [], "any"falsefalsefalse112), "id", [], "any"falsefalsefalse112) == 124)) {
  50.                 // line 113
  51.                 $context["is_calendar"] = true;
  52.             }
  53.         }
  54.         $_parent $context['_parent'];
  55.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pc'], $context['_parent'], $context['loop']);
  56.         $context array_intersect_key($context$_parent) + $_parent;
  57.         // line 11
  58.         $this->parent $this->loadTemplate("default_frame.twig""Product/detail.twig"11);
  59.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  60.         
  61.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  62.         
  63.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64.     }
  65.     // line 15
  66.     public function block_stylesheet($context, array $blocks = [])
  67.     {
  68.         $macros $this->macros;
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  70.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  72.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  73.         // line 16
  74.         echo "    <style>
  75.         .hidden{
  76.             display: none;
  77.         }
  78.         .slick-slider {
  79.             margin-bottom: 30px;
  80.         }
  81.         .slick-dots {
  82.             position: absolute;
  83.             bottom: -45px;
  84.             display: block;
  85.             width: 100%;
  86.             padding: 0;
  87.             list-style: none;
  88.             text-align: center;
  89.         }
  90.         .slick-dots li {
  91.             position: relative;
  92.             display: inline-block;
  93.             width: 20px;
  94.             height: 20px;
  95.             margin: 0 5px;
  96.             padding: 0;
  97.             cursor: pointer;
  98.         }
  99.         .slick-dots li button {
  100.             font-size: 0;
  101.             line-height: 0;
  102.             display: block;
  103.             width: 20px;
  104.             height: 20px;
  105.             padding: 5px;
  106.             cursor: pointer;
  107.             color: transparent;
  108.             border: 0;
  109.             outline: none;
  110.             background: transparent;
  111.         }
  112.         .slick-dots li button:hover,
  113.         .slick-dots li button:focus {
  114.             outline: none;
  115.         }
  116.         .slick-dots li button:hover:before,
  117.         .slick-dots li button:focus:before {
  118.             opacity: 1;
  119.         }
  120.         .slick-dots li button:before {
  121.             content: \" \";
  122.             line-height: 20px;
  123.             position: absolute;
  124.             top: 0;
  125.             left: 0;
  126.             width: 12px;
  127.             height: 12px;
  128.             text-align: center;
  129.             opacity: .25;
  130.             background-color: black;
  131.             border-radius: 50%;
  132.         }
  133.         .slick-dots li.slick-active button:before {
  134.             opacity: .75;
  135.             background-color: black;
  136.         }
  137.         .slick-dots li button.thumbnail img {
  138.             width: 0;
  139.             height: 0;
  140.         }
  141.         .price_no_tax{
  142.             color: black;
  143.         }
  144.         .price_no_tax_first{
  145.             margin-left: 30px;
  146.         }
  147.         .product_plate_type_print img{
  148.             width: unset;
  149.         }
  150.         .ec-productRole .ec-productRole__category{
  151.             border-bottom: unset;
  152.         }
  153.     </style>
  154. ";
  155.         
  156.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  157.         
  158.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  159.     }
  160.     // line 117
  161.     public function block_javascript($context, array $blocks = [])
  162.     {
  163.         $macros $this->macros;
  164.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  165.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  166.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  167.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  168.         // line 118
  169.         echo "    <script>
  170.         var stocks = ";
  171.         // line 119
  172.         echo json_encode((isset($context["stocks"]) || array_key_exists("stocks"$context) ? $context["stocks"] : (function () { throw new RuntimeError('Variable "stocks" does not exist.'119$this->source); })()));
  173.         echo ";
  174.         eccube.classCategories = ";
  175.         // line 121
  176.         echo $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getClassCategoriesAsJson((isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'121$this->source); })()));
  177.         echo ";
  178.         // 規格2に選択肢を割り当てる。
  179.         function fnSetClassCategories(form, classcat_id2_selected) {
  180.             var \$form = \$(form);
  181.             var product_id = \$form.find('input[name=product_id]').val();
  182.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  183.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  184.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  185.         }
  186.         var code = jQuery('.product-code-default').text();
  187.         if (Number(stocks[code]) < 0){
  188.             jQuery('.product-stock-quantity-default').html('<b>あり</b>');
  189.         }
  190.         if (stocks[code] != undefined && stocks[code] > 0){
  191.             jQuery('.product-stock-quantity-default').html(stocks[code]);
  192.         }else if (stocks[code] != undefined && stocks[code] == 0){
  193.             jQuery('.product-stock-quantity-default').html('<b>なし</b>');
  194.         }
  195.         ";
  196.         // line 141
  197.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse141)) {
  198.             // line 142
  199.             echo "            fnSetClassCategories(
  200.                 \$('#form1'), ";
  201.             // line 143
  202.             echo json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'143$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse143), "vars", [], "any"falsefalsefalse143), "value", [], "any"falsefalsefalse143));
  203.             echo "
  204.             );
  205.         ";
  206.         } elseif (twig_get_attribute($this->env$this->source,         // line 145
  207. ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse145)) {
  208.             // line 146
  209.             echo "            \$('input[name=\"classcategory_option\"]').on('change', function(e) {
  210.                 \$('#classcategory_id1').val(\$(e.target).val()).change();
  211.             })
  212.             eccube.checkStock(\$('#form1'), ";
  213.             // line 149
  214.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'149$this->source); })()), "id", [], "any"falsefalsefalse149), "html"nulltrue);
  215.             echo ", ";
  216.             echo json_encode(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'149$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse149), "vars", [], "any"falsefalsefalse149), "value", [], "any"falsefalsefalse149));
  217.             echo ", null);
  218.         ";
  219.         }
  220.         // line 151
  221.         echo "    </script>
  222.     <script>
  223.         \$(function() {
  224.             // bfcache無効化
  225.             \$(window).bind('pageshow', function(event) {
  226.                 if (event.originalEvent.persisted) {
  227.                     location.reload(true);
  228.                 }
  229.             });
  230.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  231.             // img タグに width, height が付与されている.
  232.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  233.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  234.             \$('.ec-grid2__cell').hide();
  235.             var removeSize = function () {
  236.                 \$('.slide-item').height('');
  237.                 \$('.slide-item img')
  238.                     .removeAttr('width')
  239.                     .removeAttr('height')
  240.                     .removeAttr('style');
  241.             };
  242.             var slickInitial = function(slick) {
  243.                 \$('.ec-grid2__cell').fadeIn(1500);
  244.                 var baseHeight = \$(slick.target).height();
  245.                 var baseWidth = \$(slick.target).width();
  246.                 var rate = baseWidth / baseHeight;
  247.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  248.                 // transform を使用することでCLSの影響を受けないようにする
  249.                 \$('.slide-item img')
  250.                     .css(
  251.                         {
  252.                             'transform-origin': 'top left',
  253.                             'transform': 'scaleY(' + rate + ')',
  254.                             'transition': 'transform .1s'
  255.                         }
  256.                     );
  257.                 // 正しいサイズに近くなったら属性を解除する
  258.                 setTimeout(removeSize, 500);
  259.             };
  260.             \$('.item_visual').on('init', slickInitial);
  261.             // リサイズ時は CLS の影響を受けないため属性を解除する
  262.             \$(window).resize(removeSize);
  263.             \$('.item_visual').slick({
  264.                 dots: false,
  265.                 arrows: false,
  266.                 responsive: [{
  267.                     breakpoint: 768,
  268.                     settings: {
  269.                         dots: true
  270.                     }
  271.                 }]
  272.             });
  273.             \$('.slideThumb').on('click', function() {
  274.                 var index = \$(this).attr('data-index');
  275.                 \$('.item_visual').slick('slickGoTo', index, false);
  276.             })
  277.         });
  278.     </script>
  279.     <script>
  280.         \$(function() {
  281.             function htmlQty(type, printerUnit, orderUnit) {
  282.                 var html = ``;
  283.                 if(type === 1) {
  284.                     ";
  285.         // line 219
  286.         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.'219$this->source); })()), "printer_unit", [], "any"falsefalsefalse219)) {
  287.             // line 220
  288.             echo "                        html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
  289.                             html += `<option value=\"\" selected=\"selected\">数量</option>`;
  290.                             for(let i = 1; i < 31; i++) {
  291.                                 html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
  292.                             }
  293.                         html += `</select>`;
  294.                     ";
  295.         } else {
  296.             // line 227
  297.             echo "
  298.                         if(orderUnit > 0) {
  299.                             if(printerUnit === 0) {
  300.                                 printerUnit = orderUnit;
  301.                             }
  302.                             html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
  303.                                 html += `<option value=\"\" selected=\"selected\">数量</option>`;
  304.                                 for(let i = 1; i < 31; i++) {
  305.                                     html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
  306.                                 }
  307.                             html += `</select>`;
  308.                         } else {
  309.                             html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
  310.                         }
  311.                     ";
  312.         }
  313.         // line 242
  314.         echo "                } else {
  315.                     ";
  316.         // line 243
  317.         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.'243$this->source); })()), "order_unit", [], "any"falsefalsefalse243)) {
  318.             // line 244
  319.             echo "                        html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
  320.                             html += `<option value=\"\" selected=\"selected\">数量</option>`;
  321.                             for(let i = 1; i < 31; i++) {
  322.                                 html += `<option value=\"\${ i*orderUnit }\">\${ i*orderUnit }</option>`;
  323.                             }
  324.                         html += `</select>`;
  325.                     ";
  326.         } else {
  327.             // line 251
  328.             echo "                        html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
  329.                     ";
  330.         }
  331.         // line 253
  332.         echo "                }
  333.                 return html;
  334.             }
  335.             \$(\".group-input-qty\").html('');
  336.             \$(\".group-input-qty\").append(htmlQty(0, ";
  337.         // line 258
  338.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "printer_unit", [], "any"truetruefalse258)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "printer_unit", [], "any"falsefalsefalse258), 0)) : (0)), "html"nulltrue);
  339.         echo ", ";
  340.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "order_unit", [], "any"truetruefalse258)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "order_unit", [], "any"falsefalsefalse258), 0)) : (0)), "html"nulltrue);
  341.         echo "));
  342.             \$('.add-cart').on('click', function(event) {
  343.                 ";
  344.         // line 262
  345.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse262)) {
  346.             // line 263
  347.             echo "                // 規格1フォームの必須チェック
  348.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  349.                     \$('#classcategory_id1')[0].setCustomValidity('";
  350.             // line 265
  351.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  352.             echo "');
  353.                     return true;
  354.                 } else {
  355.                     \$('#classcategory_id1')[0].setCustomValidity('');
  356.                 }
  357.                 ";
  358.         }
  359.         // line 271
  360.         echo "
  361.                 ";
  362.         // line 272
  363.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse272)) {
  364.             // line 273
  365.             echo "                // 規格2フォームの必須チェック
  366.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  367.                     \$('#classcategory_id2')[0].setCustomValidity('";
  368.             // line 275
  369.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("項目が選択されていません"), "html"nulltrue);
  370.             echo "');
  371.                     return true;
  372.                 } else {
  373.                     \$('#classcategory_id2')[0].setCustomValidity('');
  374.                 }
  375.                 ";
  376.         }
  377.         // line 281
  378.         echo "
  379.                 // 個数フォームのチェック
  380.                 var isPrint = false;
  381.                 if (\$('#is_print').val() == 1) {
  382.                     isPrint = true;
  383.                     if (!\$('#product_print_color').val()) {
  384.                         \$('#product_print_color')[0].setCustomValidity('";
  385.         // line 287
  386.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ネームプリントの色を選択してください。"), "html"nulltrue);
  387.         echo "');
  388.                         return true;
  389.                     } else {
  390.                         \$('#product_print_color')[0].setCustomValidity('');
  391.                     }
  392.                 }
  393.                 // 個数フォームのチェック
  394.                     if (!\$('#quantity').val()) {
  395.                         if (\$('#quantity').prop('nodeName') == 'SELECT') {
  396.                             \$('#quantity')[0].setCustomValidity('";
  397.         // line 297
  398.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量を選択してください。"), "html"nulltrue);
  399.         echo "');
  400.                         } else {
  401.                             \$('#quantity')[0].setCustomValidity('";
  402.         // line 299
  403.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("数量を入力してください。"), "html"nulltrue);
  404.         echo "');
  405.                         }
  406.                         return true;
  407.                     } else {
  408.                         \$('#quantity')[0].setCustomValidity('');
  409.                     }
  410.                 event.preventDefault();
  411.                 \$form = \$('#form1');
  412.                 \$.ajax({
  413.                     url: \$form.attr('action'),
  414.                     type: \$form.attr('method'),
  415.                     data: \$form.serialize(),
  416.                     dataType: 'json',
  417.                     beforeSend: function(xhr, settings) {
  418.                         // Buttonを無効にする
  419.                         \$('.add-cart').prop('disabled', true);
  420.                     }
  421.                 }).done(function(data) {
  422.                     // レスポンス内のメッセージをalertで表示
  423.                     \$.each(data.messages, function() {
  424.                         \$('#ec-modal-header').html(this);
  425.                     });
  426.                     \$('.ec-modal').show()
  427.                     // カートブロックを更新する
  428.                     \$.ajax({
  429.                         url: \"";
  430.         // line 327
  431.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("block_cart");
  432.         echo "\",
  433.                         type: 'GET',
  434.                         dataType: 'html'
  435.                     }).done(function(html) {
  436.                         \$('.ec-headerRole__cart').html(html);
  437.                     });
  438.                 }).fail(function(data) {
  439.                     alert('";
  440.         // line 334
  441.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへの追加に失敗しました。"), "html"nulltrue);
  442.         echo "');
  443.                 }).always(function(data) {
  444.                     // Buttonを有効にする
  445.                     \$('.add-cart').prop('disabled', false);
  446.                 });
  447.             });
  448.             \$(\"#is_print\").change(function(){
  449.                 \$(\".group-input-qty\").html('');
  450.                 if (\$(this).val() == 1) {
  451.                     \$('.form-is_repurchase').css('display', 'block');
  452.                     \$('.form-is_repurchase input:first').prop('checked', true);
  453.                     \$('.form-product-color').css('display', 'block');
  454.                     \$(\".group-input-qty\").append(htmlQty(1, ";
  455.         // line 348
  456.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "printer_unit", [], "any"truetruefalse348)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "printer_unit", [], "any"falsefalsefalse348), 0)) : (0)), "html"nulltrue);
  457.         echo ", ";
  458.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "order_unit", [], "any"truetruefalse348)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "order_unit", [], "any"falsefalsefalse348), 0)) : (0)), "html"nulltrue);
  459.         echo "));
  460.                     // \$(\"#quantity\").attr('name', 'quantity').css('display', 'inline-block');
  461.                     // \$(\"#quantity_raw\").attr('name', 'quantity_raw').css('display', 'none');
  462.                 } else {
  463.                     \$('.form-is_repurchase').css('display', 'none');
  464.                     \$('.form-is_repurchase input').prop('checked', false);
  465.                     \$('.form-product-color').css('display', 'none');
  466.                     \$('.form-product-color select').val('');
  467.                     \$(\".group-input-qty\").append(htmlQty(0, ";
  468.         // line 356
  469.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "printer_unit", [], "any"truetruefalse356)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "printer_unit", [], "any"falsefalsefalse356), 0)) : (0)), "html"nulltrue);
  470.         echo ", ";
  471.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "order_unit", [], "any"truetruefalse356)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "order_unit", [], "any"falsefalsefalse356), 0)) : (0)), "html"nulltrue);
  472.         echo "));
  473.                     // \$(\"#quantity\").attr('name', 'quantity_raw').css('display', 'none');
  474.                     // \$(\"#quantity_raw\").attr('name', 'quantity').css('display', 'inline-block');
  475.                 }
  476.             });
  477.         });
  478.         \$('.ec-modal-wrap').on('click', function(e) {
  479.             // モーダル内の処理は外側にバブリングさせない
  480.             e.stopPropagation();
  481.         });
  482.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  483.             \$('.ec-modal').hide()
  484.         });
  485.         var nIndexClass = 1;
  486.         \$(\"#classcategory_id1 > option\").each(function(k, v) {
  487.             if(this.value != \"__unselected\") {
  488.                 \$(v).attr('key', nIndexClass);
  489.                 nIndexClass++;
  490.             }
  491.         });
  492.         var jsonQty = ";
  493.         // line 379
  494.         echo json_encode(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.'379$this->source); })()), "getAllStocks", [], "any"falsefalsefalse379));
  495.         echo "
  496.         var select_classcategory_id1 = 0;
  497.         \$('#classcategory_id1').on('change', function(e) {
  498.             if(this.selectedIndex < 1) return false;
  499.             ";
  500.         // line 383
  501.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse383)) {
  502.             // line 384
  503.             echo "                getClass(this.selectedIndex)
  504.                 ";
  505.             // line 385
  506.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse385)) {
  507.                 // line 386
  508.                 echo "                    select_classcategory_id1 = this.selectedIndex;
  509.                 ";
  510.             }
  511.             // line 388
  512.             echo "            ";
  513.         }
  514.         // line 389
  515.         echo "        });
  516.         \$('#classcategory_id2').on('change', function(e) {
  517.             if(this.selectedIndex < 1) return false;
  518.             getClass(select_classcategory_id1, this.selectedIndex)
  519.         });
  520.         function getClass(class1, class2) {
  521.             var qty = '';
  522.             ";
  523.         // line 397
  524.         if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse397)) {
  525.             // line 398
  526.             echo "               qty = jsonQty[class1];
  527.                 ";
  528.             // line 399
  529.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse399)) {
  530.                 // line 400
  531.                 echo "                    qty = jsonQty[class1][class2];
  532.                 ";
  533.             }
  534.             // line 402
  535.             echo "            ";
  536.         }
  537.         // line 403
  538.         echo "            if(qty == \"0\") {
  539.                 \$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>なし</b>\");
  540.             } else if(!!qty === false){
  541.                 \$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>あり</b>\");
  542.             }else {
  543.                 qty = parseInt(qty);
  544.                 \$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>\"+qty+\"</b>\");
  545.             }
  546.         }
  547.         // \$('#is_print').change(function() {
  548.         //     window.location.href = window.location.href+'?is_print='+\$(this).val();
  549.         // });
  550.     </script>
  551.     <script type=\"application/ld+json\">
  552.     {
  553.         \"@context\": \"https://schema.org/\",
  554.         \"@type\": \"Product\",
  555.         \"name\": \"";
  556.         // line 422
  557.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'422$this->source); })()), "name", [], "any"falsefalsefalse422), "html"nulltrue);
  558.         echo "\",
  559.         \"image\": [
  560.             ";
  561.         // line 424
  562.         $context['_parent'] = $context;
  563.         $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.'424$this->source); })()), "ProductImage", [], "any"falsefalsefalse424));
  564.         $context['_iterated'] = false;
  565.         $context['loop'] = [
  566.           'parent' => $context['_parent'],
  567.           'index0' => 0,
  568.           'index'  => 1,
  569.           'first'  => true,
  570.         ];
  571.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  572.             $length count($context['_seq']);
  573.             $context['loop']['revindex0'] = $length 1;
  574.             $context['loop']['revindex'] = $length;
  575.             $context['loop']['length'] = $length;
  576.             $context['loop']['last'] = === $length;
  577.         }
  578.         foreach ($context['_seq'] as $context["_key"] => $context["img"]) {
  579.             // line 425
  580.             echo "                \"";
  581.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'425$this->source); })()), "request", [], "any"falsefalsefalse425), "schemeAndHttpHost", [], "any"falsefalsefalse425), "html"nulltrue);
  582.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["img"], "save_image"), "html"nulltrue);
  583.             echo "\"";
  584.             if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse425)) {
  585.                 echo ",";
  586.             }
  587.             // line 426
  588.             echo "
  589.             ";
  590.             $context['_iterated'] = true;
  591.             ++$context['loop']['index0'];
  592.             ++$context['loop']['index'];
  593.             $context['loop']['first'] = false;
  594.             if (isset($context['loop']['length'])) {
  595.                 --$context['loop']['revindex0'];
  596.                 --$context['loop']['revindex'];
  597.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  598.             }
  599.         }
  600.         if (!$context['_iterated']) {
  601.             // line 428
  602.             echo "                \"";
  603.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'428$this->source); })()), "request", [], "any"falsefalsefalse428), "schemeAndHttpHost", [], "any"falsefalsefalse428), "html"nulltrue);
  604.             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);
  605.             echo "\"
  606.             ";
  607.         }
  608.         $_parent $context['_parent'];
  609.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['img'], $context['_parent'], $context['loop']);
  610.         $context array_intersect_key($context$_parent) + $_parent;
  611.         // line 430
  612.         echo "        ],
  613.         \"description\": \"";
  614.         // line 431
  615.         echo twig_escape_filter($this->envtwig_slice($this->envtwig_replace_filter(((twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"truetruefalse431)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["Product"] ?? null), "description_list", [], "any"falsefalsefalse431), 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.'431$this->source); })()), "description_detail", [], "any"falsefalsefalse431))) : (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.'431$this->source); })()), "description_detail", [], "any"falsefalsefalse431))), ["
  616. => """ " => ""]), 0300), "html"nulltrue);
  617.         echo "\",
  618.         ";
  619.         // line 432
  620.         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.'432$this->source); })()), "code_min", [], "any"falsefalsefalse432)) {
  621.             // line 433
  622.             echo "        \"sku\": \"";
  623.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'433$this->source); })()), "code_min", [], "any"falsefalsefalse433), "html"nulltrue);
  624.             echo "\",
  625.         ";
  626.         }
  627.         // line 435
  628.         echo "        \"offers\": {
  629.             \"@type\": \"Offer\",
  630.             \"url\": \"";
  631.         // line 437
  632.         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.'437$this->source); })()), "id", [], "any"falsefalsefalse437)]), "html"nulltrue);
  633.         echo "\",
  634.             \"priceCurrency\": \"";
  635.         // line 438
  636.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["eccube_config"]) || array_key_exists("eccube_config"$context) ? $context["eccube_config"] : (function () { throw new RuntimeError('Variable "eccube_config" does not exist.'438$this->source); })()), "currency", [], "any"falsefalsefalse438), "html"nulltrue);
  637.         echo "\",
  638.             \"price\": ";
  639.         // line 439
  640.         ((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.'439$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse439)) ? (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.'439$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse439), "html"nulltrue))) : (print (0)));
  641.         echo ",
  642.             \"availability\": \"";
  643.         // line 440
  644.         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.'440$this->source); })()), "stock_find", [], "any"falsefalsefalse440)) ? ("InStock") : ("OutOfStock"));
  645.         echo "\"
  646.         }
  647.     }
  648.     </script>
  649.     ";
  650.         // line 445
  651.         $context["is_calendar"] = false;
  652.         // line 446
  653.         $context['_parent'] = $context;
  654.         $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.'446$this->source); })()), "ProductCategories", [], "any"falsefalsefalse446));
  655.         foreach ($context['_seq'] as $context["_key"] => $context["pc"]) {
  656.             // line 447
  657.             echo "  ";
  658.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["pc"], "Category", [], "any"falsefalsefalse447), "id", [], "any"falsefalsefalse447) == 124)) {
  659.                 // line 448
  660.                 echo "    ";
  661.                 $context["is_calendar"] = true;
  662.                 // line 449
  663.                 echo "  ";
  664.             }
  665.         }
  666.         $_parent $context['_parent'];
  667.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pc'], $context['_parent'], $context['loop']);
  668.         $context array_intersect_key($context$_parent) + $_parent;
  669.         // line 451
  670.         echo "
  671. ";
  672.         // line 452
  673.         if ((isset($context["is_calendar"]) || array_key_exists("is_calendar"$context) ? $context["is_calendar"] : (function () { throw new RuntimeError('Variable "is_calendar" does not exist.'452$this->source); })())) {
  674.             // line 453
  675.             echo "<script>
  676. document.addEventListener('DOMContentLoaded', function () {
  677.   // 規格1(数量パターン)
  678.   const select1 = document.getElementById('classcategory_id1')
  679.               || document.querySelector('select[name=\"classcategory_id1\"]');
  680.   if (!select1) return;
  681.   // 規格2(優先: #is_print、なければ classcategory_id2)
  682.   const isPrint = document.getElementById('is_print'); // 0=しない, 1=する
  683.   const select2 = isPrint || document.getElementById('classcategory_id2')
  684.                || document.querySelector('select[name=\"classcategory_id2\"]');
  685.   // 再版区分(表示/非表示を切り替え)
  686.   const repurchaseBlock = document.querySelector('.form-is_repurchase');
  687.   // ネームプリント切替連動(カレンダー)
  688. const PRINT_ON_VALUES   = new Set(['291', '292']);  // ネームプリントあり
  689. const PRINT_OFF_VALUES  = new Set(['289', '290']);  // ネームプリントなし
  690. const PRINT_BOTH_VALUES = new Set(['288']);         // 両方選択可
  691.   // classcategory_id2 用に元<option>保存(#is_printが無い場合に使う)
  692.   let original2 = null;
  693.   if (select2 && select2 !== isPrint) {
  694.     original2 = Array.from(select2.options).map(o => ({ value: o.value, text: (o.text||'').trim() }));
  695.   }
  696.   function applyRepurchaseVisibility() {
  697.     if (!repurchaseBlock) return;
  698.     if (isPrint) {
  699.       repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
  700.     }
  701.   }
  702.   function setIsPrintMode(mode) {
  703.     // #is_print がある(今回の構成)場合
  704.     if (isPrint) {
  705.       isPrint.innerHTML = '';
  706.       if (mode === 'do') {
  707.         isPrint.add(new Option('ネームプリントする', '1'));
  708.         isPrint.value = '1';
  709.       } else if (mode === 'dont') {
  710.         isPrint.add(new Option('ネームプリントしない', '0'));
  711.         isPrint.value = '0';
  712.       } else if (mode === 'both') {
  713.         // ★ 両方出す
  714.         isPrint.add(new Option('ネームプリントしない', '0'));
  715.         isPrint.add(new Option('ネームプリントする', '1'));
  716.         // 初期は「しない」に寄せる(必要なら '1' に変更可)
  717.         isPrint.value = '0';
  718.       }
  719.       // 他のハンドラより後に発火させる
  720.       setTimeout(() => {
  721.         isPrint.dispatchEvent(new Event('change', { bubbles: true }));
  722.         applyRepurchaseVisibility();
  723.       }, 0);
  724.       return;
  725.     }
  726.     // #is_print が無く、classcategory_id2 を使っている場合(参考)
  727.     if (select2 && original2) {
  728.       let list = [];
  729.       if (mode === 'do')      list = original2.filter(o => o.text.includes('する'));
  730.       else if (mode === 'dont') list = original2.filter(o => o.text.includes('しない'));
  731.       else /* both */         list = original2.slice();
  732.       select2.innerHTML = '';
  733.       list.forEach(o => select2.add(new Option(o.text, o.value)));
  734.       select2.selectedIndex = list.length ? 0 : -1;
  735.       setTimeout(() => {
  736.         select2.dispatchEvent(new Event('change', { bubbles: true }));
  737.       }, 0);
  738.       if (repurchaseBlock) {
  739.         repurchaseBlock.style.display = (mode === 'do') ? '' : 'none';
  740.       }
  741.     }
  742.   }
  743.   function onFirstChanged() {
  744.     const v1 = select1.value;
  745.     if (!v1 || v1 === '__unselected') {
  746.       if (repurchaseBlock) repurchaseBlock.style.display = 'none';
  747.       return;
  748.     }
  749.     if (PRINT_BOTH_VALUES.has(v1)) {
  750.       setIsPrintMode('both');  // ★ 100冊以上~ は両方
  751.     } else if (PRINT_ON_VALUES.has(v1)) {
  752.       setIsPrintMode('do');
  753.     } else if (PRINT_OFF_VALUES.has(v1)) {
  754.       setIsPrintMode('dont');
  755.     } else {
  756.       setIsPrintMode('dont');
  757.     }
  758.   }
  759.   if (isPrint) {
  760.     isPrint.addEventListener('change', applyRepurchaseVisibility);
  761.   }
  762. function updateIsPrintOptions(mode) {
  763.   const isPrint = document.getElementById('is_print');
  764.   const repurchaseBlock = document.querySelector('.form-is_repurchase');
  765.   if (!isPrint) return;
  766.   // 一旦 option 全削除
  767.   isPrint.innerHTML = '';
  768.   if (mode === 'do') {
  769.     isPrint.add(new Option('ネームプリントする', '1'));
  770.     isPrint.value = '1';
  771.   } else if (mode === 'dont') {
  772.     isPrint.add(new Option('ネームプリントしない', '0'));
  773.     isPrint.value = '0';
  774.   } else {
  775.     isPrint.add(new Option('ネームプリントしない', '0'));
  776.     isPrint.add(new Option('ネームプリントする', '1'));
  777.     isPrint.value = '0';
  778.   }
  779.   // ネームプリント「する」なら再版選択を表示
  780.   if (repurchaseBlock) {
  781.     repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
  782.   }
  783.   // イベント発火で数量 UI 切り替えなど反映
  784.   isPrint.dispatchEvent(new Event('change', { bubbles: true }));
  785. }
  786.   select1.addEventListener('change', onFirstChanged);
  787.   onFirstChanged(); // 初期反映
  788. });
  789. </script>
  790. <script>
  791. document.addEventListener('DOMContentLoaded', function () {
  792.   const el1 = document.getElementById('classcategory_id1') || document.querySelector('select[name=\"classcategory_id1\"]');
  793.   const el2 = document.getElementById('classcategory_id2') || document.querySelector('select[name=\"classcategory_id2\"]');
  794.   const out = document.getElementById('delivery-duration-text');
  795.   // 発送目安マップ
  796.   const deliveryMap = {};
  797.   ";
  798.             // line 596
  799.             $context['_parent'] = $context;
  800.             $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.'596$this->source); })()), "ProductClasses", [], "any"falsefalsefalse596));
  801.             foreach ($context['_seq'] as $context["_key"] => $context["pc"]) {
  802.                 // line 597
  803.                 echo "    ";
  804.                 $context["c1"] = ((twig_get_attribute($this->env$this->source$context["pc"], "ClassCategory1", [], "any"falsefalsefalse597)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["pc"], "ClassCategory1", [], "any"falsefalsefalse597), "id", [], "any"falsefalsefalse597)) : (""));
  805.                 // line 598
  806.                 echo "    ";
  807.                 $context["c2"] = ((twig_get_attribute($this->env$this->source$context["pc"], "ClassCategory2", [], "any"falsefalsefalse598)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["pc"], "ClassCategory2", [], "any"falsefalsefalse598), "id", [], "any"falsefalsefalse598)) : (""));
  808.                 // line 599
  809.                 echo "    ";
  810.                 $context["label"] = ((twig_get_attribute($this->env$this->source$context["pc"], "DeliveryDuration", [], "any"falsefalsefalse599)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["pc"], "DeliveryDuration", [], "any"falsefalsefalse599), "name", [], "any"falsefalsefalse599)) : (""));
  811.                 // line 600
  812.                 echo "    ";
  813.                 if (twig_get_attribute($this->env$this->source$context["pc"], "ClassCategory2", [], "any"falsefalsefalse600)) {
  814.                     // line 601
  815.                     echo "      deliveryMap['";
  816.                     echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1"$context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.'601$this->source); })()), "html"nulltrue);
  817.                     echo "'] = deliveryMap['";
  818.                     echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1"$context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.'601$this->source); })()), "html"nulltrue);
  819.                     echo "'] || {};
  820.       deliveryMap['";
  821.                     // line 602
  822.                     echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1"$context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.'602$this->source); })()), "html"nulltrue);
  823.                     echo "']['";
  824.                     echo twig_escape_filter($this->env, (isset($context["c2"]) || array_key_exists("c2"$context) ? $context["c2"] : (function () { throw new RuntimeError('Variable "c2" does not exist.'602$this->source); })()), "html"nulltrue);
  825.                     echo "'] = '";
  826.                     echo twig_escape_filter($this->envtwig_escape_filter($this->env, (isset($context["label"]) || array_key_exists("label"$context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.'602$this->source); })()), "js"), "html"nulltrue);
  827.                     echo "';
  828.     ";
  829.                 } else {
  830.                     // line 604
  831.                     echo "      deliveryMap['";
  832.                     echo twig_escape_filter($this->env, (isset($context["c1"]) || array_key_exists("c1"$context) ? $context["c1"] : (function () { throw new RuntimeError('Variable "c1" does not exist.'604$this->source); })()), "html"nulltrue);
  833.                     echo "'] = '";
  834.                     echo twig_escape_filter($this->envtwig_escape_filter($this->env, (isset($context["label"]) || array_key_exists("label"$context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.'604$this->source); })()), "js"), "html"nulltrue);
  835.                     echo "';
  836.     ";
  837.                 }
  838.                 // line 606
  839.                 echo "  ";
  840.             }
  841.             $_parent $context['_parent'];
  842.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pc'], $context['_parent'], $context['loop']);
  843.             $context array_intersect_key($context$_parent) + $_parent;
  844.             // line 607
  845.             echo "
  846.   function updateDelivery() {
  847.     if (!el1 || !out) return;
  848.     const v1 = el1.value;
  849.     if (!v1 || v1 === '__unselected') {
  850.       out.textContent = '';
  851.       return;
  852.     }
  853.     let label = '';
  854.     if (el2 && el2.value && el2.value !== '__unselected') {
  855.       if (deliveryMap[v1] && typeof deliveryMap[v1] === 'object') {
  856.         label = deliveryMap[v1][el2.value] || '';
  857.       }
  858.     } else {
  859.       label = (typeof deliveryMap[v1] === 'string') ? deliveryMap[v1] : '';
  860.     }
  861.     out.textContent = label || '';
  862.   }
  863.   if (el1) el1.addEventListener('change', updateDelivery);
  864.   if (el2) el2.addEventListener('change', updateDelivery);
  865.   updateDelivery(); // 初期表示
  866. });
  867. </script>
  868. <script>
  869. document.addEventListener('DOMContentLoaded', function () {
  870.   const form = document.querySelector('#form1');
  871.   const select1 = document.getElementById('classcategory_id1');
  872.   const qtySelector = 'select[name=\"quantity\"], input[name=\"quantity\"]';
  873.   function getQtyEl() {
  874.     return document.querySelector(qtySelector);
  875.   }
  876.   function getFixedQty(v1) {
  877.     if (v1 === '291' || v1 === '289') return '50';
  878.     if (v1 === '292' || v1 === '290') return '90';
  879.     return null;
  880.   }
  881.   function enforceQuantity(showAlert = false) {
  882.     const selected = select1?.value;
  883.     const qtyEl = getQtyEl();
  884.     const fixed = getFixedQty(selected);
  885.     if (!selected || !qtyEl || !fixed) return;
  886.     if (qtyEl.value !== fixed) {
  887.       if (showAlert) alert(`この規格では数量は\${fixed}個に固定されています。`);
  888.       qtyEl.value = fixed;
  889.     }
  890.   }
  891.   // 数量変更時に自動補正
  892.   document.addEventListener('change', function (e) {
  893.     if (e.target.matches(qtySelector) || e.target.id === 'classcategory_id1') {
  894.       enforceQuantity(false);
  895.     }
  896.   });
  897.   // フォーム送信時にも補正とアラート
  898.   if (form) {
  899.     form.addEventListener('submit', function () {
  900.       enforceQuantity(true);
  901.     });
  902.   }
  903. });
  904. </script>
  905. <script>
  906. document.addEventListener('DOMContentLoaded', function () {
  907.   const select1 = document.getElementById('classcategory_id1');
  908.   const form = document.querySelector('#form1');
  909.   function getQtyEl() {
  910.     return document.querySelector('select[name=\"quantity\"], input[name=\"quantity\"]');
  911.   }
  912.   function getFixedQty(v1) {
  913.     if (v1 === '291' || v1 === '289') return '50';
  914.     if (v1 === '292' || v1 === '290') return '90';
  915.     return null;
  916.   }
  917.   function enforceQuantity(showAlert = false) {
  918.     const selected = select1?.value;
  919.     const qtyEl = getQtyEl();
  920.     const fixed = getFixedQty(selected);
  921.     if (!selected || !qtyEl || !fixed) return;
  922.     if (qtyEl.value !== fixed) {
  923.       if (showAlert) alert(`この規格では数量は \${fixed} 個に固定されています。`);
  924.       qtyEl.value = fixed;
  925.     }
  926.   }
  927.   function attachQtyWatcher() {
  928.     const qtyEl = getQtyEl();
  929.     if (!qtyEl) return;
  930.     qtyEl.removeEventListener('change', qtyEl._handler || (() => {}));
  931.     qtyEl._handler = () => enforceQuantity(false);
  932.     qtyEl.addEventListener('change', qtyEl._handler);
  933.   }
  934.   // セレクト1が変わるたびに数量制御イベント再アタッチ
  935.   select1?.addEventListener('change', () => {
  936.     setTimeout(() => {
  937.       enforceQuantity(false);
  938.       attachQtyWatcher();
  939.     }, 100);
  940.   });
  941.   // is_print変更時もセレクトが入れ替わるため再アタッチ
  942.   const isPrint = document.getElementById('is_print');
  943.   isPrint?.addEventListener('change', () => {
  944.     setTimeout(() => {
  945.       enforceQuantity(false);
  946.       attachQtyWatcher();
  947.     }, 100);
  948.   });
  949.   // 最初の数量セレクトにも適用
  950.   setTimeout(() => {
  951.     enforceQuantity(false);
  952.     attachQtyWatcher();
  953.   }, 300);
  954.   // フォーム送信時チェック
  955.   form?.addEventListener('submit', function (e) {
  956.     enforceQuantity(true);
  957.   });
  958. });
  959. </script>
  960. ";
  961.         }
  962.         // line 741
  963.         echo "//カレンダー終わり
  964. ";
  965.         
  966.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  967.         
  968.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  969.     }
  970.     // line 745
  971.     public function block_main($context, array $blocks = [])
  972.     {
  973.         $macros $this->macros;
  974.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  975.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  976.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  977.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  978.         // line 746
  979.         echo "    <div class=\"ec-productRole\">
  980.         <div class=\"ec-grid2\">
  981.             <div class=\"ec-grid2__cell\">
  982.                 <div class=\"ec-sliderItemRole\">
  983.                     ";
  984.         // line 751
  985.         echo "                    ";
  986.         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.'751$this->source); })()), "ProductCategories", [], "any"falsefalsefalse751))) {
  987.             // line 752
  988.             echo "                        <div class=\"ec-productRole__category\">
  989.                             <div>";
  990.             // line 753
  991.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("関連カテゴリ"), "html"nulltrue);
  992.             echo "</div>
  993.                             ";
  994.             // line 754
  995.             $context['_parent'] = $context;
  996.             $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.'754$this->source); })()), "ProductCategories", [], "any"falsefalsefalse754));
  997.             foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
  998.                 // line 755
  999.                 echo "                                <ul>
  1000.                                     <li>
  1001.                                         ";
  1002.                 // line 757
  1003.                 $context['_parent'] = $context;
  1004.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductCategory"], "Category", [], "any"falsefalsefalse757), "path", [], "any"falsefalsefalse757));
  1005.                 $context['loop'] = [
  1006.                   'parent' => $context['_parent'],
  1007.                   'index0' => 0,
  1008.                   'index'  => 1,
  1009.                   'first'  => true,
  1010.                 ];
  1011.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  1012.                     $length count($context['_seq']);
  1013.                     $context['loop']['revindex0'] = $length 1;
  1014.                     $context['loop']['revindex'] = $length;
  1015.                     $context['loop']['length'] = $length;
  1016.                     $context['loop']['last'] = === $length;
  1017.                 }
  1018.                 foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  1019.                     // line 758
  1020.                     echo "                                            <a href=\"";
  1021.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  1022.                     echo "?category_id=";
  1023.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsefalse758), "html"nulltrue);
  1024.                     echo "\">";
  1025.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsefalse758), "html"nulltrue);
  1026.                     echo "</a>";
  1027.                     if ((twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse758) == false)) {
  1028.                         // line 759
  1029.                         echo "                                            <span>></span>";
  1030.                     }
  1031.                     ++$context['loop']['index0'];
  1032.                     ++$context['loop']['index'];
  1033.                     $context['loop']['first'] = false;
  1034.                     if (isset($context['loop']['length'])) {
  1035.                         --$context['loop']['revindex0'];
  1036.                         --$context['loop']['revindex'];
  1037.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  1038.                     }
  1039.                 }
  1040.                 $_parent $context['_parent'];
  1041.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  1042.                 $context array_intersect_key($context$_parent) + $_parent;
  1043.                 // line 761
  1044.                 echo "                                    </li>
  1045.                                 </ul>
  1046.                             ";
  1047.             }
  1048.             $_parent $context['_parent'];
  1049.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
  1050.             $context array_intersect_key($context$_parent) + $_parent;
  1051.             // line 764
  1052.             echo "                        </div>
  1053.                     ";
  1054.         }
  1055.         // line 766
  1056.         echo "                </div>
  1057.                 <div class=\"ec-sliderItemRole\">
  1058.                     <div class=\"item_visual\">
  1059.                         ";
  1060.         // line 770
  1061.         $context['_parent'] = $context;
  1062.         $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.'770$this->source); })()), "ProductImage", [], "any"falsefalsefalse770));
  1063.         $context['_iterated'] = false;
  1064.         $context['loop'] = [
  1065.           'parent' => $context['_parent'],
  1066.           'index0' => 0,
  1067.           'index'  => 1,
  1068.           'first'  => true,
  1069.         ];
  1070.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  1071.             $length count($context['_seq']);
  1072.             $context['loop']['revindex0'] = $length 1;
  1073.             $context['loop']['revindex'] = $length;
  1074.             $context['loop']['length'] = $length;
  1075.             $context['loop']['last'] = === $length;
  1076.         }
  1077.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  1078.             // line 771
  1079.             echo "                            <div class=\"slide-item\"><img src=\"";
  1080.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  1081.             echo "\" alt=\"";
  1082.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse771)) ? (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.'771$this->source); })()), "name", [], "any"falsefalsefalse771), "html"nulltrue))) : (print ("")));
  1083.             echo "\" width=\"550\" height=\"550\"";
  1084.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse771) > 1)) {
  1085.                 echo " loading=\"lazy\"";
  1086.             }
  1087.             echo "></div>
  1088.                         ";
  1089.             $context['_iterated'] = true;
  1090.             ++$context['loop']['index0'];
  1091.             ++$context['loop']['index'];
  1092.             $context['loop']['first'] = false;
  1093.             if (isset($context['loop']['length'])) {
  1094.                 --$context['loop']['revindex0'];
  1095.                 --$context['loop']['revindex'];
  1096.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  1097.             }
  1098.         }
  1099.         if (!$context['_iterated']) {
  1100.             // line 773
  1101.             echo "                            <div class=\"slide-item\"><img src=\"";
  1102.             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);
  1103.             echo "\" alt=\"";
  1104.             ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse773)) ? (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.'773$this->source); })()), "name", [], "any"falsefalsefalse773), "html"nulltrue))) : (print ("")));
  1105.             echo "\" width=\"550\" height=\"550\"></div>
  1106.                         ";
  1107.         }
  1108.         $_parent $context['_parent'];
  1109.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  1110.         $context array_intersect_key($context$_parent) + $_parent;
  1111.         // line 775
  1112.         echo "                    </div>
  1113.                     <div class=\"item_nav\">
  1114.                         ";
  1115.         // line 777
  1116.         $context['_parent'] = $context;
  1117.         $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.'777$this->source); })()), "ProductImage", [], "any"falsefalsefalse777));
  1118.         $context['loop'] = [
  1119.           'parent' => $context['_parent'],
  1120.           'index0' => 0,
  1121.           'index'  => 1,
  1122.           'first'  => true,
  1123.         ];
  1124.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  1125.             $length count($context['_seq']);
  1126.             $context['loop']['revindex0'] = $length 1;
  1127.             $context['loop']['revindex'] = $length;
  1128.             $context['loop']['length'] = $length;
  1129.             $context['loop']['last'] = === $length;
  1130.         }
  1131.         foreach ($context['_seq'] as $context["_key"] => $context["ProductImage"]) {
  1132.             // line 778
  1133.             echo "                            <div class=\"slideThumb\" data-index=\"";
  1134.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index0", [], "any"falsefalsefalse778), "html"nulltrue);
  1135.             echo "\"><img src=\"";
  1136.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["ProductImage"], "save_image"), "html"nulltrue);
  1137.             echo "\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  1138.                         ";
  1139.             ++$context['loop']['index0'];
  1140.             ++$context['loop']['index'];
  1141.             $context['loop']['first'] = false;
  1142.             if (isset($context['loop']['length'])) {
  1143.                 --$context['loop']['revindex0'];
  1144.                 --$context['loop']['revindex'];
  1145.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  1146.             }
  1147.         }
  1148.         $_parent $context['_parent'];
  1149.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductImage'], $context['_parent'], $context['loop']);
  1150.         $context array_intersect_key($context$_parent) + $_parent;
  1151.         // line 780
  1152.         echo "                    </div>
  1153.                 </div>
  1154.                 ";
  1155.         // line 782
  1156.         $context["sampleTagIds"] = [=> 8=> 12];
  1157.         // line 783
  1158.         $context["hasSampleTag"] = false;
  1159.         // line 784
  1160.         $context['_parent'] = $context;
  1161.         $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.'784$this->source); })()), "ProductTag", [], "any"falsefalsefalse784));
  1162.         foreach ($context['_seq'] as $context["_key"] => $context["ProductTag"]) {
  1163.             // line 785
  1164.             echo "    ";
  1165.             if (twig_in_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["ProductTag"], "Tag", [], "any"falsefalsefalse785), "id", [], "any"falsefalsefalse785), (isset($context["sampleTagIds"]) || array_key_exists("sampleTagIds"$context) ? $context["sampleTagIds"] : (function () { throw new RuntimeError('Variable "sampleTagIds" does not exist.'785$this->source); })()))) {
  1166.                 // line 786
  1167.                 echo "        ";
  1168.                 $context["hasSampleTag"] = true;
  1169.                 // line 787
  1170.                 echo "    ";
  1171.             }
  1172.         }
  1173.         $_parent $context['_parent'];
  1174.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductTag'], $context['_parent'], $context['loop']);
  1175.         $context array_intersect_key($context$_parent) + $_parent;
  1176.         // line 789
  1177.         echo "
  1178. ";
  1179.         // line 790
  1180.         if ((isset($context["hasSampleTag"]) || array_key_exists("hasSampleTag"$context) ? $context["hasSampleTag"] : (function () { throw new RuntimeError('Variable "hasSampleTag" does not exist.'790$this->source); })())) {
  1181.             // line 791
  1182.             echo "                <div class=\"ec-sliderItemRole\">
  1183.                     <p style=\"text-align: center;\">
  1184.                         <a class=\"ec-blockBtn--cancel\" href=\"/contact?product_id=";
  1185.             // line 793
  1186.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'793$this->source); })()), "id", [], "any"falsefalsefalse793), "html"nulltrue);
  1187.             echo "\" target=\"_blank\">サンプル請求</a>
  1188.                     </p>
  1189.                 </div>
  1190.                 <div class=\"ec-sliderItemRole\">
  1191.                     <p><b>【サンプルについて】</b><br>
  1192.                     <b><サンプル無料マークの商品について></b><br>
  1193.                     こちらのの商品は3点まで組み合わせ自由、無料で発送いたします。<br>
  1194.                     <b><サンプルレンタルOKマークの商品について></b><br>
  1195.                     こちらの商品は3点まで組み合わせ自由、貸出いたします。(※発送料は弊社負担ですが、ご返却送料はお客様ご負担となります。※サンプル到着後2週間以内にご返却ください。)</p><br>
  1196.                     <p>※在庫状況により、ご要望に添えない場合がございます。ご了承ください。</p>
  1197.                 </div>
  1198. ";
  1199.         }
  1200.         // line 805
  1201.         echo "            </div>
  1202.             <div class=\"ec-grid2__cell\">
  1203.                 <div class=\"ec-productRole__profile\">
  1204.                     ";
  1205.         // line 809
  1206.         echo "                    <div class=\"ec-productRole__title\">
  1207.                         <h2 class=\"ec-headingTitle\">";
  1208.         // line 810
  1209.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'810$this->source); })()), "name", [], "any"falsefalsefalse810), "html"nulltrue);
  1210.         echo "</h2>
  1211.                     </div>
  1212.                     ";
  1213.         // line 813
  1214.         echo "                    <ul class=\"ec-productRole__tags\">
  1215.                         ";
  1216.         // line 814
  1217.         $context['_parent'] = $context;
  1218.         $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.'814$this->source); })()), "Tags", [], "any"falsefalsefalse814));
  1219.         foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  1220.             // line 815
  1221.             echo "                            <li class=\"ec-productRole__tag tag_";
  1222.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsefalse815), "html"nulltrue);
  1223.             echo "\">";
  1224.             echo twig_escape_filter($this->env$context["Tag"], "html"nulltrue);
  1225.             echo "</li>
  1226.                         ";
  1227.         }
  1228.         $_parent $context['_parent'];
  1229.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  1230.         $context array_intersect_key($context$_parent) + $_parent;
  1231.         // line 817
  1232.         echo "                    </ul>
  1233.                     ";
  1234.         // line 819
  1235.         echo "                    ";
  1236.         // line 835
  1237.         echo "                    ";
  1238.         // line 836
  1239.         echo "                    <div class=\"ec-productRole__price\">
  1240.                         ";
  1241.         // line 837
  1242.         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.'837$this->source); })()), "hasProductClass", [], "any"falsefalsefalse837)) {
  1243.             // line 838
  1244.             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.'838$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse838) == 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.'838$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse838))) {
  1245.                 // line 839
  1246.                 echo "                                <div class=\"ec-price\">
  1247.                                     <span class=\"ec-price__price price02-default\">";
  1248.                 // line 840
  1249.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'840$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse840)), "html"nulltrue);
  1250.                 echo "</span>
  1251.                                     <span class=\"ec-price__tax\">";
  1252.                 // line 841
  1253.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  1254.                 echo "</span>
  1255.                                     <span class=\"ec-price__price price_no_tax price_no_tax_first\">";
  1256.                 // line 843
  1257.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'843$this->source); })()), "getPrice02Min", [], "any"falsefalsefalse843)), "html"nulltrue);
  1258.                 echo "</span>
  1259.                                     <span class=\"ec-price__tax price_no_tax\">";
  1260.                 // line 844
  1261.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税抜"), "html"nulltrue);
  1262.                 echo "</span>
  1263.                                 </div>
  1264.                             ";
  1265.             } else {
  1266.                 // line 847
  1267.                 echo "                                <div class=\"ec-price\">
  1268.                                     <span class=\"ec-price__price price02-default\">";
  1269.                 // line 848
  1270.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'848$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse848)), "html"nulltrue);
  1271.                 echo " ~ ";
  1272.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'848$this->source); })()), "getPrice02IncTaxMax", [], "any"falsefalsefalse848)), "html"nulltrue);
  1273.                 echo "</span>
  1274.                                     <span class=\"ec-price__tax\">";
  1275.                 // line 849
  1276.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  1277.                 echo "</span><br>
  1278.                                     <span class=\"ec-price__price price_no_tax\">";
  1279.                 // line 851
  1280.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'851$this->source); })()), "getPrice02Min", [], "any"falsefalsefalse851)), "html"nulltrue);
  1281.                 echo " ~ ";
  1282.                 echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'851$this->source); })()), "getPrice02Max", [], "any"falsefalsefalse851)), "html"nulltrue);
  1283.                 echo "</span>
  1284.                                     <span class=\"ec-price__tax price_no_tax\">";
  1285.                 // line 852
  1286.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税抜"), "html"nulltrue);
  1287.                 echo "</span>
  1288.                                 </div>
  1289.                             ";
  1290.             }
  1291.             // line 855
  1292.             echo "                        ";
  1293.         } else {
  1294.             // line 856
  1295.             echo "                            <div class=\"ec-price\">
  1296.                                 <span class=\"ec-price__price\">";
  1297.             // line 857
  1298.             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'857$this->source); })()), "getPrice02IncTaxMin", [], "any"falsefalsefalse857)), "html"nulltrue);
  1299.             echo "</span>
  1300.                                 <span class=\"ec-price__tax\">";
  1301.             // line 858
  1302.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税込"), "html"nulltrue);
  1303.             echo "</span>
  1304.                                 <span class=\"ec-price__price price_no_tax price_no_tax_first\">";
  1305.             // line 859
  1306.             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'859$this->source); })()), "getPrice02Min", [], "any"falsefalsefalse859)), "html"nulltrue);
  1307.             echo "</span>
  1308.                                 <span class=\"ec-price__tax price_no_tax\">";
  1309.             // line 860
  1310.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("税抜"), "html"nulltrue);
  1311.             echo "</span>
  1312.                             </div>
  1313.                         ";
  1314.         }
  1315.         // line 863
  1316.         echo "                    </div>
  1317.                     ";
  1318.         // line 865
  1319.         echo "                    ";
  1320.         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.'865$this->source); })()), "code_min", [], "any"falsefalsefalse865))) {
  1321.             // line 866
  1322.             echo "                        <div class=\"ec-productRole__code\">
  1323.                             ";
  1324.             // line 867
  1325.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("商品コード"), "html"nulltrue);
  1326.             echo ": <span class=\"product-code-default\">";
  1327.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'867$this->source); })()), "code_min", [], "any"falsefalsefalse867), "html"nulltrue);
  1328.             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.'867$this->source); })()), "code_min", [], "any"falsefalsefalse867) != 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.'867$this->source); })()), "code_max", [], "any"falsefalsefalse867))) {
  1329.                 echo " ~ ";
  1330.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'867$this->source); })()), "code_max", [], "any"falsefalsefalse867), "html"nulltrue);
  1331.             }
  1332.             echo "</span>
  1333.                         </div>
  1334.                     ";
  1335.         }
  1336.         // line 870
  1337.         echo "                    ";
  1338.         if ( !(isset($context["is_calendar"]) || array_key_exists("is_calendar"$context) ? $context["is_calendar"] : (function () { throw new RuntimeError('Variable "is_calendar" does not exist.'870$this->source); })())) {
  1339.             // line 871
  1340.             echo "                        <div class=\"ec-productRole__code\">
  1341.                               ";
  1342.             // line 872
  1343.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("在庫"), "html"nulltrue);
  1344.             echo ": <span class=\"product-stock-quantity-default\"></span>
  1345.                         </div>
  1346.                     ";
  1347.         }
  1348.         // line 875
  1349.         echo "                    ";
  1350.         if ((isset($context["is_calendar"]) || array_key_exists("is_calendar"$context) ? $context["is_calendar"] : (function () { throw new RuntimeError('Variable "is_calendar" does not exist.'875$this->source); })())) {
  1351.             // line 876
  1352.             echo "                    <div class=\"ec-productRole__code\">
  1353.                         発送日目安:<span id=\"delivery-duration-text\"></span>
  1354.                     </div>
  1355.                     ";
  1356.         }
  1357.         // line 880
  1358.         echo "                    <br>
  1359.                     <div class=\"ec-productRole__description\">";
  1360.         // line 881
  1361.         echo twig_nl2br(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'881$this->source); })()), "description_detail", [], "any"falsefalsefalse881));
  1362.         echo "
  1363.                     </div>
  1364.                     <form action=\"";
  1365.         // line 884
  1366.         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.'884$this->source); })()), "id", [], "any"falsefalsefalse884)]), "html"nulltrue);
  1367.         echo "\" method=\"post\" id=\"form1\" name=\"form1\">
  1368.                         ";
  1369.         // line 885
  1370.         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.'885$this->source); })()), "stock_find", [], "any"falsefalsefalse885)) {
  1371.             // line 886
  1372.             echo "                            <div class=\"ec-productRole__actions\">
  1373.                                 ";
  1374.             // line 887
  1375.             if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id1", [], "any"truetruefalse887)) {
  1376.                 // line 888
  1377.                 echo "                                    <div class=\"ec-select\">
  1378.                                         ";
  1379.                 // line 889
  1380.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'889$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse889), 'row', ["label" => false]);
  1381.                 echo "
  1382.                                         ";
  1383.                 // line 890
  1384.                 echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'890$this->source); })()), "classcategory_id1", [], "any"falsefalsefalse890), 'errors');
  1385.                 echo "
  1386.                                     </div>
  1387.                                     ";
  1388.                 // line 892
  1389.                 if (twig_get_attribute($this->env$this->source, ($context["form"] ?? null), "classcategory_id2", [], "any"truetruefalse892)) {
  1390.                     // line 893
  1391.                     echo "                                        <div class=\"ec-select\">
  1392.                                             ";
  1393.                     // line 894
  1394.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'894$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse894), 'row', ["label" => false]);
  1395.                     echo "
  1396.                                             ";
  1397.                     // line 895
  1398.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'895$this->source); })()), "classcategory_id2", [], "any"falsefalsefalse895), 'errors');
  1399.                     echo "
  1400.                                         </div>
  1401.                                     ";
  1402.                 }
  1403.                 // line 898
  1404.                 echo "                                ";
  1405.             }
  1406.             // line 899
  1407.             echo "
  1408.                                 ";
  1409.             // line 900
  1410.             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.'900$this->source); })()), "product_print_type", [], "any"falsefalsefalse900) == false)) {
  1411.                 // line 901
  1412.                 echo "                                    ";
  1413.                 $context["colors"] = twig_split_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.'901$this->source); })()), "product_print_color", [], "any"falsefalsefalse901), ",");
  1414.                 // line 902
  1415.                 echo "                                    ";
  1416.                 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.'902$this->source); })()), "product_print_type", [], "any"falsefalsefalse902) == false) && (twig_length_filter($this->env, (isset($context["colors"]) || array_key_exists("colors"$context) ? $context["colors"] : (function () { throw new RuntimeError('Variable "colors" does not exist.'902$this->source); })())) > 0))) {
  1417.                     // line 903
  1418.                     echo "                                        <div class=\"row mb-2\">
  1419.                                             <div class=\"col-4\">
  1420.                                                 <div class=\"ec-select\">
  1421.                                                     ";
  1422.                     // line 906
  1423.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'906$this->source); })()), "is_print", [], "any"falsefalsefalse906), 'widget', ["attr" => ["style" => "min-width:unset""id" => "is_print"]]);
  1424.                     echo "
  1425.                                                     ";
  1426.                     // line 907
  1427.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'907$this->source); })()), "is_print", [], "any"falsefalsefalse907), 'errors');
  1428.                     echo "
  1429.                                                 </div>
  1430.                                             </div>
  1431.                                             <div class=\"col-6 form-is_repurchase\" style=\"display: none\">
  1432.                                                 <div class=\"form-check mt-2\">
  1433.                                                     ";
  1434.                     // line 912
  1435.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'912$this->source); })()), "is_repurchase", [], "any"falsefalsefalse912), 'widget', ["label_attr" => ["class" => "radio-inline"]]);
  1436.                     echo "
  1437.                                                     ";
  1438.                     // line 913
  1439.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'913$this->source); })()), "is_repurchase", [], "any"falsefalsefalse913), 'errors');
  1440.                     echo "
  1441.                                                 </div>
  1442.                                             </div>
  1443.                                         </div>
  1444.                                         <div class=\"row form-product-color\" style=\"display: none\">
  1445.                                             <div class=\"col-5\">
  1446.                                                 <div class=\"ec-select\">
  1447.                                                     <div class=\"mb-3\">
  1448.                                                         ";
  1449.                     // line 921
  1450.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'921$this->source); })()), "product_print_color", [], "any"falsefalsefalse921), 'widget', ["attr" => ["style" => "min-width:unset"]]);
  1451.                     echo "
  1452.                                                         ";
  1453.                     // line 922
  1454.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'922$this->source); })()), "product_print_color", [], "any"falsefalsefalse922), 'errors');
  1455.                     echo "
  1456.                                                     </div>
  1457.                                                 </div>
  1458.                                             </div>
  1459.                                         </div>
  1460.                                     ";
  1461.                 }
  1462.                 // line 928
  1463.                 echo "                                ";
  1464.             }
  1465.             // line 929
  1466.             echo "
  1467.                                 <div class=\"row\">
  1468.                                     <div class=\"col-3\">
  1469.                                         <div class=\"";
  1470.             // line 932
  1471.             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.'932$this->source); })()), "order_unit", [], "any"falsefalsefalse932)) {
  1472.                 echo "ec-select";
  1473.             } else {
  1474.                 echo "ec-numberInput";
  1475.             }
  1476.             echo " mt-2 group-input-qty\">
  1477.                                             ";
  1478.             // line 933
  1479.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'933$this->source); })()), "quantity", [], "any"falsefalsefalse933), 'widget', ["attr" => ["style" => "min-width:unset;display: none;""placeholder" => "数量"]]);
  1480.             echo "
  1481. ";
  1482.             // line 935
  1483.             echo "                                            ";
  1484.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'935$this->source); })()), "quantity", [], "any"falsefalsefalse935), 'errors');
  1485.             echo "
  1486.                                         </div>
  1487.                                     </div>
  1488.                                     <div class=\"col-8\">
  1489.                                         <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  1490.                                             ";
  1491.             // line 941
  1492.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに入れる"), "html"nulltrue);
  1493.             echo "
  1494.                                         </button>
  1495.                                     </div>
  1496.                                 </div>
  1497.                             </div>
  1498.                         ";
  1499.         } else {
  1500.             // line 947
  1501.             echo "                            <div class=\"ec-productRole__btn\">
  1502.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  1503.                                     ";
  1504.             // line 949
  1505.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ただいま品切れ中です。"), "html"nulltrue);
  1506.             echo "
  1507.                                 </button>
  1508.                             </div>
  1509.                         ";
  1510.         }
  1511.         // line 953
  1512.         echo "
  1513.                         ";
  1514.         // line 954
  1515.         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'954$this->source); })()), 'rest');
  1516.         echo "
  1517.                     </form>
  1518.                     <div class=\"ec-modal\">
  1519.                         <div class=\"ec-modal-overlay\">
  1520.                             <div class=\"ec-modal-wrap\">
  1521.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"";
  1522.         // line 959
  1523.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/icon/cross-dark.svg"), "html"nulltrue);
  1524.         echo "\" alt=\"\"/></span></span>
  1525.                                 <div id=\"ec-modal-header\" class=\"text-center\">";
  1526.         // line 960
  1527.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートに追加しました。"), "html"nulltrue);
  1528.         echo "</div>
  1529.                                 <div class=\"ec-modal-box\">
  1530.                                     <div class=\"ec-role\">
  1531.                                         <span class=\"ec-inlineBtn--cancel\">";
  1532.         // line 963
  1533.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お買い物を続ける"), "html"nulltrue);
  1534.         echo "</span>
  1535.                                         <a href=\"";
  1536.         // line 964
  1537.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  1538.         echo "\" class=\"ec-inlineBtn--action\">";
  1539.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カートへ進む"), "html"nulltrue);
  1540.         echo "</a>
  1541.                                     </div>
  1542.                                 </div>
  1543.                             </div>
  1544.                         </div>
  1545.                     </div>
  1546.                     <div class=\"ec-productRole__SNS\">
  1547.                         <a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-via=\"lemanze\" data-lang=\"ja\" data-count=\"none\">ツイート</a>
  1548.                         <script>
  1549.                             !function(d,s,id){
  1550.                                 var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
  1551.                                 if(!d.getElementById(id)){
  1552.                                     js=d.createElement(s);
  1553.                                     js.id=id;
  1554.                                     js.src=p+'://platform.twitter.com/widgets.js';
  1555.                                     fjs.parentNode.insertBefore(js,fjs);
  1556.                                 }
  1557.                             }(document, 'script', 'twitter-wjs');
  1558.                         </script>
  1559.                         <div class=\"line-it-button\" data-lang=\"ja\" data-type=\"share-a\" data-env=\"REAL\" data-url=\"";
  1560.         // line 985
  1561.         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.'985$this->source); })()), "id", [], "any"falsefalsefalse985)]), "html"nulltrue);
  1562.         echo "\" data-color=\"default\" data-size=\"small\" data-count=\"true\" data-ver=\"3\" style=\"display: none;\"></div>
  1563.                         <script src=\"https://www.line-website.com/social-plugins/js/thirdparty/loader.min.js\" async=\"async\" defer=\"defer\"></script>
  1564.                     </div>
  1565.                     ";
  1566.         // line 989
  1567.         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.'989$this->source); })()), "option_favorite_product", [], "any"falsefalsefalse989)) {
  1568.             // line 990
  1569.             echo "                        <form action=\"";
  1570.             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.'990$this->source); })()), "id", [], "any"falsefalsefalse990)]), "html"nulltrue);
  1571.             echo "\" method=\"post\">
  1572.                             <div class=\"ec-productRole__btn\">
  1573.                                 ";
  1574.             // line 992
  1575.             if (((isset($context["is_favorite"]) || array_key_exists("is_favorite"$context) ? $context["is_favorite"] : (function () { throw new RuntimeError('Variable "is_favorite" does not exist.'992$this->source); })()) == false)) {
  1576.                 // line 993
  1577.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  1578.                                         ";
  1579.                 // line 994
  1580.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加"), "html"nulltrue);
  1581.                 echo "
  1582.                                     </button>
  1583.                                 ";
  1584.             } else {
  1585.                 // line 997
  1586.                 echo "                                    <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  1587.                                             disabled=\"disabled\">";
  1588.                 // line 998
  1589.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りに追加済です。"), "html"nulltrue);
  1590.                 echo "
  1591.                                     </button>
  1592.                                 ";
  1593.             }
  1594.             // line 1001
  1595.             echo "                            </div>
  1596.                         </form>
  1597.                     ";
  1598.         }
  1599.         // line 1004
  1600.         echo "                    ";
  1601.         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.'1004$this->source); })()), "freearea", [], "any"falsefalsefalse1004)) {
  1602.             // line 1005
  1603.             echo "                         <div class=\"ec-productRole__description\">
  1604.                              ";
  1605.             // line 1006
  1606.             echo twig_include($this->env$contexttwig_template_from_string($this->envtwig_nl2br(twig_get_attribute($this->env$this->source, (isset($context["Product"]) || array_key_exists("Product"$context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.'1006$this->source); })()), "freearea", [], "any"falsefalsefalse1006))));
  1607.             echo "
  1608.                         </div>
  1609.                     ";
  1610.         }
  1611.         // line 1009
  1612.         echo "                </div>
  1613.             </div>
  1614.         </div>
  1615.     </div>
  1616. ";
  1617.         
  1618.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1619.         
  1620.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1621.     }
  1622.     public function getTemplateName()
  1623.     {
  1624.         return "Product/detail.twig";
  1625.     }
  1626.     public function isTraitable()
  1627.     {
  1628.         return false;
  1629.     }
  1630.     public function getDebugInfo()
  1631.     {
  1632.         return array (  1718 => 1009,  1712 => 1006,  1709 => 1005,  1706 => 1004,  1701 => 1001,  1695 => 998,  1692 => 997,  1686 => 994,  1683 => 993,  1681 => 992,  1675 => 990,  1673 => 989,  1666 => 985,  1640 => 964,  1636 => 963,  1630 => 960,  1626 => 959,  1618 => 954,  1615 => 953,  1608 => 949,  1604 => 947,  1595 => 941,  1585 => 935,  1581 => 933,  1573 => 932,  1568 => 929,  1565 => 928,  1556 => 922,  1552 => 921,  1541 => 913,  1537 => 912,  1529 => 907,  1525 => 906,  1520 => 903,  1517 => 902,  1514 => 901,  1512 => 900,  1509 => 899,  1506 => 898,  1500 => 895,  1496 => 894,  1493 => 893,  1491 => 892,  1486 => 890,  1482 => 889,  1479 => 888,  1477 => 887,  1474 => 886,  1472 => 885,  1468 => 884,  1462 => 881,  1459 => 880,  1453 => 876,  1450 => 875,  1444 => 872,  1441 => 871,  1438 => 870,  1426 => 867,  1423 => 866,  1420 => 865,  1417 => 863,  1411 => 860,  1407 => 859,  1403 => 858,  1399 => 857,  1396 => 856,  1393 => 855,  1387 => 852,  1381 => 851,  1376 => 849,  1370 => 848,  1367 => 847,  1361 => 844,  1357 => 843,  1352 => 841,  1348 => 840,  1345 => 839,  1343 => 838,  1341 => 837,  1338 => 836,  1336 => 835,  1334 => 819,  1331 => 817,  1320 => 815,  1316 => 814,  1313 => 813,  1308 => 810,  1305 => 809,  1300 => 805,  1285 => 793,  1281 => 791,  1279 => 790,  1276 => 789,  1269 => 787,  1266 => 786,  1263 => 785,  1259 => 784,  1257 => 783,  1255 => 782,  1251 => 780,  1232 => 778,  1215 => 777,  1211 => 775,  1200 => 773,  1178 => 771,  1160 => 770,  1154 => 766,  1150 => 764,  1142 => 761,  1127 => 759,  1118 => 758,  1101 => 757,  1097 => 755,  1093 => 754,  1089 => 753,  1086 => 752,  1083 => 751,  1077 => 746,  1067 => 745,  1055 => 741,  918 => 607,  912 => 606,  904 => 604,  895 => 602,  888 => 601,  885 => 600,  882 => 599,  879 => 598,  876 => 597,  872 => 596,  727 => 453,  725 => 452,  722 => 451,  715 => 449,  712 => 448,  709 => 447,  705 => 446,  703 => 445,  696 => 440,  692 => 439,  688 => 438,  684 => 437,  680 => 435,  674 => 433,  672 => 432,  667 => 431,  664 => 430,  654 => 428,  640 => 426,  632 => 425,  614 => 424,  609 => 422,  588 => 403,  585 => 402,  581 => 400,  579 => 399,  576 => 398,  574 => 397,  564 => 389,  561 => 388,  557 => 386,  555 => 385,  552 => 384,  550 => 383,  543 => 379,  515 => 356,  502 => 348,  485 => 334,  475 => 327,  444 => 299,  439 => 297,  426 => 287,  418 => 281,  409 => 275,  405 => 273,  403 => 272,  400 => 271,  391 => 265,  387 => 263,  385 => 262,  376 => 258,  369 => 253,  365 => 251,  356 => 244,  354 => 243,  351 => 242,  334 => 227,  325 => 220,  323 => 219,  253 => 151,  246 => 149,  241 => 146,  239 => 145,  234 => 143,  231 => 142,  229 => 141,  206 => 121,  201 => 119,  198 => 118,  188 => 117,  88 => 16,  78 => 15,  67 => 11,  60 => 113,  58 => 112,  54 => 111,  52 => 110,  50 => 13,  37 => 11,);
  1633.     }
  1634.     public function getSourceContext()
  1635.     {
  1636.         return new Source("{#
  1637. This file is part of EC-CUBE
  1638. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  1639. http://www.ec-cube.co.jp/
  1640. For the full copyright and license information, please view the LICENSE
  1641. file that was distributed with this source code.
  1642. #}
  1643. {% extends 'default_frame.twig' %}
  1644. {% set body_class = 'product_page' %}
  1645. {% block stylesheet %}
  1646.     <style>
  1647.         .hidden{
  1648.             display: none;
  1649.         }
  1650.         .slick-slider {
  1651.             margin-bottom: 30px;
  1652.         }
  1653.         .slick-dots {
  1654.             position: absolute;
  1655.             bottom: -45px;
  1656.             display: block;
  1657.             width: 100%;
  1658.             padding: 0;
  1659.             list-style: none;
  1660.             text-align: center;
  1661.         }
  1662.         .slick-dots li {
  1663.             position: relative;
  1664.             display: inline-block;
  1665.             width: 20px;
  1666.             height: 20px;
  1667.             margin: 0 5px;
  1668.             padding: 0;
  1669.             cursor: pointer;
  1670.         }
  1671.         .slick-dots li button {
  1672.             font-size: 0;
  1673.             line-height: 0;
  1674.             display: block;
  1675.             width: 20px;
  1676.             height: 20px;
  1677.             padding: 5px;
  1678.             cursor: pointer;
  1679.             color: transparent;
  1680.             border: 0;
  1681.             outline: none;
  1682.             background: transparent;
  1683.         }
  1684.         .slick-dots li button:hover,
  1685.         .slick-dots li button:focus {
  1686.             outline: none;
  1687.         }
  1688.         .slick-dots li button:hover:before,
  1689.         .slick-dots li button:focus:before {
  1690.             opacity: 1;
  1691.         }
  1692.         .slick-dots li button:before {
  1693.             content: \" \";
  1694.             line-height: 20px;
  1695.             position: absolute;
  1696.             top: 0;
  1697.             left: 0;
  1698.             width: 12px;
  1699.             height: 12px;
  1700.             text-align: center;
  1701.             opacity: .25;
  1702.             background-color: black;
  1703.             border-radius: 50%;
  1704.         }
  1705.         .slick-dots li.slick-active button:before {
  1706.             opacity: .75;
  1707.             background-color: black;
  1708.         }
  1709.         .slick-dots li button.thumbnail img {
  1710.             width: 0;
  1711.             height: 0;
  1712.         }
  1713.         .price_no_tax{
  1714.             color: black;
  1715.         }
  1716.         .price_no_tax_first{
  1717.             margin-left: 30px;
  1718.         }
  1719.         .product_plate_type_print img{
  1720.             width: unset;
  1721.         }
  1722.         .ec-productRole .ec-productRole__category{
  1723.             border-bottom: unset;
  1724.         }
  1725.     </style>
  1726. {% endblock %}
  1727. {# --- この商品がカテゴリID=124か判定 --- #}
  1728.     {% set is_calendar = false %}
  1729.     {% for pc in Product.ProductCategories %}
  1730.         {% if pc.Category.id == 124 %}
  1731.             {% set is_calendar = true %}
  1732.         {% endif %}
  1733.     {% endfor %}
  1734. {% block javascript %}
  1735.     <script>
  1736.         var stocks = {{stocks|json_encode|raw}};
  1737.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  1738.         // 規格2に選択肢を割り当てる。
  1739.         function fnSetClassCategories(form, classcat_id2_selected) {
  1740.             var \$form = \$(form);
  1741.             var product_id = \$form.find('input[name=product_id]').val();
  1742.             var \$sele1 = \$form.find('select[name=classcategory_id1]');
  1743.             var \$sele2 = \$form.find('select[name=classcategory_id2]');
  1744.             eccube.setClassCategories(\$form, product_id, \$sele1, \$sele2, classcat_id2_selected);
  1745.         }
  1746.         var code = jQuery('.product-code-default').text();
  1747.         if (Number(stocks[code]) < 0){
  1748.             jQuery('.product-stock-quantity-default').html('<b>あり</b>');
  1749.         }
  1750.         if (stocks[code] != undefined && stocks[code] > 0){
  1751.             jQuery('.product-stock-quantity-default').html(stocks[code]);
  1752.         }else if (stocks[code] != undefined && stocks[code] == 0){
  1753.             jQuery('.product-stock-quantity-default').html('<b>なし</b>');
  1754.         }
  1755.         {% if form.classcategory_id2 is defined %}
  1756.             fnSetClassCategories(
  1757.                 \$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  1758.             );
  1759.         {% elseif form.classcategory_id1 is defined %}
  1760.             \$('input[name=\"classcategory_option\"]').on('change', function(e) {
  1761.                 \$('#classcategory_id1').val(\$(e.target).val()).change();
  1762.             })
  1763.             eccube.checkStock(\$('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  1764.         {% endif %}
  1765.     </script>
  1766.     <script>
  1767.         \$(function() {
  1768.             // bfcache無効化
  1769.             \$(window).bind('pageshow', function(event) {
  1770.                 if (event.originalEvent.persisted) {
  1771.                     location.reload(true);
  1772.                 }
  1773.             });
  1774.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  1775.             // img タグに width, height が付与されている.
  1776.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  1777.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  1778.             \$('.ec-grid2__cell').hide();
  1779.             var removeSize = function () {
  1780.                 \$('.slide-item').height('');
  1781.                 \$('.slide-item img')
  1782.                     .removeAttr('width')
  1783.                     .removeAttr('height')
  1784.                     .removeAttr('style');
  1785.             };
  1786.             var slickInitial = function(slick) {
  1787.                 \$('.ec-grid2__cell').fadeIn(1500);
  1788.                 var baseHeight = \$(slick.target).height();
  1789.                 var baseWidth = \$(slick.target).width();
  1790.                 var rate = baseWidth / baseHeight;
  1791.                 \$('.slide-item').height(baseHeight * rate); // 余白を削除する
  1792.                 // transform を使用することでCLSの影響を受けないようにする
  1793.                 \$('.slide-item img')
  1794.                     .css(
  1795.                         {
  1796.                             'transform-origin': 'top left',
  1797.                             'transform': 'scaleY(' + rate + ')',
  1798.                             'transition': 'transform .1s'
  1799.                         }
  1800.                     );
  1801.                 // 正しいサイズに近くなったら属性を解除する
  1802.                 setTimeout(removeSize, 500);
  1803.             };
  1804.             \$('.item_visual').on('init', slickInitial);
  1805.             // リサイズ時は CLS の影響を受けないため属性を解除する
  1806.             \$(window).resize(removeSize);
  1807.             \$('.item_visual').slick({
  1808.                 dots: false,
  1809.                 arrows: false,
  1810.                 responsive: [{
  1811.                     breakpoint: 768,
  1812.                     settings: {
  1813.                         dots: true
  1814.                     }
  1815.                 }]
  1816.             });
  1817.             \$('.slideThumb').on('click', function() {
  1818.                 var index = \$(this).attr('data-index');
  1819.                 \$('.item_visual').slick('slickGoTo', index, false);
  1820.             })
  1821.         });
  1822.     </script>
  1823.     <script>
  1824.         \$(function() {
  1825.             function htmlQty(type, printerUnit, orderUnit) {
  1826.                 var html = ``;
  1827.                 if(type === 1) {
  1828.                     {% if Product.printer_unit %}
  1829.                         html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
  1830.                             html += `<option value=\"\" selected=\"selected\">数量</option>`;
  1831.                             for(let i = 1; i < 31; i++) {
  1832.                                 html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
  1833.                             }
  1834.                         html += `</select>`;
  1835.                     {% else %}
  1836.                         if(orderUnit > 0) {
  1837.                             if(printerUnit === 0) {
  1838.                                 printerUnit = orderUnit;
  1839.                             }
  1840.                             html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
  1841.                                 html += `<option value=\"\" selected=\"selected\">数量</option>`;
  1842.                                 for(let i = 1; i < 31; i++) {
  1843.                                     html += `<option value=\"\${ i*printerUnit }\">\${ i*printerUnit }</option>`;
  1844.                                 }
  1845.                             html += `</select>`;
  1846.                         } else {
  1847.                             html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
  1848.                         }
  1849.                     {% endif %}
  1850.                 } else {
  1851.                     {% if Product.order_unit %}
  1852.                         html += `<select id=\"quantity\" name=\"quantity\" style=\"min-width:unset;\" placeholder=\"数量\" class=\"form-select\">`;
  1853.                             html += `<option value=\"\" selected=\"selected\">数量</option>`;
  1854.                             for(let i = 1; i < 31; i++) {
  1855.                                 html += `<option value=\"\${ i*orderUnit }\">\${ i*orderUnit }</option>`;
  1856.                             }
  1857.                         html += `</select>`;
  1858.                     {% else %}
  1859.                         html += `<input type=\"number\" id=\"quantity\" name=\"quantity\" required=\"required\" min=\"1\" maxlength=\"9\" style=\"min-width:unset; display: block !important;\" placeholder=\"数量\" class=\"form-control\" value=\"1\">`;
  1860.                     {% endif %}
  1861.                 }
  1862.                 return html;
  1863.             }
  1864.             \$(\".group-input-qty\").html('');
  1865.             \$(\".group-input-qty\").append(htmlQty(0, {{ Product.printer_unit | default(0) }}, {{ Product.order_unit | default(0) }}));
  1866.             \$('.add-cart').on('click', function(event) {
  1867.                 {% if form.classcategory_id1 is defined %}
  1868.                 // 規格1フォームの必須チェック
  1869.                 if (\$('#classcategory_id1').val() == '__unselected' || \$('#classcategory_id1').val() == '') {
  1870.                     \$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1871.                     return true;
  1872.                 } else {
  1873.                     \$('#classcategory_id1')[0].setCustomValidity('');
  1874.                 }
  1875.                 {% endif %}
  1876.                 {% if form.classcategory_id2 is defined %}
  1877.                 // 規格2フォームの必須チェック
  1878.                 if (\$('#classcategory_id2').val() == '__unselected' || \$('#classcategory_id2').val() == '') {
  1879.                     \$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  1880.                     return true;
  1881.                 } else {
  1882.                     \$('#classcategory_id2')[0].setCustomValidity('');
  1883.                 }
  1884.                 {% endif %}
  1885.                 // 個数フォームのチェック
  1886.                 var isPrint = false;
  1887.                 if (\$('#is_print').val() == 1) {
  1888.                     isPrint = true;
  1889.                     if (!\$('#product_print_color').val()) {
  1890.                         \$('#product_print_color')[0].setCustomValidity('{{ 'ネームプリントの色を選択してください。'|trans }}');
  1891.                         return true;
  1892.                     } else {
  1893.                         \$('#product_print_color')[0].setCustomValidity('');
  1894.                     }
  1895.                 }
  1896.                 // 個数フォームのチェック
  1897.                     if (!\$('#quantity').val()) {
  1898.                         if (\$('#quantity').prop('nodeName') == 'SELECT') {
  1899.                             \$('#quantity')[0].setCustomValidity('{{ '数量を選択してください。'|trans }}');
  1900.                         } else {
  1901.                             \$('#quantity')[0].setCustomValidity('{{ '数量を入力してください。'|trans }}');
  1902.                         }
  1903.                         return true;
  1904.                     } else {
  1905.                         \$('#quantity')[0].setCustomValidity('');
  1906.                     }
  1907.                 event.preventDefault();
  1908.                 \$form = \$('#form1');
  1909.                 \$.ajax({
  1910.                     url: \$form.attr('action'),
  1911.                     type: \$form.attr('method'),
  1912.                     data: \$form.serialize(),
  1913.                     dataType: 'json',
  1914.                     beforeSend: function(xhr, settings) {
  1915.                         // Buttonを無効にする
  1916.                         \$('.add-cart').prop('disabled', true);
  1917.                     }
  1918.                 }).done(function(data) {
  1919.                     // レスポンス内のメッセージをalertで表示
  1920.                     \$.each(data.messages, function() {
  1921.                         \$('#ec-modal-header').html(this);
  1922.                     });
  1923.                     \$('.ec-modal').show()
  1924.                     // カートブロックを更新する
  1925.                     \$.ajax({
  1926.                         url: \"{{ url('block_cart') }}\",
  1927.                         type: 'GET',
  1928.                         dataType: 'html'
  1929.                     }).done(function(html) {
  1930.                         \$('.ec-headerRole__cart').html(html);
  1931.                     });
  1932.                 }).fail(function(data) {
  1933.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  1934.                 }).always(function(data) {
  1935.                     // Buttonを有効にする
  1936.                     \$('.add-cart').prop('disabled', false);
  1937.                 });
  1938.             });
  1939.             \$(\"#is_print\").change(function(){
  1940.                 \$(\".group-input-qty\").html('');
  1941.                 if (\$(this).val() == 1) {
  1942.                     \$('.form-is_repurchase').css('display', 'block');
  1943.                     \$('.form-is_repurchase input:first').prop('checked', true);
  1944.                     \$('.form-product-color').css('display', 'block');
  1945.                     \$(\".group-input-qty\").append(htmlQty(1, {{ Product.printer_unit | default(0) }}, {{ Product.order_unit | default(0) }}));
  1946.                     // \$(\"#quantity\").attr('name', 'quantity').css('display', 'inline-block');
  1947.                     // \$(\"#quantity_raw\").attr('name', 'quantity_raw').css('display', 'none');
  1948.                 } else {
  1949.                     \$('.form-is_repurchase').css('display', 'none');
  1950.                     \$('.form-is_repurchase input').prop('checked', false);
  1951.                     \$('.form-product-color').css('display', 'none');
  1952.                     \$('.form-product-color select').val('');
  1953.                     \$(\".group-input-qty\").append(htmlQty(0, {{ Product.printer_unit | default(0) }}, {{ Product.order_unit | default(0) }}));
  1954.                     // \$(\"#quantity\").attr('name', 'quantity_raw').css('display', 'none');
  1955.                     // \$(\"#quantity_raw\").attr('name', 'quantity').css('display', 'inline-block');
  1956.                 }
  1957.             });
  1958.         });
  1959.         \$('.ec-modal-wrap').on('click', function(e) {
  1960.             // モーダル内の処理は外側にバブリングさせない
  1961.             e.stopPropagation();
  1962.         });
  1963.         \$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  1964.             \$('.ec-modal').hide()
  1965.         });
  1966.         var nIndexClass = 1;
  1967.         \$(\"#classcategory_id1 > option\").each(function(k, v) {
  1968.             if(this.value != \"__unselected\") {
  1969.                 \$(v).attr('key', nIndexClass);
  1970.                 nIndexClass++;
  1971.             }
  1972.         });
  1973.         var jsonQty = {{ Product.getAllStocks|json_encode|raw }}
  1974.         var select_classcategory_id1 = 0;
  1975.         \$('#classcategory_id1').on('change', function(e) {
  1976.             if(this.selectedIndex < 1) return false;
  1977.             {% if form.classcategory_id1 is defined %}
  1978.                 getClass(this.selectedIndex)
  1979.                 {% if form.classcategory_id2 is defined %}
  1980.                     select_classcategory_id1 = this.selectedIndex;
  1981.                 {% endif %}
  1982.             {% endif %}
  1983.         });
  1984.         \$('#classcategory_id2').on('change', function(e) {
  1985.             if(this.selectedIndex < 1) return false;
  1986.             getClass(select_classcategory_id1, this.selectedIndex)
  1987.         });
  1988.         function getClass(class1, class2) {
  1989.             var qty = '';
  1990.             {% if form.classcategory_id1 is defined %}
  1991.                qty = jsonQty[class1];
  1992.                 {% if form.classcategory_id2 is defined %}
  1993.                     qty = jsonQty[class1][class2];
  1994.                 {% endif %}
  1995.             {% endif %}
  1996.             if(qty == \"0\") {
  1997.                 \$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>なし</b>\");
  1998.             } else if(!!qty === false){
  1999.                 \$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>あり</b>\");
  2000.             }else {
  2001.                 qty = parseInt(qty);
  2002.                 \$('.ec-productRole__code span.product-stock-quantity-default').html(\"<b>\"+qty+\"</b>\");
  2003.             }
  2004.         }
  2005.         // \$('#is_print').change(function() {
  2006.         //     window.location.href = window.location.href+'?is_print='+\$(this).val();
  2007.         // });
  2008.     </script>
  2009.     <script type=\"application/ld+json\">
  2010.     {
  2011.         \"@context\": \"https://schema.org/\",
  2012.         \"@type\": \"Product\",
  2013.         \"name\": \"{{ Product.name }}\",
  2014.         \"image\": [
  2015.             {% for img in Product.ProductImage %}
  2016.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}\"{% if not loop.last %},{% endif %}
  2017.             {% else %}
  2018.                 \"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}\"
  2019.             {% endfor %}
  2020.         ],
  2021.         \"description\": \"{{ Product.description_list | default(Product.description_detail) | replace({'\\n': '', '\\r': ''}) | slice(0,300) }}\",
  2022.         {% if Product.code_min %}
  2023.         \"sku\": \"{{ Product.code_min }}\",
  2024.         {% endif %}
  2025.         \"offers\": {
  2026.             \"@type\": \"Offer\",
  2027.             \"url\": \"{{ url('product_detail', {'id': Product.id}) }}\",
  2028.             \"priceCurrency\": \"{{ eccube_config.currency }}\",
  2029.             \"price\": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  2030.             \"availability\": \"{{ Product.stock_find ? \"InStock\" : \"OutOfStock\" }}\"
  2031.         }
  2032.     }
  2033.     </script>
  2034.     {# --- この商品がカテゴリID=124か判定 --- #}
  2035. {% set is_calendar = false %}
  2036. {% for pc in Product.ProductCategories %}
  2037.   {% if pc.Category.id == 124 %}
  2038.     {% set is_calendar = true %}
  2039.   {% endif %}
  2040. {% endfor %}
  2041. {% if is_calendar %}
  2042. <script>
  2043. document.addEventListener('DOMContentLoaded', function () {
  2044.   // 規格1(数量パターン)
  2045.   const select1 = document.getElementById('classcategory_id1')
  2046.               || document.querySelector('select[name=\"classcategory_id1\"]');
  2047.   if (!select1) return;
  2048.   // 規格2(優先: #is_print、なければ classcategory_id2)
  2049.   const isPrint = document.getElementById('is_print'); // 0=しない, 1=する
  2050.   const select2 = isPrint || document.getElementById('classcategory_id2')
  2051.                || document.querySelector('select[name=\"classcategory_id2\"]');
  2052.   // 再版区分(表示/非表示を切り替え)
  2053.   const repurchaseBlock = document.querySelector('.form-is_repurchase');
  2054.   // ネームプリント切替連動(カレンダー)
  2055. const PRINT_ON_VALUES   = new Set(['291', '292']);  // ネームプリントあり
  2056. const PRINT_OFF_VALUES  = new Set(['289', '290']);  // ネームプリントなし
  2057. const PRINT_BOTH_VALUES = new Set(['288']);         // 両方選択可
  2058.   // classcategory_id2 用に元<option>保存(#is_printが無い場合に使う)
  2059.   let original2 = null;
  2060.   if (select2 && select2 !== isPrint) {
  2061.     original2 = Array.from(select2.options).map(o => ({ value: o.value, text: (o.text||'').trim() }));
  2062.   }
  2063.   function applyRepurchaseVisibility() {
  2064.     if (!repurchaseBlock) return;
  2065.     if (isPrint) {
  2066.       repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
  2067.     }
  2068.   }
  2069.   function setIsPrintMode(mode) {
  2070.     // #is_print がある(今回の構成)場合
  2071.     if (isPrint) {
  2072.       isPrint.innerHTML = '';
  2073.       if (mode === 'do') {
  2074.         isPrint.add(new Option('ネームプリントする', '1'));
  2075.         isPrint.value = '1';
  2076.       } else if (mode === 'dont') {
  2077.         isPrint.add(new Option('ネームプリントしない', '0'));
  2078.         isPrint.value = '0';
  2079.       } else if (mode === 'both') {
  2080.         // ★ 両方出す
  2081.         isPrint.add(new Option('ネームプリントしない', '0'));
  2082.         isPrint.add(new Option('ネームプリントする', '1'));
  2083.         // 初期は「しない」に寄せる(必要なら '1' に変更可)
  2084.         isPrint.value = '0';
  2085.       }
  2086.       // 他のハンドラより後に発火させる
  2087.       setTimeout(() => {
  2088.         isPrint.dispatchEvent(new Event('change', { bubbles: true }));
  2089.         applyRepurchaseVisibility();
  2090.       }, 0);
  2091.       return;
  2092.     }
  2093.     // #is_print が無く、classcategory_id2 を使っている場合(参考)
  2094.     if (select2 && original2) {
  2095.       let list = [];
  2096.       if (mode === 'do')      list = original2.filter(o => o.text.includes('する'));
  2097.       else if (mode === 'dont') list = original2.filter(o => o.text.includes('しない'));
  2098.       else /* both */         list = original2.slice();
  2099.       select2.innerHTML = '';
  2100.       list.forEach(o => select2.add(new Option(o.text, o.value)));
  2101.       select2.selectedIndex = list.length ? 0 : -1;
  2102.       setTimeout(() => {
  2103.         select2.dispatchEvent(new Event('change', { bubbles: true }));
  2104.       }, 0);
  2105.       if (repurchaseBlock) {
  2106.         repurchaseBlock.style.display = (mode === 'do') ? '' : 'none';
  2107.       }
  2108.     }
  2109.   }
  2110.   function onFirstChanged() {
  2111.     const v1 = select1.value;
  2112.     if (!v1 || v1 === '__unselected') {
  2113.       if (repurchaseBlock) repurchaseBlock.style.display = 'none';
  2114.       return;
  2115.     }
  2116.     if (PRINT_BOTH_VALUES.has(v1)) {
  2117.       setIsPrintMode('both');  // ★ 100冊以上~ は両方
  2118.     } else if (PRINT_ON_VALUES.has(v1)) {
  2119.       setIsPrintMode('do');
  2120.     } else if (PRINT_OFF_VALUES.has(v1)) {
  2121.       setIsPrintMode('dont');
  2122.     } else {
  2123.       setIsPrintMode('dont');
  2124.     }
  2125.   }
  2126.   if (isPrint) {
  2127.     isPrint.addEventListener('change', applyRepurchaseVisibility);
  2128.   }
  2129. function updateIsPrintOptions(mode) {
  2130.   const isPrint = document.getElementById('is_print');
  2131.   const repurchaseBlock = document.querySelector('.form-is_repurchase');
  2132.   if (!isPrint) return;
  2133.   // 一旦 option 全削除
  2134.   isPrint.innerHTML = '';
  2135.   if (mode === 'do') {
  2136.     isPrint.add(new Option('ネームプリントする', '1'));
  2137.     isPrint.value = '1';
  2138.   } else if (mode === 'dont') {
  2139.     isPrint.add(new Option('ネームプリントしない', '0'));
  2140.     isPrint.value = '0';
  2141.   } else {
  2142.     isPrint.add(new Option('ネームプリントしない', '0'));
  2143.     isPrint.add(new Option('ネームプリントする', '1'));
  2144.     isPrint.value = '0';
  2145.   }
  2146.   // ネームプリント「する」なら再版選択を表示
  2147.   if (repurchaseBlock) {
  2148.     repurchaseBlock.style.display = (isPrint.value === '1') ? '' : 'none';
  2149.   }
  2150.   // イベント発火で数量 UI 切り替えなど反映
  2151.   isPrint.dispatchEvent(new Event('change', { bubbles: true }));
  2152. }
  2153.   select1.addEventListener('change', onFirstChanged);
  2154.   onFirstChanged(); // 初期反映
  2155. });
  2156. </script>
  2157. <script>
  2158. document.addEventListener('DOMContentLoaded', function () {
  2159.   const el1 = document.getElementById('classcategory_id1') || document.querySelector('select[name=\"classcategory_id1\"]');
  2160.   const el2 = document.getElementById('classcategory_id2') || document.querySelector('select[name=\"classcategory_id2\"]');
  2161.   const out = document.getElementById('delivery-duration-text');
  2162.   // 発送目安マップ
  2163.   const deliveryMap = {};
  2164.   {% for pc in Product.ProductClasses %}
  2165.     {% set c1 = pc.ClassCategory1 ? pc.ClassCategory1.id : '' %}
  2166.     {% set c2 = pc.ClassCategory2 ? pc.ClassCategory2.id : '' %}
  2167.     {% set label = pc.DeliveryDuration ? pc.DeliveryDuration.name : '' %}
  2168.     {% if pc.ClassCategory2 %}
  2169.       deliveryMap['{{ c1 }}'] = deliveryMap['{{ c1 }}'] || {};
  2170.       deliveryMap['{{ c1 }}']['{{ c2 }}'] = '{{ label|e('js') }}';
  2171.     {% else %}
  2172.       deliveryMap['{{ c1 }}'] = '{{ label|e('js') }}';
  2173.     {% endif %}
  2174.   {% endfor %}
  2175.   function updateDelivery() {
  2176.     if (!el1 || !out) return;
  2177.     const v1 = el1.value;
  2178.     if (!v1 || v1 === '__unselected') {
  2179.       out.textContent = '';
  2180.       return;
  2181.     }
  2182.     let label = '';
  2183.     if (el2 && el2.value && el2.value !== '__unselected') {
  2184.       if (deliveryMap[v1] && typeof deliveryMap[v1] === 'object') {
  2185.         label = deliveryMap[v1][el2.value] || '';
  2186.       }
  2187.     } else {
  2188.       label = (typeof deliveryMap[v1] === 'string') ? deliveryMap[v1] : '';
  2189.     }
  2190.     out.textContent = label || '';
  2191.   }
  2192.   if (el1) el1.addEventListener('change', updateDelivery);
  2193.   if (el2) el2.addEventListener('change', updateDelivery);
  2194.   updateDelivery(); // 初期表示
  2195. });
  2196. </script>
  2197. <script>
  2198. document.addEventListener('DOMContentLoaded', function () {
  2199.   const form = document.querySelector('#form1');
  2200.   const select1 = document.getElementById('classcategory_id1');
  2201.   const qtySelector = 'select[name=\"quantity\"], input[name=\"quantity\"]';
  2202.   function getQtyEl() {
  2203.     return document.querySelector(qtySelector);
  2204.   }
  2205.   function getFixedQty(v1) {
  2206.     if (v1 === '291' || v1 === '289') return '50';
  2207.     if (v1 === '292' || v1 === '290') return '90';
  2208.     return null;
  2209.   }
  2210.   function enforceQuantity(showAlert = false) {
  2211.     const selected = select1?.value;
  2212.     const qtyEl = getQtyEl();
  2213.     const fixed = getFixedQty(selected);
  2214.     if (!selected || !qtyEl || !fixed) return;
  2215.     if (qtyEl.value !== fixed) {
  2216.       if (showAlert) alert(`この規格では数量は\${fixed}個に固定されています。`);
  2217.       qtyEl.value = fixed;
  2218.     }
  2219.   }
  2220.   // 数量変更時に自動補正
  2221.   document.addEventListener('change', function (e) {
  2222.     if (e.target.matches(qtySelector) || e.target.id === 'classcategory_id1') {
  2223.       enforceQuantity(false);
  2224.     }
  2225.   });
  2226.   // フォーム送信時にも補正とアラート
  2227.   if (form) {
  2228.     form.addEventListener('submit', function () {
  2229.       enforceQuantity(true);
  2230.     });
  2231.   }
  2232. });
  2233. </script>
  2234. <script>
  2235. document.addEventListener('DOMContentLoaded', function () {
  2236.   const select1 = document.getElementById('classcategory_id1');
  2237.   const form = document.querySelector('#form1');
  2238.   function getQtyEl() {
  2239.     return document.querySelector('select[name=\"quantity\"], input[name=\"quantity\"]');
  2240.   }
  2241.   function getFixedQty(v1) {
  2242.     if (v1 === '291' || v1 === '289') return '50';
  2243.     if (v1 === '292' || v1 === '290') return '90';
  2244.     return null;
  2245.   }
  2246.   function enforceQuantity(showAlert = false) {
  2247.     const selected = select1?.value;
  2248.     const qtyEl = getQtyEl();
  2249.     const fixed = getFixedQty(selected);
  2250.     if (!selected || !qtyEl || !fixed) return;
  2251.     if (qtyEl.value !== fixed) {
  2252.       if (showAlert) alert(`この規格では数量は \${fixed} 個に固定されています。`);
  2253.       qtyEl.value = fixed;
  2254.     }
  2255.   }
  2256.   function attachQtyWatcher() {
  2257.     const qtyEl = getQtyEl();
  2258.     if (!qtyEl) return;
  2259.     qtyEl.removeEventListener('change', qtyEl._handler || (() => {}));
  2260.     qtyEl._handler = () => enforceQuantity(false);
  2261.     qtyEl.addEventListener('change', qtyEl._handler);
  2262.   }
  2263.   // セレクト1が変わるたびに数量制御イベント再アタッチ
  2264.   select1?.addEventListener('change', () => {
  2265.     setTimeout(() => {
  2266.       enforceQuantity(false);
  2267.       attachQtyWatcher();
  2268.     }, 100);
  2269.   });
  2270.   // is_print変更時もセレクトが入れ替わるため再アタッチ
  2271.   const isPrint = document.getElementById('is_print');
  2272.   isPrint?.addEventListener('change', () => {
  2273.     setTimeout(() => {
  2274.       enforceQuantity(false);
  2275.       attachQtyWatcher();
  2276.     }, 100);
  2277.   });
  2278.   // 最初の数量セレクトにも適用
  2279.   setTimeout(() => {
  2280.     enforceQuantity(false);
  2281.     attachQtyWatcher();
  2282.   }, 300);
  2283.   // フォーム送信時チェック
  2284.   form?.addEventListener('submit', function (e) {
  2285.     enforceQuantity(true);
  2286.   });
  2287. });
  2288. </script>
  2289. {% endif %}//カレンダー終わり
  2290. {% endblock %}
  2291. {% block main %}
  2292.     <div class=\"ec-productRole\">
  2293.         <div class=\"ec-grid2\">
  2294.             <div class=\"ec-grid2__cell\">
  2295.                 <div class=\"ec-sliderItemRole\">
  2296.                     {# 関連カテゴリ #}
  2297.                     {% if Product.ProductCategories is not empty %}
  2298.                         <div class=\"ec-productRole__category\">
  2299.                             <div>{{ '関連カテゴリ'|trans }}</div>
  2300.                             {% for ProductCategory in Product.ProductCategories %}
  2301.                                 <ul>
  2302.                                     <li>
  2303.                                         {% for Category in ProductCategory.Category.path %}
  2304.                                             <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">{{ Category.name }}</a> {%- if loop.last == false %}
  2305.                                             <span>></span>{% endif -%}
  2306.                                         {% endfor %}
  2307.                                     </li>
  2308.                                 </ul>
  2309.                             {% endfor %}
  2310.                         </div>
  2311.                     {% endif %}
  2312.                 </div>
  2313.                 <div class=\"ec-sliderItemRole\">
  2314.                     <div class=\"item_visual\">
  2315.                         {% for ProductImage in Product.ProductImage %}
  2316.                             <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>
  2317.                         {% else %}
  2318.                             <div class=\"slide-item\"><img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"{{ loop.first ? Product.name : '' }}\" width=\"550\" height=\"550\"></div>
  2319.                         {% endfor %}
  2320.                     </div>
  2321.                     <div class=\"item_nav\">
  2322.                         {% for ProductImage in Product.ProductImage %}
  2323.                             <div class=\"slideThumb\" data-index=\"{{ loop.index0 }}\"><img src=\"{{ asset(ProductImage, 'save_image') }}\" alt=\"\" width=\"133\" height=\"133\" loading=\"lazy\"></div>
  2324.                         {% endfor %}
  2325.                     </div>
  2326.                 </div>
  2327.                 {% set sampleTagIds = [8, 12] %}
  2328. {% set hasSampleTag = false %}
  2329. {% for ProductTag in Product.ProductTag %}
  2330.     {% if ProductTag.Tag.id in sampleTagIds %}
  2331.         {% set hasSampleTag = true %}
  2332.     {% endif %}
  2333. {% endfor %}
  2334. {% if hasSampleTag %}
  2335.                 <div class=\"ec-sliderItemRole\">
  2336.                     <p style=\"text-align: center;\">
  2337.                         <a class=\"ec-blockBtn--cancel\" href=\"/contact?product_id={{ Product.id }}\" target=\"_blank\">サンプル請求</a>
  2338.                     </p>
  2339.                 </div>
  2340.                 <div class=\"ec-sliderItemRole\">
  2341.                     <p><b>【サンプルについて】</b><br>
  2342.                     <b><サンプル無料マークの商品について></b><br>
  2343.                     こちらのの商品は3点まで組み合わせ自由、無料で発送いたします。<br>
  2344.                     <b><サンプルレンタルOKマークの商品について></b><br>
  2345.                     こちらの商品は3点まで組み合わせ自由、貸出いたします。(※発送料は弊社負担ですが、ご返却送料はお客様ご負担となります。※サンプル到着後2週間以内にご返却ください。)</p><br>
  2346.                     <p>※在庫状況により、ご要望に添えない場合がございます。ご了承ください。</p>
  2347.                 </div>
  2348. {% endif %}
  2349.             </div>
  2350.             <div class=\"ec-grid2__cell\">
  2351.                 <div class=\"ec-productRole__profile\">
  2352.                     {# 商品名 #}
  2353.                     <div class=\"ec-productRole__title\">
  2354.                         <h2 class=\"ec-headingTitle\">{{ Product.name }}</h2>
  2355.                     </div>
  2356.                     {# タグ #}
  2357.                     <ul class=\"ec-productRole__tags\">
  2358.                         {% for Tag in Product.Tags %}
  2359.                             <li class=\"ec-productRole__tag tag_{{ Tag.id }}\">{{ Tag }}</li>
  2360.                         {% endfor %}
  2361.                     </ul>
  2362.                     {# 通常価格 #}
  2363.                     {#{% if Product.hasProductClass -%}
  2364.                         <div class=\"ec-productRole__priceRegular\">
  2365.                             {% if Product.getPrice01Min is not null and Product.getPrice01IncTaxMin == Product.getPrice01IncTaxMax %}
  2366.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}</span></span>
  2367.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  2368.                             {% elseif Product.getPrice01Min is not null and Product.getPrice01Max is not null %}
  2369.                                 <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:<span class=\"price01-default\">{{ Product.getPrice01IncTaxMin|price }}~ {{ Product.getPrice01IncTaxMax|price }}</span></span>
  2370.                                 <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  2371.                             {% endif %}
  2372.                         </div>
  2373.                     {% else %}
  2374.                         {% if Product.getPrice01Max is not null %}
  2375.                             <span class=\"ec-productRole__priceRegularPrice\">{{ '通常価格'|trans }}:{{ Product.getPrice01IncTaxMin|price }}</span>
  2376.                             <span class=\"ec-productRole__priceRegularTax\">{{ '税込'|trans }}</span>
  2377.                         {% endif %}
  2378.                     {% endif %}#}
  2379.                     {# 販売価格 #}
  2380.                     <div class=\"ec-productRole__price\">
  2381.                         {% if Product.hasProductClass -%}
  2382.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  2383.                                 <div class=\"ec-price\">
  2384.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }}</span>
  2385.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  2386.                                     <span class=\"ec-price__price price_no_tax price_no_tax_first\">{{ Product.getPrice02Min|price }}</span>
  2387.                                     <span class=\"ec-price__tax price_no_tax\">{{ '税抜'|trans }}</span>
  2388.                                 </div>
  2389.                             {% else %}
  2390.                                 <div class=\"ec-price\">
  2391.                                     <span class=\"ec-price__price price02-default\">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  2392.                                     <span class=\"ec-price__tax\">{{ '税込'|trans }}</span><br>
  2393.                                     <span class=\"ec-price__price price_no_tax\">{{ Product.getPrice02Min|price }} ~ {{ Product.getPrice02Max|price }}</span>
  2394.                                     <span class=\"ec-price__tax price_no_tax\">{{ '税抜'|trans }}</span>
  2395.                                 </div>
  2396.                             {% endif %}
  2397.                         {% else %}
  2398.                             <div class=\"ec-price\">
  2399.                                 <span class=\"ec-price__price\">{{ Product.getPrice02IncTaxMin|price }}</span>
  2400.                                 <span class=\"ec-price__tax\">{{ '税込'|trans }}</span>
  2401.                                 <span class=\"ec-price__price price_no_tax price_no_tax_first\">{{ Product.getPrice02Min|price }}</span>
  2402.                                 <span class=\"ec-price__tax price_no_tax\">{{ '税抜'|trans }}</span>
  2403.                             </div>
  2404.                         {% endif %}
  2405.                     </div>
  2406.                     {# 商品コード #}
  2407.                     {% if Product.code_min is not empty %}
  2408.                         <div class=\"ec-productRole__code\">
  2409.                             {{ '商品コード'|trans }}: <span class=\"product-code-default\">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  2410.                         </div>
  2411.                     {% endif %}
  2412.                     {% if not is_calendar %}
  2413.                         <div class=\"ec-productRole__code\">
  2414.                               {{ '在庫'|trans }}: <span class=\"product-stock-quantity-default\"></span>
  2415.                         </div>
  2416.                     {% endif %}
  2417.                     {% if is_calendar %}
  2418.                     <div class=\"ec-productRole__code\">
  2419.                         発送日目安:<span id=\"delivery-duration-text\"></span>
  2420.                     </div>
  2421.                     {% endif %}
  2422.                     <br>
  2423.                     <div class=\"ec-productRole__description\">{{ Product.description_detail|raw|nl2br }}
  2424.                     </div>
  2425.                     <form action=\"{{ url('product_add_cart', {id:Product.id}) }}\" method=\"post\" id=\"form1\" name=\"form1\">
  2426.                         {% if Product.stock_find %}
  2427.                             <div class=\"ec-productRole__actions\">
  2428.                                 {% if form.classcategory_id1 is defined %}
  2429.                                     <div class=\"ec-select\">
  2430.                                         {{ form_row(form.classcategory_id1, {'label':false}) }}
  2431.                                         {{ form_errors(form.classcategory_id1) }}
  2432.                                     </div>
  2433.                                     {% if form.classcategory_id2 is defined %}
  2434.                                         <div class=\"ec-select\">
  2435.                                             {{ form_row(form.classcategory_id2, {'label':false}) }}
  2436.                                             {{ form_errors(form.classcategory_id2) }}
  2437.                                         </div>
  2438.                                     {% endif %}
  2439.                                 {% endif %}
  2440.                                 {% if Product.product_print_type == false %}
  2441.                                     {% set colors = Product.product_print_color|split(',') %}
  2442.                                     {% if Product.product_print_type == false and colors|length > 0 %}
  2443.                                         <div class=\"row mb-2\">
  2444.                                             <div class=\"col-4\">
  2445.                                                 <div class=\"ec-select\">
  2446.                                                     {{ form_widget(form.is_print, {'attr': {'style':'min-width:unset', 'id': 'is_print'}}) }}
  2447.                                                     {{ form_errors(form.is_print) }}
  2448.                                                 </div>
  2449.                                             </div>
  2450.                                             <div class=\"col-6 form-is_repurchase\" style=\"display: none\">
  2451.                                                 <div class=\"form-check mt-2\">
  2452.                                                     {{ form_widget(form.is_repurchase,  {'label_attr': {'class': 'radio-inline'}}) }}
  2453.                                                     {{ form_errors(form.is_repurchase) }}
  2454.                                                 </div>
  2455.                                             </div>
  2456.                                         </div>
  2457.                                         <div class=\"row form-product-color\" style=\"display: none\">
  2458.                                             <div class=\"col-5\">
  2459.                                                 <div class=\"ec-select\">
  2460.                                                     <div class=\"mb-3\">
  2461.                                                         {{ form_widget(form.product_print_color, {'attr': {'style':'min-width:unset'}}) }}
  2462.                                                         {{ form_errors(form.product_print_color) }}
  2463.                                                     </div>
  2464.                                                 </div>
  2465.                                             </div>
  2466.                                         </div>
  2467.                                     {% endif %}
  2468.                                 {% endif %}
  2469.                                 <div class=\"row\">
  2470.                                     <div class=\"col-3\">
  2471.                                         <div class=\"{% if Product.order_unit %}ec-select{% else %}ec-numberInput{% endif %} mt-2 group-input-qty\">
  2472.                                             {{ form_widget(form.quantity, {'attr': {'style':'min-width:unset;display: none;', 'placeholder': '数量'}}) }}
  2473. {#                                            {{ form_widget(form.quantity_raw, {'attr': {'style':'min-width: unset;display: none', 'placeholder': '数量'}}) }}#}
  2474.                                             {{ form_errors(form.quantity) }}
  2475.                                         </div>
  2476.                                     </div>
  2477.                                     <div class=\"col-8\">
  2478.                                         <button type=\"submit\" class=\"ec-blockBtn--action add-cart\">
  2479.                                             {{ 'カートに入れる'|trans }}
  2480.                                         </button>
  2481.                                     </div>
  2482.                                 </div>
  2483.                             </div>
  2484.                         {% else %}
  2485.                             <div class=\"ec-productRole__btn\">
  2486.                                 <button type=\"button\" class=\"ec-blockBtn--action\" disabled=\"disabled\">
  2487.                                     {{ 'ただいま品切れ中です。'|trans }}
  2488.                                 </button>
  2489.                             </div>
  2490.                         {% endif %}
  2491.                         {{ form_rest(form) }}
  2492.                     </form>
  2493.                     <div class=\"ec-modal\">
  2494.                         <div class=\"ec-modal-overlay\">
  2495.                             <div class=\"ec-modal-wrap\">
  2496.                                 <span class=\"ec-modal-close\"><span class=\"ec-icon\"><img src=\"{{ asset('assets/icon/cross-dark.svg') }}\" alt=\"\"/></span></span>
  2497.                                 <div id=\"ec-modal-header\" class=\"text-center\">{{ 'カートに追加しました。'|trans }}</div>
  2498.                                 <div class=\"ec-modal-box\">
  2499.                                     <div class=\"ec-role\">
  2500.                                         <span class=\"ec-inlineBtn--cancel\">{{ 'お買い物を続ける'|trans }}</span>
  2501.                                         <a href=\"{{ url('cart') }}\" class=\"ec-inlineBtn--action\">{{ 'カートへ進む'|trans }}</a>
  2502.                                     </div>
  2503.                                 </div>
  2504.                             </div>
  2505.                         </div>
  2506.                     </div>
  2507.                     <div class=\"ec-productRole__SNS\">
  2508.                         <a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-via=\"lemanze\" data-lang=\"ja\" data-count=\"none\">ツイート</a>
  2509.                         <script>
  2510.                             !function(d,s,id){
  2511.                                 var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
  2512.                                 if(!d.getElementById(id)){
  2513.                                     js=d.createElement(s);
  2514.                                     js.id=id;
  2515.                                     js.src=p+'://platform.twitter.com/widgets.js';
  2516.                                     fjs.parentNode.insertBefore(js,fjs);
  2517.                                 }
  2518.                             }(document, 'script', 'twitter-wjs');
  2519.                         </script>
  2520.                         <div class=\"line-it-button\" data-lang=\"ja\" data-type=\"share-a\" data-env=\"REAL\" data-url=\"{{ url('product_detail', {'id': Product.id}) }}\" data-color=\"default\" data-size=\"small\" data-count=\"true\" data-ver=\"3\" style=\"display: none;\"></div>
  2521.                         <script src=\"https://www.line-website.com/social-plugins/js/thirdparty/loader.min.js\" async=\"async\" defer=\"defer\"></script>
  2522.                     </div>
  2523.                     {% if BaseInfo.option_favorite_product %}
  2524.                         <form action=\"{{ url('product_add_favorite', {id:Product.id}) }}\" method=\"post\">
  2525.                             <div class=\"ec-productRole__btn\">
  2526.                                 {% if is_favorite == false %}
  2527.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\">
  2528.                                         {{ 'お気に入りに追加'|trans }}
  2529.                                     </button>
  2530.                                 {% else %}
  2531.                                     <button type=\"submit\" id=\"favorite\" class=\"ec-blockBtn--cancel\"
  2532.                                             disabled=\"disabled\">{{ 'お気に入りに追加済です。'|trans }}
  2533.                                     </button>
  2534.                                 {% endif %}
  2535.                             </div>
  2536.                         </form>
  2537.                     {% endif %}
  2538.                     {% if Product.freearea %}
  2539.                          <div class=\"ec-productRole__description\">
  2540.                              {{ include(template_from_string(Product.freearea|raw|nl2br)) }}
  2541.                         </div>
  2542.                     {% endif %}
  2543.                 </div>
  2544.             </div>
  2545.         </div>
  2546.     </div>
  2547. {% endblock %}
  2548. ""Product/detail.twig""/virtual/adnet/public_html/lemanze.awe.jp/app/template/default/Product/detail.twig");
  2549.     }
  2550. }