app/template/default/Product/detail.twig line 757

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% set body_class = 'product_page' %}
  10. {% block stylesheet %}
  11.     <style>
  12.         .slick-slider {
  13.             margin-bottom: 10px;
  14.             margin-top: -20px;
  15.         }
  16.         .slick-dots {
  17.             position: absolute;
  18.             bottom: -45px;
  19.             display: block;
  20.             width: 100%;
  21.             padding: 0;
  22.             list-style: none;
  23.             text-align: center;
  24.         }
  25.         .slick-dots li {
  26.             position: relative;
  27.             display: inline-block;
  28.             width: 20px;
  29.             height: 20px;
  30.             margin: 0 5px;
  31.             padding: 0;
  32.             cursor: pointer;
  33.         }
  34.         .slick-dots li button {
  35.             font-size: 0;
  36.             line-height: 0;
  37.             display: block;
  38.             width: 20px;
  39.             height: 20px;
  40.             padding: 5px;
  41.             cursor: pointer;
  42.             color: transparent;
  43.             border: 0;
  44.             outline: none;
  45.             background: transparent;
  46.         }
  47.         .slick-dots li button:hover,
  48.         .slick-dots li button:focus {
  49.             outline: none;
  50.         }
  51.         .slick-dots li button:hover:before,
  52.         .slick-dots li button:focus:before {
  53.             opacity: 1;
  54.         }
  55.         .slick-dots li button:before {
  56.             content: " ";
  57.             line-height: 20px;
  58.             position: absolute;
  59.             top: 0;
  60.             left: 0;
  61.             width: 12px;
  62.             height: 12px;
  63.             text-align: center;
  64.             opacity: .25;
  65.             background-color: black;
  66.             border-radius: 50%;
  67.         }
  68.         .slick-dots li.slick-active button:before {
  69.             opacity: .75;
  70.             background-color: black;
  71.         }
  72.         .slick-dots li button.thumbnail img {
  73.             width: 0;
  74.             height: 0;
  75.         }
  76.     </style>
  77.     <link rel="stylesheet" href="/html/user_data/js/style.css">
  78.     <link rel="stylesheet" href="/html/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  79. {% endblock %}
  80. {% block javascript %}
  81.     <script>
  82.         eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
  83.         // 規格2に選択肢を割り当てる。
  84.         function fnSetClassCategories(form, classcat_id2_selected) {
  85.             var $form = $(form);
  86.             var product_id = $form.find('input[name=product_id]').val();
  87.             var $sele1 = $form.find('select[name=classcategory_id1]');
  88.             var $sele2 = $form.find('select[name=classcategory_id2]');
  89.             eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
  90.         }
  91.         {% if form.classcategory_id2 is defined %}
  92.         fnSetClassCategories(
  93.             $('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
  94.         );
  95.         {% elseif form.classcategory_id1 is defined %}
  96.         eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
  97.         {% endif %}
  98.     </script>
  99.     <script>
  100.         $(function() {
  101.             // bfcache無効化
  102.             $(window).bind('pageshow', function(event) {
  103.                 if (event.originalEvent.persisted) {
  104.                     location.reload(true);
  105.                 }
  106.             });
  107.             // Core Web Vital の Cumulative Layout Shift(CLS)対策のため
  108.             // img タグに width, height が付与されている.
  109.             // 630px 未満の画面サイズでは縦横比が壊れるための対策
  110.             // see https://github.com/EC-CUBE/ec-cube/pull/5023
  111.             $('.ec-grid2__cell').hide();
  112.             var removeSize = function () {
  113.                 $('.slide-item').height('');
  114.                 $('.slide-item img')
  115.                     .removeAttr('width')
  116.                     .removeAttr('height')
  117.                     .removeAttr('style');
  118.             };
  119.             var slickInitial = function(slick) {
  120.                 $('.ec-grid2__cell').fadeIn(1500);
  121.                 var baseHeight = $(slick.target).height();
  122.                 var baseWidth = $(slick.target).width();
  123.                 var rate = baseWidth / baseHeight;
  124.                 if(baseHeight * rate < 400){
  125.                     $('.slide-item').height(baseHeight * rate); // 余白を削除する
  126.                 }else{
  127.                     $('.slide-item').height(400); // 余白を削除する
  128.                 }
  129.                 // transform を使用することでCLSの影響を受けないようにする
  130.                 $('.slide-item img')
  131.                     .css(
  132.                         {
  133.                             'transform-origin': 'top left',
  134.                             'transform': 'scaleY(' + rate + ')',
  135.                             'transition': 'transform .1s'
  136.                         }
  137.                     );
  138.                 // 正しいサイズに近くなったら属性を解除する
  139.                 setTimeout(removeSize, 500);
  140.             };
  141.             $('.item_visual').on('init', slickInitial);
  142.             // リサイズ時は CLS の影響を受けないため属性を解除する
  143.             $(window).resize(removeSize);
  144.             $('.item_visual').slick({
  145.                 dots: false,
  146.                 arrows: true,
  147.                 responsive: [{
  148.                     breakpoint: 768,
  149.                     settings: {
  150.                         dots: true,
  151.                         arrows: false
  152.                     }
  153.                 }]
  154.             });
  155.             $('.slideThumb').on('click', function() {
  156.                 var index = $(this).attr('data-index');
  157.                 $('.item_visual').slick('slickGoTo', index, false);
  158.             })
  159.         });
  160.     </script>
  161.     <script>
  162.         $(function() {
  163.             $('.add-cart').on('click', function(event) {
  164.                 {% if form.classcategory_id1 is defined %}
  165.                 // 規格1フォームの必須チェック
  166.                 if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
  167.                     $('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  168.                     return true;
  169.                 } else {
  170.                     $('#classcategory_id1')[0].setCustomValidity('');
  171.                 }
  172.                 {% endif %}
  173.                 {% if form.classcategory_id2 is defined %}
  174.                 // 規格2フォームの必須チェック
  175.                 if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
  176.                     $('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
  177.                     return true;
  178.                 } else {
  179.                     $('#classcategory_id2')[0].setCustomValidity('');
  180.                 }
  181.                 {% endif %}
  182.                 // タイプ2: カート送信直前に set_count を quantity に同期
  183.                 if($('#set_count').length){
  184.                     var _sc = parseInt($('#set_count').val()) || 1;
  185.                     $('#quantity').val(_sc);
  186.                     $('input[name="quantity"]').val(_sc);
  187.                 }
  188.                 // 個数フォームのチェック
  189.                 if ($('#quantity').val() < 1) {
  190.                     $('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  191.                     return true;
  192.                 } else {
  193.                     $('#quantity')[0].setCustomValidity('');
  194.                 }
  195.                 event.preventDefault();
  196.                 $form = $('#form1');
  197.                 $.ajax({
  198.                     url: $form.attr('action'),
  199.                     type: $form.attr('method'),
  200.                     data: $form.serialize(),
  201.                     dataType: 'json',
  202.                     beforeSend: function(xhr, settings) {
  203.                         // Buttonを無効にする
  204.                         $('.add-cart').prop('disabled', true);
  205.                     }
  206.                 }).done(function(data) {
  207.                     // レスポンス内のメッセージをalertで表示
  208.                     $.each(data.messages, function() {
  209.                         $('#ec-modal-header').text(this);
  210.                     });
  211.                     $('.ec-modal').show()
  212.                     // カートブロックを更新する
  213.                     $.ajax({
  214.                         url: "{{ url('block_cart') }}",
  215.                         type: 'GET',
  216.                         dataType: 'html'
  217.                     }).done(function(html) {
  218.                         $('.ec-headerRole__cart').html(html);
  219.                     });
  220.                 }).fail(function(data) {
  221.                     alert('{{ '施工検討リストへの追加に失敗しました。'|trans }}');
  222.                 }).always(function(data) {
  223.                     // Buttonを有効にする
  224.                     $('.add-cart').prop('disabled', false);
  225.                 });
  226.             });
  227.         });
  228.         $('.ec-modal-wrap').on('click', function(e) {
  229.             // モーダル内の処理は外側にバブリングさせない
  230.             e.stopPropagation();
  231.         });
  232.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  233.             $('.ec-modal').hide()
  234.         });
  235.         var pw = "{% if mitsumori_json %}{{ mitsumori_json.pw }}{% endif %}";
  236.         var pd = "{% if mitsumori_json %}{{ mitsumori_json.pd }}{% endif %}";
  237.         var ph = "{% if mitsumori_json %}{{ mitsumori_json.ph }}{% endif %}";
  238.         var pm = "{% if mitsumori_json %}{{ mitsumori_json.pm }}{% endif %}";
  239.         var pc = "{% if mitsumori_json %}{{ mitsumori_json.pc }}{% endif %}";
  240.         var op0 = "{% if mitsumori_json %}{{ mitsumori_json.op[0] }}{% endif %}";
  241.         var op1 = "{% if mitsumori_json %}{{ mitsumori_json.op[1] }}{% endif %}";
  242.         var op2 = "{% if mitsumori_json %}{{ mitsumori_json.op[2] }}{% endif %}";
  243.         var op3 = "{% if mitsumori_json %}{{ mitsumori_json.op[3] }}{% endif %}";
  244.         var op4 = "{% if mitsumori_json %}{{ mitsumori_json.op[4] }}{% endif %}";
  245.         var op5 = "{% if mitsumori_json %}{{ mitsumori_json.op[5] }}{% endif %}";
  246.         var op6 = "{% if mitsumori_json %}{{ mitsumori_json.op[6] }}{% endif %}";
  247.         var op7 = "{% if mitsumori_json %}{{ mitsumori_json.op[7] }}{% endif %}";
  248.         var op8 = "{% if mitsumori_json %}{{ mitsumori_json.op[8] }}{% endif %}";
  249.         var op9 = "{% if mitsumori_json %}{{ mitsumori_json.op[9] }}{% endif %}";
  250.         var op10 = "{% if mitsumori_json %}{{ mitsumori_json.op[10] }}{% endif %}";
  251.         const formatter = new Intl.NumberFormat('ja-JP');
  252.         function mitsumori_simulation(type , value_id){
  253.             var pp = {{ pp|raw }};
  254.             if(type == "pw"){
  255.                 pw = $('#'+value_id).val();
  256.             }
  257.             if(type == "pd"){
  258.                 pd = $('#'+value_id).val();
  259.             }
  260.             if(type == "ph"){
  261.                 ph = $('#'+value_id).val();
  262.             }
  263.             if(type == "pm"){
  264.                 pm = $('#'+value_id).val();
  265.             }
  266.             if(type == "pc"){
  267.                 pc = $('#'+value_id).val();
  268.             }
  269.             if(type == "op0"){ op0 = $('#'+value_id).val(); }
  270.             if(type == "op1"){ op1 = $('#'+value_id).val(); }
  271.             if(type == "op2"){ op2 = $('#'+value_id).val(); }
  272.             if(type == "op3"){ op3 = $('#'+value_id).val(); }
  273.             if(type == "op4"){ op4 = $('#'+value_id).val(); }
  274.             if(type == "op5"){ op5 = $('#'+value_id).val(); }
  275.             if(type == "op6"){ op6 = $('#'+value_id).val(); }
  276.             if(type == "op7"){ op7 = $('#'+value_id).val(); }
  277.             if(type == "op8"){ op8 = $('#'+value_id).val(); }
  278.             if(type == "op9"){ op9 = $('#'+value_id).val(); }
  279.             if(type == "op10"){ op10 = $('#'+value_id).val(); }
  280.             if(pm == ""){
  281.                 $('#mitsumori_message').text("素材を選択してください");
  282.             }
  283.             if(ph == ""){
  284.                 $('#mitsumori_message').text("高さを選択してください");
  285.             }
  286.             if(pd == ""){
  287.                 $('#mitsumori_message').text("奥行きを選択してください");
  288.             }
  289.             if(pw == ""){
  290.                 $('#mitsumori_message').text("幅を選択してください");
  291.             }
  292.             if(pc == ""){
  293.                 $('#mitsumori_message').text("カラーを選択してください");
  294.                 $('#mitsumori_btn').hide();
  295.                 $('#mitsumori_goukei').text("---円");
  296.                 $('#mitsumori_off').text("---円");
  297.                 $('#mitsumori_price').text("---円");
  298.                 $('#maker_price').text("---円");
  299.                 $('#mitsumori_ct').text("---円");
  300.                 $('#mitsumori_option').text("---円");
  301.             }
  302.             if(pw != "" && pd != "" && ph != "" && pm != "" && pc != ""){
  303.                 $('#mitsumori_btn').show();
  304.                 
  305.                 pp.forEach((el) => {
  306.                   if((pw == el.w || pw == "指定なし") && (pd == el.d || pd == "指定なし") && (ph == el.h || ph == "指定なし") && (pm == el.m || pm == "指定なし") && (pc == el.c || pc == "指定なし")){
  307.                     if(op0 == "商品購入のみ" || op1 == "商品購入のみ" || op2 == "商品購入のみ" || op3 == "商品購入のみ" || op4 == "商品購入のみ" 
  308.                         || op5 == "商品購入のみ" || op6 == "商品購入のみ" || op7 == "商品購入のみ" || op8 == "商品購入のみ" || op9 == "商品購入のみ"){
  309.                           $('#mitsumori_message').text(formatter.format(parseInt(el.price)) + "円");
  310.                           $('#mitsumori_goukei').text(formatter.format(parseInt(el.price)) + "円");
  311.                           $('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");
  312.                           $('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");
  313.                           $('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");
  314.                           $('#mitsumori_ct').text("0円");
  315.                           $('#mitsumori_option').text("0円");
  316.                           $('#mitsumori_kei').text(formatter.format(parseInt(el.price)) + "円");
  317.                           $('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");
  318.                           $('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");
  319.                           $('#mitsumori_ct_01').text("0円");
  320.                           $('#mitsumori_ct_02').text("0円");
  321.                           $('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price)) + "円");
  322.                         
  323.                         mitsumori_goukei = (parseInt(el.price));
  324.                         shoukei = mitsumori_goukei / 1.1;
  325.                         tax = parseInt(mitsumori_goukei - shoukei);
  326.                           $('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");
  327.                           $('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");
  328.                     }else{
  329.                           $('#mitsumori_message').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  330.                           $('#mitsumori_goukei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  331.                           $('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");
  332.                           $('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");
  333.                           $('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");
  334.                           $('#mitsumori_ct').text(formatter.format(parseInt(el.ct)) + "円");
  335.                           $('#mitsumori_option').text("0円");
  336.                           $('#mitsumori_kei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  337.                           $('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");
  338.                           $('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");
  339.                           $('#mitsumori_ct_01').text(formatter.format(parseInt(el.ct)) + "円");
  340.                           $('#mitsumori_ct_02').text(formatter.format(parseInt(el.ct)) + "円");
  341.                           $('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  342.                         mitsumori_goukei = (parseInt(el.price) + parseInt(el.ct));
  343.                         shoukei = mitsumori_goukei / 1.1;
  344.                         tax = parseInt(mitsumori_goukei - shoukei);
  345.                           $('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");
  346.                           $('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");
  347.                     }
  348.                   }
  349.                 });    
  350.                 // タイプ5: ステップ・フェンス・面積の現在値を取得
  351.                 if($('input[name=deck_step]:checked').length){ deck_step = $('input[name=deck_step]:checked').val(); }
  352.                 if($('input[name=deck_fence]:checked').length){ deck_fence = $('input[name=deck_fence]:checked').val(); }
  353.                 // タイプ2: 窓サイズ・窓タイプ・ガラスタイプ・セット数
  354.                 var mado_w_val     = $('#mado_w').val()     || '';
  355.                 var mado_h_val     = $('#mado_h').val()     || '';
  356.                 var mado_type_val  = $('input[name=mado_type]:checked').val()  || '';
  357.                 var glass_type_val = $('input[name=glass_type]:checked').val() || '';
  358.                 var set_count_val  = parseInt($('#set_count').val()) || 1;
  359.                 // タイプ3: 台数
  360.                 var daisu_val = parseInt($('#daisu').val()) || 1;
  361.                 // タイプ4・6: 枚数
  362.                 var maisu_val = parseInt($('#maisu').val()) || 1;
  363.                 // タイプ5: 面積
  364.                 var area_val = $('#area').val() || '';
  365.                 // sale_type
  366.                 var sale_type_id = {{ ProductClass.SaleType.id }};
  367.                 var mitsumori_json = { "mitsumori_goukei": $('#mitsumori_goukei').text(),
  368.                                         "mitsumori_goukei_02": $('#mitsumori_goukei_02').text(),
  369.                                         "mitsumori_price": $('#mitsumori_price').text(),
  370.                                         "maker_price": $('#maker_price').text(),
  371.                                         "mitsumori_off": $('#mitsumori_off').text(),
  372.                                         "mitsumori_ct": $('#mitsumori_ct').text(),
  373.                                         "mitsumori_option": $('#mitsumori_option').text(),
  374.                                         "product_id": {{ Product.id }},
  375.                                         "sale_type": sale_type_id,
  376.                                         "pw": pw,
  377.                                         "pd": pd,
  378.                                         "ph": ph,
  379.                                         "pm": pm,
  380.                                         "pc": pc,
  381.                                         "op": [op0,op1,op2,op3,op4,op5,op6,op7,op8,op9,op10],
  382.                                         "mado_w":     mado_w_val,
  383.                                         "mado_h":     mado_h_val,
  384.                                         "mado_type":  mado_type_val,
  385.                                         "glass_type": glass_type_val,
  386.                                         "set_count":  set_count_val,
  387.                                         "daisu":      daisu_val,
  388.                                         "maisu":      maisu_val,
  389.                                         "area":       area_val,
  390.                                         "deck_step":  deck_step,
  391.                                         "deck_fence": deck_fence };
  392.                 $('#mitsumori_json').val(JSON.stringify(mitsumori_json));
  393.                 
  394.             }
  395.             
  396.         }
  397.         {% if color and color|length == 1 %}
  398.             pc = "指定なし";
  399.             {% for cc in color %}{% if cc and cc['name'] %} pc = "{{ cc['name'] }}"; {% endif %}{% endfor %}
  400.         {% endif %}
  401.         {% if p_w and (p_w|length == 1 or p_w|join == "") %}
  402.             pw = "指定なし";
  403.             {% for pw in p_w %}{% if pw %} pw = "{{ pw }}"; {% endif %}{% endfor %}
  404.         {% endif %}
  405.         {% if p_d and (p_d|length == 1 or p_d|join == "") %}
  406.             pd = "指定なし";
  407.             {% for pd in p_d %}{% if pd %} pd = "{{ pd }}"; {% endif %}{% endfor %}
  408.         {% endif %}
  409.         {% if p_h and (p_h|length == 1 or p_h|join == "") %}
  410.             ph = "指定なし";
  411.             {% for ph in p_h %}{% if ph %} ph = "{{ ph }}"; {% endif %}{% endfor %}
  412.         {% endif %}
  413.         {% if p_m and (p_m|length == 1 or p_m|join == "") %}
  414.             pm = "指定なし";
  415.             {% for pm in p_m %}{% if pm %} pm = "{{ pm }}"; {% endif %}{% endfor %}
  416.         {% endif %}
  417.         // ページ読み込み時: タイプ別に quantity の初期値をセット
  418.         (function initQuantityByType(){
  419.             var saleType = {{ ProductClass.SaleType.id }};
  420.             if(saleType == 2 && $('#set_count').length){
  421.                 var _v = parseInt($('#set_count').val()) || 1;
  422.                 $('#quantity').val(_v);
  423.                 $('input[name="quantity"]').val(_v);
  424.             } else if(saleType == 3 && $('#daisu').length){
  425.                 $('#quantity').val(parseInt($('#daisu').val()) || 1);
  426.             } else if((saleType == 4 || saleType == 6) && $('#maisu').length){
  427.                 $('#quantity').val(parseInt($('#maisu').val()) || 1);
  428.             } else if(saleType == 9 && $('#quantity_only').length){
  429.                 $('#quantity').val(parseInt($('#quantity_only').val()) || 1);
  430.             }
  431.         })();
  432.         mitsumori_simulation("","");
  433.         function contact_form(product_id){
  434.             $('#form1').attr('action', '{{ url('contact', {product:Product.id}) }}');
  435.             $('#form1').submit();
  436.         }
  437.         // maisu / madoset は下部の新しい関数定義を使用
  438.         function heibei(bei){
  439.             $('#heibei').val(parseInt($('#heibei').val()) + bei);
  440.             if(parseInt($('#heibei').val()) < 1){ $('#heibei').val(1); }
  441.             if(parseInt($('#heibei').val()) > 100){ $('#heibei').val(100); }
  442.             $('#quantity').val($('#heibei').val());
  443.             mitsumori_simulation('heibei','heibei');
  444.         }
  445.         function daisu(dai){
  446.             $('#daisu').val(parseInt($('#daisu').val()) + dai);
  447.             if(parseInt($('#daisu').val()) < 1){ $('#daisu').val(1); }
  448.             if(parseInt($('#daisu').val()) > 10){ $('#daisu').val(10); }
  449.             $('#quantity').val($('#daisu').val());
  450.             mitsumori_simulation('daisu','daisu');
  451.         }
  452.         function maisu(mai){
  453.             $('#maisu').val(parseInt($('#maisu').val()) + mai);
  454.             if(parseInt($('#maisu').val()) < 1){ $('#maisu').val(1); }
  455.             if(parseInt($('#maisu').val()) > 100){ $('#maisu').val(100); }
  456.             $('#quantity').val($('#maisu').val());
  457.             mitsumori_simulation('maisu','maisu');
  458.         }
  459.         // タイプ2: セット数プルダウン連動
  460.         function madosetSelect(val){
  461.             var v = parseInt(val);
  462.             if(v < 1) v = 1;
  463.             if(v > 20) v = 20;
  464.             // id="quantity" と name="quantity" 両方を確実に書き換え
  465.             $('#quantity').val(v);
  466.             $('input[name="quantity"]').val(v);
  467.             mitsumori_simulation('set','set_count');
  468.         }
  469.         // タイプ2: ±ボタン版(後方互換)
  470.         function madoset(mai){
  471.             var current = parseInt($('#set_count').val()) || 1;
  472.             var next = current + mai;
  473.             if(next < 1) next = 1;
  474.             if(next > 20) next = 20;
  475.             $('#set_count').val(next);
  476.             madosetSelect(next);
  477.         }
  478.         // タイプ5: ステップ・フェンス選択値を mitsumori_json に保存するためのグローバル変数
  479.         var deck_step = "{% if mitsumori_json %}{{ mitsumori_json.deck_step|default('不要') }}{% else %}不要{% endif %}";
  480.         var deck_fence = "{% if mitsumori_json %}{{ mitsumori_json.deck_fence|default('不要') }}{% else %}不要{% endif %}";
  481.         // PDF出力: モーダルの mitsumori_json をフォームに同期してから送信
  482.         function syncPdfJson(){
  483.             var jsonVal = $('#mitsumori_json').val();
  484.             $('#pdf_mitsumori_json').val(jsonVal);
  485.         }
  486.         // タイプ9: 商品のみ購入
  487.         function quantityOnly(val){
  488.             var current = parseInt($('#quantity_only').val()) || 1;
  489.             var next = current + val;
  490.             if(next < 1) next = 1;
  491.             $('#quantity_only').val(next);
  492.             $('#quantity').val(next);
  493.         }
  494.     </script>
  495.     <script type="application/ld+json">
  496.     {
  497.         "@context": "https://schema.org/",
  498.         "@type": "Product",
  499.         "name": "{{ Product.name }}",
  500.         "image": [
  501.             {% for img in Product.ProductImage %}
  502.                 "{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
  503.             {% else %}
  504.                 "{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
  505.             {% endfor %}
  506.         ],
  507.         "description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
  508.         {% if Product.code_min %}
  509.         "sku": "{{ Product.code_min }}",
  510.         {% endif %}
  511.         "offers": {
  512.             "@type": "Offer",
  513.             "url": "{{ url('product_detail', {'id': Product.id}) }}",
  514.             "priceCurrency": "{{ eccube_config.currency }}",
  515.             "price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  516.             "availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
  517.         }
  518.     }
  519.     </script>
  520. {% endblock %}
  521. {% block main %}
  522.     <div class="ec-productRole" style="margin-top:20px;">
  523.         <div class="ec-grid2">
  524.             <div class="ec-grid2__cell">
  525.                 <div class="ec-sliderItemRole">
  526.                     {# 商品名 #}
  527.                     <div class="ec-productRole__title">
  528.                         <h2 class="ec-headingTitle">{{ Product.name }}</h2>
  529.                     </div>
  530.                     {% if BaseInfo.option_favorite_product %}
  531.                      <div style="position:relative;top: 20px;left: 10px;z-index:100;">
  532.                         {% if is_favorite == false %}
  533.                         <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  534.                            <button type="submit" id="favorite" class="favorite">&#9825;</button>
  535.                         </form>
  536.                         {% else %}
  537.                         <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  538.                            <button type="submit" id="favorite" class="favorite" style="color:red;">&#9829;</button>
  539.                         </form>
  540.                         {% endif %}
  541.                      </div>
  542.                     {% endif %}
  543.                     <div class="item_visual">
  544.                         {% for ProductImage in Product.ProductImage %}
  545.                             <div class="slide-item"><img src="{{ asset(ProductImage, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" width="550" height="550" style="max-height: 400px;"{% if loop.index > 1 %} loading="lazy"{% endif %}></div>
  546.                         {% else %}
  547.                             <div class="slide-item"><img src="{{ asset(''|no_image_product, 'save_image') }}" alt="{{ loop.first ? Product.name : '' }}" width="550" height="550" style="max-height: 400px;"></div>
  548.                         {% endfor %}
  549.                     </div>
  550.                     <div class="item_nav">
  551.                         {% for ProductImage in Product.ProductImage %}
  552.                             <div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="80" height="80" loading="lazy"></div>
  553.                         {% endfor %}
  554.                     </div>
  555.                 </div>
  556.             </div>
  557.             <div class="ec-grid2__cell2">
  558.                 <div class="ec-productRole__profile" >
  559.                     {# 関連カテゴリ #}
  560.                     {% if Product.ProductCategories is not empty %}
  561.                         <div class="ec-productRole__category" style="padding:10px 0;">
  562.                             {% for ProductCategory in Product.ProductCategories %}
  563.                                 <ul>
  564.                                     <li>
  565.                                         {% for Category in ProductCategory.Category.path %}
  566.                                             <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
  567.                                             <span>></span>{% endif -%}
  568.                                         {% endfor %}
  569.                                     </li>
  570.                                 </ul>
  571.                             {% endfor %}
  572.                         </div>
  573.                     {% endif %}
  574.                     {# 販売価格 #}
  575.                     <div class="ec-productRole__price">
  576.                         <span style="color:black;font-size:15px;">工事費込み価格</span>
  577.                         {% if Product.hasProductClass -%}
  578.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  579.                                 <div class="ec-price">
  580.                                     <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>
  581.                                     <span class="ec-price__tax">({{ '税込'|trans }})~</span>
  582.                                 </div>
  583.                             {% else %}
  584.                                 <div class="ec-price">
  585.                                     <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  586.                                     <span class="ec-price__tax">({{ '税込'|trans }})</span>
  587.                                 </div>
  588.                             {% endif %}
  589.                         {% else %}
  590.                             <div class="ec-price">
  591.                                 <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
  592.                                     <span class="ec-price__tax">({{ '税込'|trans }})~</span>
  593.                             </div>
  594.                         {% endif %}
  595.                     </div>
  596.                     {# タグ #}
  597.                     <ul class="ec-productRole__tags">
  598.                         {% for Tag in Product.Tags %}
  599.                             <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  600.                         {% endfor %}
  601.                     </ul>
  602.                     {# 商品コード #}
  603.                     {% if Product.code_min is not empty %}
  604.                         <div class="ec-productRole__code">
  605.                             {{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  606.                         </div>
  607.                     {% endif %}
  608.                     <div class="ec-productRole__description">
  609.                         <div class="ec-rectHeading">
  610.                             <h4>製品情報</h4>
  611.                         </div>
  612.                         {{ Product.sales_infomation|raw|nl2br }}
  613.                     </div>
  614.                     <div class="card card-danger" style="clear:both;margin:1px;">
  615.                       <div class="card-header">
  616.                         <h3 class="card-title">見積シミュレーション</h3>
  617.                       </div>
  618.                       <div class="card-body p-2">
  619.                     {% set type1 = getProduct_field(Product.id,"related_name1") %}
  620.                         {% set type2 = getProduct_field(Product.id,"related_name2") %}
  621.                         {% set type3 = getProduct_field(Product.id,"related_name3") %}
  622.                         {% set hasRelated = (type1 and related_product1 and related_product1|length)
  623.                                          or (type2 and related_product2 and related_product2|length)
  624.                                          or (type3 and related_product3 and related_product3|length) %}
  625.                         {% if hasRelated %}
  626.                             <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のタイプを選択してください。</label></div>
  627.                         {% endif %}
  628.                         {% if type1 and related_product1 and related_product1|length %}
  629.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  630.                           <label class="col-4 col-form-label mt-2">{{ type1 }}</label>
  631.                           <div class="col-8 mt-2">
  632.                             <div class="form-group clearfix">
  633.                               {% for rp_id, rp_name in related_product1 %}
  634.                               <div class="icheck-danger d-inline">
  635.                                 <input type="radio" name="rp1" id="rp1_{{ rp_id }}" value="{{ rp_name }}" {% if base_select1 == rp_name %}checked{% endif %} onclick="location.href='/products/detail/{{ rp_id }}';"><label for="rp1_{{ rp_id }}">{{ rp_name }}</label>
  636.                               </div>
  637.                               {% endfor %}
  638.                             </div>
  639.                           </div>
  640.                         </div>
  641.                         {% endif %}
  642.                         {% if type2 and related_product2 and related_product2|length %}
  643.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  644.                           <label class="col-4 col-form-label mt-2">{{ type2 }}</label>
  645.                           <div class="col-8 mt-2">
  646.                             <div class="form-group clearfix">
  647.                               {% for rp_id, rp_name in related_product2 %}
  648.                               <div class="icheck-danger d-inline">
  649.                                 <input type="radio" name="rp2" id="rp2_{{ rp_id }}" value="{{ rp_name }}" {% if base_select2 == rp_name %}checked{% endif %} onclick="location.href='/products/detail/{{ rp_id }}';"><label for="rp2_{{ rp_id }}">{{ rp_name }}</label>
  650.                               </div>
  651.                               {% endfor %}
  652.                             </div>
  653.                           </div>
  654.                         </div>
  655.                         {% endif %}
  656.                         {% if type3 and related_product3 and related_product3|length %}
  657.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  658.                           <label class="col-4 col-form-label mt-2">{{ type3 }}</label>
  659.                           <div class="col-8 mt-2">
  660.                             <div class="form-group clearfix">
  661.                               {% for rp_id, rp_name in related_product3 %}
  662.                               <div class="icheck-danger d-inline">
  663.                                 <input type="radio" name="rp3" id="rp3_{{ rp_id }}" value="{{ rp_name }}" {% if base_select3 == rp_name %}checked{% endif %} onclick="location.href='/products/detail/{{ rp_id }}';"><label for="rp3_{{ rp_id }}">{{ rp_name }}</label>
  664.                               </div>
  665.                               {% endfor %}
  666.                             </div>
  667.                           </div>
  668.                         </div>
  669.                         {% endif %}
  670.                         <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のオプションを選択してください。</label></div>
  671.                         {% if color and color|length and ProductClass.SaleType.id != 3 %}
  672.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  673.                           <label class="col-4 col-form-label mt-2">カラー</label>
  674.                           <div class="col-8 mt-2">
  675.                             <div class="form-group clearfix">
  676.                             {% set idx = 0 %}
  677.                             {% for cc in color %}
  678.                               {% if cc and cc['name'] %}
  679.                               {% set idx = idx + 1 %}
  680.                               <div class="icheck-danger d-inline">
  681.                                 <input type="radio" name="color" id="cc_{{ idx }}" value="{{ cc['name'] }}" {% if mitsumori_json and mitsumori_json.pc == cc['name'] or color|length == 1 %}checked{% endif %} onclick="mitsumori_simulation('pc','cc_{{ idx }}');"><label for="cc_{{ idx }}">{{ cc['name'] }}</label>
  682.                               </div>
  683.                               {% endif %}
  684.                             {% endfor %}
  685.                             </div>
  686.                           </div>
  687.                         </div>
  688.                         {% endif %}
  689.                         {% if p_w and p_w|length and p_w|join != "" %}
  690.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  691.                           <label class="col-4 col-form-label">幅</label>
  692.                           <div class="col-8">
  693.                             <div class="form-group clearfix">
  694.                             {% set idx = 0 %}
  695.                             {% for pw in p_w %}
  696.                               {% if pw %}
  697.                               {% set idx = idx + 1 %}
  698.                               <div class="icheck-danger d-inline">
  699.                                 <input type="radio" name="pw" id="pw_{{ idx }}" value="{{ pw }}" {% if mitsumori_json and mitsumori_json.pw == pw or p_w|length == 1 %}checked{% endif %} onclick="mitsumori_simulation('pw','pw_{{ idx }}');"><label for="pw_{{ idx }}">{{ pw }}</label>
  700.                               </div>
  701.                               {% endif %}
  702.                             {% endfor %}
  703.                             </div>
  704.                           </div>
  705.                         </div>
  706.                         {% endif %}
  707.                         {% if p_d and p_d|length and p_d|join != "" %}
  708.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  709.                           <label class="col-4 col-form-label">奥行き</label>
  710.                           <div class="col-8">
  711.                             <div class="form-group clearfix">
  712.                             {% set idx = 0 %}
  713.                             {% for pd in p_d %}
  714.                               {% if pd %}
  715.                               {% set idx = idx + 1 %}
  716.                               <div class="icheck-danger d-inline">
  717.                                 <input type="radio" name="pd" id="pd_{{ idx }}" value="{{ pd }}" {% if (mitsumori_json and mitsumori_json.pd == pd) or p_d|length == 1 %}checked{% endif %} onclick="mitsumori_simulation('pd','pd_{{ idx }}');"><label for="pd_{{ idx }}">{{ pd }}</label>
  718.                               </div>
  719.                               {% endif %}
  720.                             {% endfor %}
  721.                             </div>
  722.                           </div>
  723.                         </div>
  724.                         {% endif %}
  725.                         {% if p_h and p_h|length and p_h|join != "" %}
  726.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  727.                           <label class="col-4 col-form-label">高さ</label>
  728.                           <div class="col-8">
  729.                             <div class="form-group clearfix">
  730.                             {% set idx = 0 %}
  731.                             {% for ph in p_h %}
  732.                               {% if ph %}
  733.                               {% set idx = idx + 1 %}
  734.                               <div class="icheck-danger d-inline">
  735.                                 <input type="radio" name="ph" id="ph_{{ idx }}" value="{{ ph }}" {% if (mitsumori_json and mitsumori_json.ph == ph) or p_h|length == 1%}checked{% endif %} onclick="mitsumori_simulation('ph','ph_{{ idx }}');"><label for="ph_{{ idx }}">{{ ph }}</label>
  736.                               </div>
  737.                               {% endif %}
  738.                             {% endfor %}
  739.                             </div>
  740.                           </div>
  741.                         </div>
  742.                         {% endif %}
  743.                         {% if p_m and p_m|length and p_m|join != "" %}
  744.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  745.                           <label class="col-4 col-form-label">素材</label>
  746.                           <div class="col-8">
  747.                             <div class="form-group clearfix">
  748.                             {% set idx = 0 %}
  749.                             {% for pm in p_m %}
  750.                               {% if pm %}
  751.                               {% set idx = idx + 1 %}
  752.                               <div class="icheck-danger d-inline">
  753.                                 <input type="radio" name="pm" id="pm_{{ idx }}" value="{{ pm }}" {% if mitsumori_json and mitsumori_json.pm == pm or p_m|length == 1 %}checked{% endif %} onclick="mitsumori_simulation('pm','pm_{{ idx }}');"><label for="pm_{{ idx }}">{{ pm }}</label>
  754.                               </div>
  755.                               {% endif %}
  756.                             {% endfor %}
  757.                             </div>
  758.                           </div>
  759.                         </div>
  760.                         {% endif %}
  761.                         <!-- 1: 施工見積(通常) → 幅/奥行/高さ/素材/カラーは上部の共通ブロックで表示済み -->
  762.                         {% if ProductClass.SaleType.id == 1 %}
  763.                         {% endif %}
  764.                         <!-- 2: 施工見積(補助金・窓) -->
  765.                         {% if ProductClass.SaleType.id == 2 %}
  766.                             {# 窓サイズ(自由入力) #}
  767.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  768.                               <label class="col-4 col-form-label">窓サイズ</label>
  769.                               <div class="col-4">
  770.                                 <div class="input-group">
  771.                                   <span class="input-group-text">窓幅</span>
  772.                                   <input type="number" name="mado_w" id="mado_w" class="form-control" value="{{ mitsumori_json.mado_w|default('') }}" placeholder="例: 90" min="1" onchange="mitsumori_simulation('mado_w','mado_w');">
  773.                                   <span class="input-group-text">cm</span>
  774.                                 </div>
  775.                               </div>
  776.                               <div class="col-4">
  777.                                 <div class="input-group">
  778.                                   <span class="input-group-text">窓高さ</span>
  779.                                   <input type="number" name="mado_h" id="mado_h" class="form-control" value="{{ mitsumori_json.mado_h|default('') }}" placeholder="例: 110" min="1" onchange="mitsumori_simulation('mado_h','mado_h');">
  780.                                   <span class="input-group-text">cm</span>
  781.                                 </div>
  782.                               </div>
  783.                             </div>
  784.                             {# 窓タイプ(p_d データから選択肢を生成) #}
  785.                             {% if p_d and p_d|length and p_d|join != "" %}
  786.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  787.                               <label class="col-4 col-form-label">窓タイプ</label>
  788.                               <div class="col-8">
  789.                                 <div class="form-group clearfix">
  790.                                 {% set idx = 0 %}
  791.                                 {% for pd_val in p_d %}
  792.                                   {% if pd_val %}
  793.                                   {% set idx = idx + 1 %}
  794.                                   <div class="icheck-danger d-inline">
  795.                                     <input type="radio" name="mado_type" id="mado_type_{{ idx }}" value="{{ pd_val }}"
  796.                                       {% if (mitsumori_json and mitsumori_json.pd == pd_val) or (p_d|length == 1) %}checked{% endif %}
  797.                                       onclick="mitsumori_simulation('pd','mado_type_{{ idx }}');">
  798.                                     <label for="mado_type_{{ idx }}">{{ pd_val }}</label>
  799.                                   </div>
  800.                                   {% endif %}
  801.                                 {% endfor %}
  802.                                 </div>
  803.                               </div>
  804.                             </div>
  805.                             {% endif %}
  806.                             {# ガラスタイプ(p_m データから選択肢を生成) #}
  807.                             {% if p_m and p_m|length and p_m|join != "" %}
  808.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  809.                               <label class="col-4 col-form-label">ガラスタイプ</label>
  810.                               <div class="col-8">
  811.                                 <div class="form-group clearfix">
  812.                                 {% set idx = 0 %}
  813.                                 {% for pm_val in p_m %}
  814.                                   {% if pm_val %}
  815.                                   {% set idx = idx + 1 %}
  816.                                   <div class="icheck-danger d-inline">
  817.                                     <input type="radio" name="glass_type" id="glass_type_{{ idx }}" value="{{ pm_val }}"
  818.                                       {% if (mitsumori_json and mitsumori_json.pm == pm_val) or (p_m|length == 1) %}checked{% endif %}
  819.                                       onclick="mitsumori_simulation('pm','glass_type_{{ idx }}');">
  820.                                     <label for="glass_type_{{ idx }}">{{ pm_val }}</label>
  821.                                   </div>
  822.                                   {% endif %}
  823.                                 {% endfor %}
  824.                                 </div>
  825.                               </div>
  826.                             </div>
  827.                             {% endif %}
  828.                             {# セット数(プルダウン) → quantity に連動 #}
  829.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  830.                               <label class="col-4 col-form-label">セット数</label>
  831.                               <div class="col-8">
  832.                                 <select name="set_count" id="set_count" class="form-control" onchange="madosetSelect(this.value);">
  833.                                   {% for i in 1..20 %}
  834.                                     <option value="{{ i }}" {% if mitsumori_json and mitsumori_json.set_count == i %}selected{% endif %}>{{ i }} セット</option>
  835.                                   {% endfor %}
  836.                                 </select>
  837.                               </div>
  838.                             </div>
  839.                         {% endif %}
  840.                         <!-- 3: 施工見積(物置・ゴミステーション) -->
  841.                         {% if ProductClass.SaleType.id == 3 %}
  842.                             {# 幅・奥行き・高さ(p_w/p_d/p_h からラジオボタン生成) #}
  843.                             {% if p_w and p_w|length and p_w|join != "" %}
  844.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  845.                               <label class="col-4 col-form-label">幅</label>
  846.                               <div class="col-8">
  847.                                 <div class="form-group clearfix">
  848.                                 {% set idx = 0 %}
  849.                                 {% for pw_val in p_w %}{% if pw_val %}{% set idx = idx + 1 %}
  850.                                   <div class="icheck-danger d-inline">
  851.                                     <input type="radio" name="pw" id="pw3_{{ idx }}" value="{{ pw_val }}"
  852.                                       {% if (mitsumori_json and mitsumori_json.pw == pw_val) or p_w|length == 1 %}checked{% endif %}
  853.                                       onclick="mitsumori_simulation('pw','pw3_{{ idx }}');">
  854.                                     <label for="pw3_{{ idx }}">{{ pw_val }}</label>
  855.                                   </div>
  856.                                 {% endif %}{% endfor %}
  857.                                 </div>
  858.                               </div>
  859.                             </div>
  860.                             {% endif %}
  861.                             {% if p_d and p_d|length and p_d|join != "" %}
  862.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  863.                               <label class="col-4 col-form-label">奥行き</label>
  864.                               <div class="col-8">
  865.                                 <div class="form-group clearfix">
  866.                                 {% set idx = 0 %}
  867.                                 {% for pd_val in p_d %}{% if pd_val %}{% set idx = idx + 1 %}
  868.                                   <div class="icheck-danger d-inline">
  869.                                     <input type="radio" name="pd" id="pd3_{{ idx }}" value="{{ pd_val }}"
  870.                                       {% if (mitsumori_json and mitsumori_json.pd == pd_val) or p_d|length == 1 %}checked{% endif %}
  871.                                       onclick="mitsumori_simulation('pd','pd3_{{ idx }}');">
  872.                                     <label for="pd3_{{ idx }}">{{ pd_val }}</label>
  873.                                   </div>
  874.                                 {% endif %}{% endfor %}
  875.                                 </div>
  876.                               </div>
  877.                             </div>
  878.                             {% endif %}
  879.                             {% if p_h and p_h|length and p_h|join != "" %}
  880.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  881.                               <label class="col-4 col-form-label">高さ</label>
  882.                               <div class="col-8">
  883.                                 <div class="form-group clearfix">
  884.                                 {% set idx = 0 %}
  885.                                 {% for ph_val in p_h %}{% if ph_val %}{% set idx = idx + 1 %}
  886.                                   <div class="icheck-danger d-inline">
  887.                                     <input type="radio" name="ph" id="ph3_{{ idx }}" value="{{ ph_val }}"
  888.                                       {% if (mitsumori_json and mitsumori_json.ph == ph_val) or p_h|length == 1 %}checked{% endif %}
  889.                                       onclick="mitsumori_simulation('ph','ph3_{{ idx }}');">
  890.                                     <label for="ph3_{{ idx }}">{{ ph_val }}</label>
  891.                                   </div>
  892.                                 {% endif %}{% endfor %}
  893.                                 </div>
  894.                               </div>
  895.                             </div>
  896.                             {% endif %}
  897.                             {# 棚タイプ(p_m データから選択肢を生成) #}
  898.                             {% if p_m and p_m|length and p_m|join != "" %}
  899.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  900.                               <label class="col-4 col-form-label">棚タイプ<br><small class="text-muted">(間仕切り仕様)</small></label>
  901.                               <div class="col-8">
  902.                                 <div class="form-group clearfix">
  903.                                 {% set idx = 0 %}
  904.                                 {% for pm_val in p_m %}{% if pm_val %}{% set idx = idx + 1 %}
  905.                                   <div class="icheck-danger d-inline">
  906.                                     <input type="radio" name="pm" id="pm3_{{ idx }}" value="{{ pm_val }}"
  907.                                       {% if (mitsumori_json and mitsumori_json.pm == pm_val) or p_m|length == 1 %}checked{% endif %}
  908.                                       onclick="mitsumori_simulation('pm','pm3_{{ idx }}');">
  909.                                     <label for="pm3_{{ idx }}">{{ pm_val }}</label>
  910.                                   </div>
  911.                                 {% endif %}{% endfor %}
  912.                                 </div>
  913.                               </div>
  914.                             </div>
  915.                             {% endif %}
  916.                             {# カラー(共通の color データ使用) #}
  917.                             {% if color and color|length %}
  918.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  919.                               <label class="col-4 col-form-label">カラー</label>
  920.                               <div class="col-8">
  921.                                 <div class="form-group clearfix">
  922.                                 {% set idx = 0 %}
  923.                                 {% for cc in color %}{% if cc and cc['name'] %}{% set idx = idx + 1 %}
  924.                                   <div class="icheck-danger d-inline">
  925.                                     <input type="radio" name="color3" id="cc3_{{ idx }}" value="{{ cc['name'] }}"
  926.                                       {% if (mitsumori_json and mitsumori_json.pc == cc['name']) or color|length == 1 %}checked{% endif %}
  927.                                       onclick="mitsumori_simulation('pc','cc3_{{ idx }}');">
  928.                                     <label for="cc3_{{ idx }}">{{ cc['name'] }}</label>
  929.                                   </div>
  930.                                 {% endif %}{% endfor %}
  931.                                 </div>
  932.                               </div>
  933.                             </div>
  934.                             {% endif %}
  935.                             {# 台数 #}
  936.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  937.                               <label class="col-4 col-form-label">台数</label>
  938.                               <div class="col-4">
  939.                                 <div class="input-group mb-3">
  940.                                   <input type="number" name="daisu" id="daisu" class="form-control" value="{{ mitsumori_json.daisu|default('1') }}" min="1" max="10" onchange="mitsumori_simulation('daisu','daisu');">
  941.                                   <span class="input-group-text">台</span>
  942.                                 </div>
  943.                               </div>
  944.                               <div class="col-4">
  945.                                 <button type="button" class="btn btn-info" onclick="daisu(+1);">+</button>
  946.                                 <button type="button" class="btn btn-danger" onclick="daisu(-1);">ー</button>
  947.                               </div>
  948.                             </div>
  949.                         {% endif %}
  950.                         <!-- 4: 施工見積(フェンス・組み立て式) -->
  951.                         {% if ProductClass.SaleType.id == 4 %}
  952.                             {# 枚数 #}
  953.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  954.                               <label class="col-4 col-form-label">枚数</label>
  955.                               <div class="col-4 mb-3">
  956.                                 <div class="input-group">
  957.                                   <input type="number" name="maisu" id="maisu" class="form-control" value="{{ mitsumori_json.maisu|default('3') }}" min="3" max="20" onchange="mitsumori_simulation('maisu','maisu');">
  958.                                   <span class="input-group-text">枚</span>
  959.                                 </div>
  960.                               </div>
  961.                               <div class="col-4">
  962.                                 <button type="button" class="btn btn-info" onclick="maisu(+1);">+</button>
  963.                                 <button type="button" class="btn btn-danger" onclick="maisu(-1);">ー</button>
  964.                               </div>
  965.                             </div>
  966.                         {% endif %}
  967.                         <!-- 5: 施工見積(ウッドデッキ・タイルデッキ) -->
  968.                         {% if ProductClass.SaleType.id == 5 %}
  969.                             {# 施工面積(㎡ 直接入力) #}
  970.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  971.                               <label class="col-4 col-form-label">施工面積</label>
  972.                               <div class="col-8">
  973.                                 <div class="input-group">
  974.                                   <input type="number" name="area" id="area"
  975.                                     class="form-control"
  976.                                     value="{{ mitsumori_json.area|default('') }}"
  977.                                     placeholder="例: 7.5"
  978.                                     min="0.1" step="0.1"
  979.                                     onchange="mitsumori_simulation('area','area');">
  980.                                   <span class="input-group-text">㎡</span>
  981.                                 </div>
  982.                                 <small class="text-muted">幅(cm) × 奥行き(cm) ÷ 10000 = ㎡</small>
  983.                               </div>
  984.                             </div>
  985.                             {# ステップの有無 #}
  986.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  987.                               <label class="col-4 col-form-label">ステップ</label>
  988.                               <div class="col-8">
  989.                                 <div class="form-group clearfix">
  990.                                   <div class="icheck-danger d-inline">
  991.                                     <input type="radio" name="deck_step" id="deck_step_yes" value="必要"
  992.                                       {% if mitsumori_json and mitsumori_json.deck_step == '必要' %}checked{% endif %}
  993.                                       onclick="mitsumori_simulation('op0','deck_step_yes');">
  994.                                     <label for="deck_step_yes">必要</label>
  995.                                   </div>
  996.                                   <div class="icheck-danger d-inline">
  997.                                     <input type="radio" name="deck_step" id="deck_step_no" value="不要"
  998.                                       {% if not mitsumori_json or mitsumori_json.deck_step == '不要' or not mitsumori_json.deck_step %}checked{% endif %}
  999.                                       onclick="mitsumori_simulation('op0','deck_step_no');">
  1000.                                     <label for="deck_step_no">不要</label>
  1001.                                   </div>
  1002.                                 </div>
  1003.                               </div>
  1004.                             </div>
  1005.                             {# ウッドデッキフェンスの有無 #}
  1006.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  1007.                               <label class="col-4 col-form-label">デッキフェンス</label>
  1008.                               <div class="col-8">
  1009.                                 <div class="form-group clearfix">
  1010.                                   <div class="icheck-danger d-inline">
  1011.                                     <input type="radio" name="deck_fence" id="deck_fence_yes" value="必要"
  1012.                                       {% if mitsumori_json and mitsumori_json.deck_fence == '必要' %}checked{% endif %}
  1013.                                       onclick="mitsumori_simulation('op1','deck_fence_yes');">
  1014.                                     <label for="deck_fence_yes">必要</label>
  1015.                                   </div>
  1016.                                   <div class="icheck-danger d-inline">
  1017.                                     <input type="radio" name="deck_fence" id="deck_fence_no" value="不要"
  1018.                                       {% if not mitsumori_json or mitsumori_json.deck_fence == '不要' or not mitsumori_json.deck_fence %}checked{% endif %}
  1019.                                       onclick="mitsumori_simulation('op1','deck_fence_no');">
  1020.                                     <label for="deck_fence_no">不要</label>
  1021.                                   </div>
  1022.                                 </div>
  1023.                               </div>
  1024.                             </div>
  1025.                         {% endif %}
  1026.                         <!-- 6: 施工見積(芝生・枚数・数量買い) -->
  1027.                         {% if ProductClass.SaleType.id == 6 %}
  1028.                             {# 規格(p_m データ → 素材から抽出) #}
  1029.                             {% if p_m and p_m|length and p_m|join != "" %}
  1030.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  1031.                               <label class="col-4 col-form-label">規格</label>
  1032.                               <div class="col-8">
  1033.                                 <div class="form-group clearfix">
  1034.                                 {% set idx = 0 %}
  1035.                                 {% for pm_val in p_m %}{% if pm_val %}{% set idx = idx + 1 %}
  1036.                                   <div class="icheck-danger d-inline">
  1037.                                     <input type="radio" name="pm" id="pm6_{{ idx }}" value="{{ pm_val }}"
  1038.                                       {% if (mitsumori_json and mitsumori_json.pm == pm_val) or p_m|length == 1 %}checked{% endif %}
  1039.                                       onclick="mitsumori_simulation('pm','pm6_{{ idx }}');">
  1040.                                     <label for="pm6_{{ idx }}">{{ pm_val }}</label>
  1041.                                   </div>
  1042.                                 {% endif %}{% endfor %}
  1043.                                 </div>
  1044.                               </div>
  1045.                             </div>
  1046.                             {% endif %}
  1047.                             {# 芝の長さ(p_w データ → 幅から抽出) #}
  1048.                             {% if p_w and p_w|length and p_w|join != "" %}
  1049.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  1050.                               <label class="col-4 col-form-label">芝の長さ</label>
  1051.                               <div class="col-8">
  1052.                                 <div class="form-group clearfix">
  1053.                                 {% set idx = 0 %}
  1054.                                 {% for pw_val in p_w %}{% if pw_val %}{% set idx = idx + 1 %}
  1055.                                   <div class="icheck-danger d-inline">
  1056.                                     <input type="radio" name="pw" id="pw6_{{ idx }}" value="{{ pw_val }}"
  1057.                                       {% if (mitsumori_json and mitsumori_json.pw == pw_val) or p_w|length == 1 %}checked{% endif %}
  1058.                                       onclick="mitsumori_simulation('pw','pw6_{{ idx }}');">
  1059.                                     <label for="pw6_{{ idx }}">{{ pw_val }}</label>
  1060.                                   </div>
  1061.                                 {% endif %}{% endfor %}
  1062.                                 </div>
  1063.                               </div>
  1064.                             </div>
  1065.                             {% endif %}
  1066.                             {# 施工面積(㎡ 自由入力) #}
  1067.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  1068.                               <label class="col-4 col-form-label">施工面積</label>
  1069.                               <div class="col-8">
  1070.                                 <div class="input-group">
  1071.                                   <input type="number" name="area" id="area"
  1072.                                     class="form-control"
  1073.                                     value="{{ mitsumori_json.area|default('') }}"
  1074.                                     placeholder="例: 10.5"
  1075.                                     min="0.1" step="0.1"
  1076.                                     onchange="mitsumori_simulation('area','area');">
  1077.                                   <span class="input-group-text">平米</span>
  1078.                                 </div>
  1079.                               </div>
  1080.                             </div>
  1081.                         {% endif %}
  1082.                         <!-- 9: 商品のみ購入 -->
  1083.                         {% if ProductClass.SaleType.id == 9 %}
  1084.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  1085.                               <label class="col-4 col-form-label">数量</label>
  1086.                               <div class="col-4">
  1087.                                 <div class="input-group mb-3">
  1088.                                   <input type="number" name="quantity_only" id="quantity_only" class="form-control" value="1" min="1" onchange="$('#quantity').val(this.value);">
  1089.                                   <span class="input-group-text">個</span>
  1090.                                 </div>
  1091.                               </div>
  1092.                               <div class="col-4">
  1093.                                 <button type="button" class="btn btn-info" onclick="quantityOnly(+1);">+</button>
  1094.                                 <button type="button" class="btn btn-danger" onclick="quantityOnly(-1);">ー</button>
  1095.                               </div>
  1096.                             </div>
  1097.                         {% endif %}
  1098.                         <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">取り付け工事のご希望に関してお答えください。</label></div>
  1099.                         {% for i in 0..10 %}
  1100.                             {% if op and op|length >= i+1 %}
  1101.                             {% if op[i]['name'] %}
  1102.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  1103.                               <label class="col-4 col-form-label">{{ op[i]['name'] }}</label>
  1104.                               <div class="col-8">
  1105.                                 {{ op[i]['comment'] }}
  1106.                                 <div class="form-group clearfix">
  1107.                                   <div class="icheck-danger d-inline">
  1108.                                     <input type="radio" name="op{{ i }}" id="op{{ i }}_1" value="{{ op[i]['on'] }}" {% if mitsumori_json and mitsumori_json.op[i] == op[i]['on'] %}checked{% endif %} onclick="mitsumori_simulation('op{{ i }}','op{{ i }}_1');"><label for="op{{ i }}_1">{{ op[i]['on'] }}</label>
  1109.                                   </div>
  1110.                                 </div>
  1111.                                 <div class="form-group clearfix">
  1112.                                   <div class="icheck-danger d-inline">
  1113.                                     <input type="radio" name="op{{ i }}" id="op{{ i }}_2" value="{{ op[i]['off'] }}" {% if mitsumori_json and mitsumori_json.op[i] == op[i]['off'] %}checked{% endif %} onclick="mitsumori_simulation('op{{ i }}','op{{ i }}_2');"><label for="op{{ i }}_2">{{ op[i]['off'] }}</label>
  1114.                                   </div>
  1115.                                 </div>
  1116.                               </div>
  1117.                             </div>
  1118.                             {% endif %}
  1119.                             {% endif %}
  1120.                         {% endfor %}
  1121.                       </div>
  1122.                       <!-- /.card-body -->
  1123.                     </div>
  1124.                     <form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
  1125.                         {% if Product.stock_find %}
  1126.                             <div class="ec-productRole__actions">
  1127.                                 {% if form.classcategory_id1 is defined %}
  1128.                                     <div class="ec-select">
  1129.                                         {{ form_row(form.classcategory_id1) }}
  1130.                                         {{ form_errors(form.classcategory_id1) }}
  1131.                                     </div>
  1132.                                     {% if form.classcategory_id2 is defined %}
  1133.                                         <div class="ec-select">
  1134.                                             {{ form_row(form.classcategory_id2) }}
  1135.                                             {{ form_errors(form.classcategory_id2) }}
  1136.                                         </div>
  1137.                                     {% endif %}
  1138.                                 {% endif %}
  1139.                                 <div class="ec-numberInput">
  1140.                                     {{ form_widget(form.quantity, { type: 'hidden' }) }}
  1141.                                     {{ form_errors(form.quantity) }}
  1142.                                 </div>
  1143.                             </div>
  1144.                         {% else %}
  1145.                             <div class="ec-productRole__btn">
  1146.                                 <button type="button" class="ec-blockBtn--action" disabled="disabled">
  1147.                                     {{ 'ただいま品切れ中です。'|trans }}
  1148.                                 </button>
  1149.                             </div>
  1150.                         {% endif %}
  1151.                         <div class="ec-productRole__btn mt-3">
  1152.                            <button type="submit" id="cart_btn" class="ec-blockBtn--action add-cart">施工検討リストに入れる</button>
  1153.                         </div>
  1154.                         {{ form_rest(form) }}
  1155.                     </form>
  1156.                     <div class="ec-modal">
  1157.                         <div class="ec-modal-overlay">
  1158.                             <div class="ec-modal-wrap">
  1159.                                 <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  1160.                                 <div id="ec-modal-header" class="text-center">{{ '施工検討リストに追加しました。'|trans }}</div>
  1161.                                 <div class="ec-modal-box">
  1162.                                     <div class="ec-role">
  1163.                                         <span class="ec-inlineBtn--cancel">{{ '商品検索を続ける'|trans }}</span>
  1164.                                         <a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ '施工検討リストへ進む'|trans }}</a>
  1165.                                     </div>
  1166.                                 </div>
  1167.                             </div>
  1168.                         </div>
  1169.                     </div>
  1170.                     <div class="ec-productRole__description">{{ Product.description_detail|raw|nl2br }}
  1171.                     </div>
  1172.                 </div>
  1173.                 <div class="card col-12 collapsed-card sticky-top float-right">
  1174.                     <div class="card-header">
  1175.                       <h3 class="card-title">現在のお見積り額</h3>
  1176.                       <div class="card-tools">
  1177.                         <span class="float-left" id="mitsumori_message">395000円</span>
  1178.                         <button type="button" class="btn btn-tool" data-card-widget="collapse">
  1179.                           <i class="fas fa-plus"></i>
  1180.                         </button>
  1181.                       </div>
  1182.                     </div>
  1183.                     <div class="card-body p-0">
  1184.                       <ul class="nav nav-pills flex-column">
  1185.                         <li class="nav-item active">
  1186.                           <a class="nav-link">
  1187.                             <i class="far fa-file-alt"></i> 合計(工事費・税込)
  1188.                             <span class="float-right" id="mitsumori_goukei">395,000円</span>
  1189.                           </a>
  1190.                         </li>
  1191.                         <li class="nav-item active">
  1192.                           <a class="nav-link">
  1193.                             <i class="far fa-file-alt"></i> 商品価格
  1194.                             <span class="float-right" id="mitsumori_price">307,008円</span>
  1195.                           </a>
  1196.                         </li>
  1197.                         <li class="nav-item">
  1198.                           <a class="nav-link">
  1199.                             &nbsp;&nbsp;<i class="far fa-file-alt"></i> カタログ価格
  1200.                             <span class="float-right" id="maker_price">479,700円</span>
  1201.                           </a>
  1202.                         </li>
  1203.                         <li class="nav-item">
  1204.                           <a class="nav-link">
  1205.                             &nbsp;&nbsp;<i class="far fa-file-alt"></i> お値引き
  1206.                             <span class="float-right" id="mitsumori_off">-172,692円</span>
  1207.                           </a>
  1208.                         </li>
  1209.                         <li class="nav-item">
  1210.                           <a class="nav-link">
  1211.                             <i class="far fa-file-alt"></i> 基本工事費
  1212.                             <span class="float-right" id="mitsumori_ct">53,250円</span>
  1213.                           </a>
  1214.                         </li>
  1215.                         <li class="nav-item">
  1216.                           <a class="nav-link">
  1217.                             <i class="far fa-file-alt"></i> 施工オプション
  1218.                             <span class="float-right"id="mitsumori_option">6,297円</span>
  1219.                           </a>
  1220.                         </li>
  1221.                       </ul>
  1222.                     </div>
  1223.                     <div class="card-footer">
  1224.                         <button type="button" id="mitsumori_btn" class="btn btn-info" data-toggle="modal" data-target="#modal-mitsumori">
  1225.                           見積書表示
  1226.                         </button>
  1227.                         <button type="submit" id="cart_btn2" class="btn btn-info add-cart">施工検討リストに入れる</button>
  1228.                     </div>
  1229.                 </div>
  1230.             </div>
  1231.         </div>
  1232.     </div>
  1233.   <div class="modal" id="modal-mitsumori">
  1234.     <div class="modal-dialog modal-mitsumori" style="max-width:1000px">
  1235.       <div class="modal-content">
  1236.         <div class="modal-header">
  1237.           <h4 class="modal-title">お見積書</h4>
  1238.           <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  1239.             <span aria-hidden="true">&times;</span>
  1240.           </button>
  1241.         </div>
  1242.         <div class="modal-body">
  1243.             <div class="invoice p-3 mb-5" style="max-width:1000px; margin:auto;">
  1244.               <!-- title row -->
  1245.               <div class="row">
  1246.                 <div class="col-12">
  1247.                   <h2>概算お見積書 
  1248.                     <small class="float-right" style="font-size:14px;">発行日: 2025/03/14</small>
  1249.                   </h2>
  1250.                 </div>
  1251.                 <!-- /.col -->
  1252.               </div>
  1253.               <!-- info row -->
  1254.               <div class="row invoice-info">
  1255.                 <div class="col-sm-8 invoice-col">
  1256.                   <h3>お客様</h3>
  1257.                   <span>下記の通り、お見積もり申し上げます。</span>
  1258.                   <br />
  1259.                   <br / >
  1260.                   <br />
  1261.                   <h2>お見積金額: <span id="mitsumori_kei">399,080円</span></h2>
  1262.                   <span>
  1263.                     <br/>
  1264.                     <br/>
  1265.                     <br/>
  1266.                     <br/>
  1267.                   </span>
  1268.                 </div>
  1269.                 <div class="col-sm-4 invoice-col">
  1270.                   <p>
  1271.                     <img alt="" src="/html/user_data/js/images/logo.png" style="width: 260px; max-width: 100%; max-height: 10mm;">
  1272.                   </p>
  1273.                   <p>有限会社プラス</p>
  1274.                   <p>〒400-0334</p>
  1275.                   <p>山梨県南アルプス市藤田1450番地2</p>
  1276.                   <p>TEL: 055-284-6480</p>
  1277.                   <img alt="" src="/html/user_data/js/images/seal.svg" style="z-index: 2; position: absolute; width: 21mm; left: 58mm; top: 36mm;">
  1278.                 </div>
  1279.                 <!-- /.col -->
  1280.                 <!-- /.col -->
  1281.               </div>
  1282.               <!-- /.row -->
  1283.               <!-- Table row -->
  1284.               <div class="row">
  1285.                 <div class="col-12 table-responsive">
  1286.                   <table class="table table-striped">
  1287.                     <thead>
  1288.                       <tr>
  1289.                         <th>項目</th>
  1290.                         <th>数量</th>
  1291.                         <th>単位</th>
  1292.                         <th>単価</th>
  1293.                         <th>小計</th>
  1294.                       </tr>
  1295.                     </thead>
  1296.                     <tbody>
  1297.                       <tr>
  1298.                         <td>プレーンルーフ 600タイプ 1台用 単体セット</td>
  1299.                         <td>1</td>
  1300.                         <td>式</td>
  1301.                         <td id="mitsumori_price_01">352,800</td>
  1302.                         <td id="mitsumori_price_02">352,800</td>
  1303.                       </tr>
  1304.                       <tr>
  1305.                         <td>基本工事費</td>
  1306.                         <td>1</td>
  1307.                         <td>式</td>
  1308.                         <td id="mitsumori_ct_01">10,000</td>
  1309.                         <td id="mitsumori_ct_02">10,000</td>
  1310.                       </tr>
  1311.                       <tr>
  1312.                         <td>残土・ガラ処理</td>
  1313.                         <td>1</td>
  1314.                         <td>式</td>
  1315.                         <td>0円</td>
  1316.                         <td></td>
  1317.                       </tr>
  1318.                       <tr>
  1319.                         <td> </td>
  1320.                         <td></td>
  1321.                         <td></td>
  1322.                         <td></td>
  1323.                         <td></td>
  1324.                       </tr>
  1325.                     </tbody>
  1326.                   </table>
  1327.                 </div>
  1328.                 <!-- /.col -->
  1329.               </div>
  1330.               <!-- /.row -->
  1331.               <div class="row">
  1332.                 <!-- accepted payments column -->
  1333.                 <div class="col-6">
  1334.                   <p class="lead">お支払い方法</p>
  1335.                   <p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">銀行振込、クレジットカード決済、PAYPAY決済
  1336.                     <br>銀行振込:山梨中央銀行 白根支店 普通口座 391402
  1337.                     <br>※商品代金と工事代金の総額が金100万円(税込)を超える場合、着手金として代金の半額をご契約後お支払いいただきます。 
  1338.                   </p>
  1339.                 </div>
  1340.                 <!-- /.col -->
  1341.                 <div class="col-6">
  1342.                   <div class="table-responsive">
  1343.                     <table class="table">
  1344.                       <tbody>
  1345.                         <tr>
  1346.                           <th style="width:50%">小計:</th>
  1347.                           <td id="mitsumori_shoukei">362,800</td>
  1348.                         </tr>
  1349.                         <tr>
  1350.                           <th>消費税 (10%)</th>
  1351.                           <td id="mitsumori_tax">36,280</td>
  1352.                         </tr>
  1353.                         <tr>
  1354.                           <th>合計:</th>
  1355.                           <td id="mitsumori_goukei_02">399,080</td>
  1356.                         </tr>
  1357.                       </tbody>
  1358.                     </table>
  1359.                   </div>
  1360.                 </div>
  1361.                 <!-- /.col -->
  1362.               </div>
  1363.               <!-- /.row -->
  1364.             </div>
  1365.         </div>
  1366.         <div class="modal-footer justify-content-between">
  1367.                   {# PDF出力: mitsumori_json を POST して PDF ダウンロード #}
  1368.                   <form method="post" action="{{ url('mitsumori_pdf') }}" target="_blank" id="pdf_download_form">
  1369.                     <input type="hidden" name="_token" value="{{ csrf_token('mitsumori_pdf') }}">
  1370.                     <input type="hidden" name="mitsumori_json" id="pdf_mitsumori_json">
  1371.                     <button type="submit" class="btn btn-primary float-right" style="margin-right: 5px;" onclick="syncPdfJson();">
  1372.                       <i class="fas fa-download"></i>PDF出力
  1373.                     </button>
  1374.                   </form>
  1375.                   <button type="submit" id="cart_btn3" class="btn btn-info add-cart">施工検討リストに入れる</button>
  1376.         </div>
  1377.       </div>
  1378.       <!-- /.modal-content -->
  1379.     </div>
  1380.     <!-- /.modal-dialog -->
  1381.   </div>
  1382.   <!-- /.modal -->
  1383. {% endblock %}