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

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.                 // 個数フォームのチェック
  183.                 if ($('#quantity').val() < 1) {
  184.                     $('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
  185.                     return true;
  186.                 } else {
  187.                     $('#quantity')[0].setCustomValidity('');
  188.                 }
  189.                 event.preventDefault();
  190.                 $form = $('#form1');
  191.                 $.ajax({
  192.                     url: $form.attr('action'),
  193.                     type: $form.attr('method'),
  194.                     data: $form.serialize(),
  195.                     dataType: 'json',
  196.                     beforeSend: function(xhr, settings) {
  197.                         // Buttonを無効にする
  198.                         $('.add-cart').prop('disabled', true);
  199.                     }
  200.                 }).done(function(data) {
  201.                     // レスポンス内のメッセージをalertで表示
  202.                     $.each(data.messages, function() {
  203.                         $('#ec-modal-header').text(this);
  204.                     });
  205.                     $('.ec-modal').show()
  206.                     // カートブロックを更新する
  207.                     $.ajax({
  208.                         url: "{{ url('block_cart') }}",
  209.                         type: 'GET',
  210.                         dataType: 'html'
  211.                     }).done(function(html) {
  212.                         $('.ec-headerRole__cart').html(html);
  213.                     });
  214.                 }).fail(function(data) {
  215.                     alert('{{ 'カートへの追加に失敗しました。'|trans }}');
  216.                 }).always(function(data) {
  217.                     // Buttonを有効にする
  218.                     $('.add-cart').prop('disabled', false);
  219.                 });
  220.             });
  221.         });
  222.         $('.ec-modal-wrap').on('click', function(e) {
  223.             // モーダル内の処理は外側にバブリングさせない
  224.             e.stopPropagation();
  225.         });
  226.         $('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
  227.             $('.ec-modal').hide()
  228.         });
  229.         var pw = "{% if mitsumori_json %}{{ mitsumori_json.pw }}{% endif %}";
  230.         var pd = "{% if mitsumori_json %}{{ mitsumori_json.pd }}{% endif %}";
  231.         var ph = "{% if mitsumori_json %}{{ mitsumori_json.ph }}{% endif %}";
  232.         var pm = "{% if mitsumori_json %}{{ mitsumori_json.pm }}{% endif %}";
  233.         var pc = "{% if mitsumori_json %}{{ mitsumori_json.pc }}{% endif %}";
  234.         var op0 = "{% if mitsumori_json %}{{ mitsumori_json.op[0] }}{% endif %}";
  235.         var op1 = "{% if mitsumori_json %}{{ mitsumori_json.op[1] }}{% endif %}";
  236.         var op2 = "{% if mitsumori_json %}{{ mitsumori_json.op[2] }}{% endif %}";
  237.         var op3 = "{% if mitsumori_json %}{{ mitsumori_json.op[3] }}{% endif %}";
  238.         var op4 = "{% if mitsumori_json %}{{ mitsumori_json.op[4] }}{% endif %}";
  239.         var op5 = "{% if mitsumori_json %}{{ mitsumori_json.op[5] }}{% endif %}";
  240.         var op6 = "{% if mitsumori_json %}{{ mitsumori_json.op[6] }}{% endif %}";
  241.         var op7 = "{% if mitsumori_json %}{{ mitsumori_json.op[7] }}{% endif %}";
  242.         var op8 = "{% if mitsumori_json %}{{ mitsumori_json.op[8] }}{% endif %}";
  243.         var op9 = "{% if mitsumori_json %}{{ mitsumori_json.op[9] }}{% endif %}";
  244.         var op10 = "{% if mitsumori_json %}{{ mitsumori_json.op[10] }}{% endif %}";
  245.         const formatter = new Intl.NumberFormat('ja-JP');
  246.         function cartbutton(option){
  247.             if(option == '商品購入のみ' || option == '商品取り付け工事も希望する'){
  248.                 if(option == '商品購入のみ'){
  249.                     $('#cart_btn').show();
  250.                 }else{
  251.                     $('#cart_btn').hide();
  252.                 }
  253.             }
  254.         }
  255.         function mitsumori_simulation(type , value_id){
  256.             var pp = {{ pp|raw }};
  257.             if(type == "pw"){
  258.                 pw = $('#'+value_id).val();
  259.             }
  260.             if(type == "pd"){
  261.                 pd = $('#'+value_id).val();
  262.             }
  263.             if(type == "ph"){
  264.                 ph = $('#'+value_id).val();
  265.             }
  266.             if(type == "pm"){
  267.                 pm = $('#'+value_id).val();
  268.             }
  269.             if(type == "pc"){
  270.                 pc = $('#'+value_id).val();
  271.             }
  272.             if(type == "op0"){ op0 = $('#'+value_id).val(); }
  273.             if(type == "op1"){ op1 = $('#'+value_id).val(); }
  274.             if(type == "op2"){ op2 = $('#'+value_id).val(); }
  275.             if(type == "op3"){ op3 = $('#'+value_id).val(); }
  276.             if(type == "op4"){ op4 = $('#'+value_id).val(); }
  277.             if(type == "op5"){ op5 = $('#'+value_id).val(); }
  278.             if(type == "op6"){ op6 = $('#'+value_id).val(); }
  279.             if(type == "op7"){ op7 = $('#'+value_id).val(); }
  280.             if(type == "op8"){ op8 = $('#'+value_id).val(); }
  281.             if(type == "op9"){ op9 = $('#'+value_id).val(); }
  282.             if(type == "op10"){ op10 = $('#'+value_id).val(); }
  283.             if(pm == ""){
  284.                 $('#mitsumori_message').text("素材を選択してください");
  285.             }
  286.             if(ph == ""){
  287.                 $('#mitsumori_message').text("高さを選択してください");
  288.             }
  289.             if(pd == ""){
  290.                 $('#mitsumori_message').text("奥行きを選択してください");
  291.             }
  292.             if(pw == ""){
  293.                 $('#mitsumori_message').text("幅を選択してください");
  294.             }
  295.             if(pc == ""){
  296.                 $('#mitsumori_message').text("カラーを選択してください");
  297.                 $('#mitsumori_btn').hide();
  298.                 $('#mitsumori_goukei').text("---円");
  299.                 $('#mitsumori_off').text("---円");
  300.                 $('#mitsumori_price').text("---円");
  301.                 $('#maker_price').text("---円");
  302.                 $('#mitsumori_ct').text("---円");
  303.                 $('#mitsumori_option').text("---円");
  304.             }
  305.             if(pw != "" && pd != "" && ph != "" && pm != "" && pc != ""){
  306.                 $('#mitsumori_btn').show();
  307.                 
  308.                 pp.forEach((el) => {
  309.                   if((pw == el.w || pw == "指定なし") && (pd == el.d || pd == "指定なし") && (ph == el.h || ph == "指定なし") && (pm == el.m || pm == "指定なし") && (pc == el.c || pc == "指定なし")){
  310.                     if(op0 == "商品購入のみ" || op1 == "商品購入のみ" || op2 == "商品購入のみ" || op3 == "商品購入のみ" || op4 == "商品購入のみ" 
  311.                         || op5 == "商品購入のみ" || op6 == "商品購入のみ" || op7 == "商品購入のみ" || op8 == "商品購入のみ" || op9 == "商品購入のみ"){
  312.                           $('#mitsumori_message').text(formatter.format(parseInt(el.price)) + "円");
  313.                           $('#mitsumori_goukei').text(formatter.format(parseInt(el.price)) + "円");
  314.                           $('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");
  315.                           $('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");
  316.                           $('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");
  317.                           $('#mitsumori_ct').text("0円");
  318.                           $('#mitsumori_option').text("0円");
  319.                           $('#mitsumori_kei').text(formatter.format(parseInt(el.price)) + "円");
  320.                           $('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");
  321.                           $('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");
  322.                           $('#mitsumori_ct_01').text("0円");
  323.                           $('#mitsumori_ct_02').text("0円");
  324.                           $('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price)) + "円");
  325.                         
  326.                         mitsumori_goukei = (parseInt(el.price));
  327.                         shoukei = mitsumori_goukei / 1.1;
  328.                         tax = parseInt(mitsumori_goukei - shoukei);
  329.                           $('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");
  330.                           $('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");
  331.                     }else{
  332.                           $('#mitsumori_message').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  333.                           $('#mitsumori_goukei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  334.                           $('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");
  335.                           $('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");
  336.                           $('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");
  337.                           $('#mitsumori_ct').text(formatter.format(parseInt(el.ct)) + "円");
  338.                           $('#mitsumori_option').text("0円");
  339.                           $('#mitsumori_kei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  340.                           $('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");
  341.                           $('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");
  342.                           $('#mitsumori_ct_01').text(formatter.format(parseInt(el.ct)) + "円");
  343.                           $('#mitsumori_ct_02').text(formatter.format(parseInt(el.ct)) + "円");
  344.                           $('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
  345.                         mitsumori_goukei = (parseInt(el.price) + parseInt(el.ct));
  346.                         shoukei = mitsumori_goukei / 1.1;
  347.                         tax = parseInt(mitsumori_goukei - shoukei);
  348.                           $('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");
  349.                           $('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");
  350.                     }
  351.                   }
  352.                 });    
  353.                 var mitsumori_json = { "mitsumori_goukei": $('#mitsumori_goukei').text(),
  354.                                         "mitsumori_goukei_02": $('#mitsumori_goukei_02').text(),
  355.                                         "mitsumori_price": $('#mitsumori_price').text(),
  356.                                         "maker_price": $('#maker_price').text(),
  357.                                         "mitsumori_off": $('#mitsumori_off').text(),
  358.                                         "mitsumori_ct": $('#mitsumori_ct').text(),
  359.                                         "mitsumori_option": $('#mitsumori_option').text(),
  360.                                         "product_id": {{ Product.id }},
  361.                                         "pw": pw,
  362.                                         "pd": pd,
  363.                                         "ph": ph,
  364.                                         "pm": pm,
  365.                                         "pc": pc,
  366.                                         "op": [op0,op1,op2,op3,op4,op5,op6,op7,op8,op9,op10] };
  367.                 $('#mitsumori_json').val(JSON.stringify(mitsumori_json));
  368.                 
  369.             }
  370.             
  371.         }
  372.         {% if color and color|length == 1 %}
  373.             pc = "指定なし";
  374.             {% for cc in color %}{% if cc and cc['name'] %} pc = "{{ cc['name'] }}"; {% endif %}{% endfor %}
  375.         {% endif %}
  376.         {% if p_w and (p_w|length == 1 or p_w|join == "") %}
  377.             pw = "指定なし";
  378.             {% for pw in p_w %}{% if pw %} pw = "{{ pw }}"; {% endif %}{% endfor %}
  379.         {% endif %}
  380.         {% if p_d and (p_d|length == 1 or p_d|join == "") %}
  381.             pd = "指定なし";
  382.             {% for pd in p_d %}{% if pd %} pd = "{{ pd }}"; {% endif %}{% endfor %}
  383.         {% endif %}
  384.         {% if p_h and (p_h|length == 1 or p_h|join == "") %}
  385.             ph = "指定なし";
  386.             {% for ph in p_h %}{% if ph %} ph = "{{ ph }}"; {% endif %}{% endfor %}
  387.         {% endif %}
  388.         {% if p_m and (p_m|length == 1 or p_m|join == "") %}
  389.             pm = "指定なし";
  390.             {% for pm in p_m %}{% if pm %} pm = "{{ pm }}"; {% endif %}{% endfor %}
  391.         {% endif %}
  392.         mitsumori_simulation("","");
  393.         function contact_form(product_id){
  394.             $('#form1').attr('action', '{{ url('contact', {product:Product.id}) }}');
  395.             $('#form1').submit();
  396.         }
  397.         function maisu(mai){
  398.             $('#maisu').val(parseInt($('#maisu').val()) + mai);
  399.             if(parseInt($('#maisu').val()) < 3){ $('#maisu').val(3); }
  400.             if(parseInt($('#maisu').val()) > 20){ $('#maisu').val(20); }
  401.             $('#quantity').val($('#maisu').val());
  402.         }
  403.         function madoset(mai){
  404.             $('#set').val(parseInt($('#set').val()) + mai);
  405.             if(parseInt($('#set').val()) < 1){ $('#set').val(1); }
  406.             if(parseInt($('#set').val()) > 20){ $('#set').val(20); }
  407.             $('#quantity').val($('#set').val());
  408.         }
  409.         function heibei(bei){
  410.             $('#heibei').val(parseInt($('#heibei').val()) + dai);
  411.             if(parseInt($('#heibei').val()) < 1){ $('#heibei').val(1); }
  412.             if(parseInt($('#heibei').val()) > 100){ $('#heibei').val(100); }
  413.             $('#quantity').val($('#heibei').val());
  414.         }
  415.         function daisu(dai){
  416.             $('#daisu').val(parseInt($('#daisu').val()) + dai);
  417.             if(parseInt($('#daisu').val()) < 1){ $('#daisu').val(1); }
  418.             if(parseInt($('#daisu').val()) > 10){ $('#daisu').val(10); }
  419.             $('#quantity').val($('#daisu').val());
  420.         }
  421.     </script>
  422.     <script type="application/ld+json">
  423.     {
  424.         "@context": "https://schema.org/",
  425.         "@type": "Product",
  426.         "name": "{{ Product.name }}",
  427.         "image": [
  428.             {% for img in Product.ProductImage %}
  429.                 "{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
  430.             {% else %}
  431.                 "{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
  432.             {% endfor %}
  433.         ],
  434.         "description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
  435.         {% if Product.code_min %}
  436.         "sku": "{{ Product.code_min }}",
  437.         {% endif %}
  438.         "offers": {
  439.             "@type": "Offer",
  440.             "url": "{{ url('product_detail', {'id': Product.id}) }}",
  441.             "priceCurrency": "{{ eccube_config.currency }}",
  442.             "price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
  443.             "availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
  444.         }
  445.     }
  446.     </script>
  447. {% endblock %}
  448. {% block main %}
  449.     <div class="ec-productRole" style="margin-top:20px;">
  450.         <div class="ec-grid2">
  451.             <div class="ec-grid2__cell">
  452.                 <div class="ec-sliderItemRole">
  453.                     {# 商品名 #}
  454.                     <div class="ec-productRole__title">
  455.                         <h2 class="ec-headingTitle">{{ Product.name }}</h2>
  456.                     </div>
  457.                     {% if BaseInfo.option_favorite_product %}
  458.                      <div style="position:relative;top: 20px;left: 10px;z-index:100;">
  459.                         {% if is_favorite == false %}
  460.                         <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  461.                            <button type="submit" id="favorite" class="favorite">&#9825;</button>
  462.                         </form>
  463.                         {% else %}
  464.                         <form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
  465.                            <button type="submit" id="favorite" class="favorite" style="color:red;">&#9829;</button>
  466.                         </form>
  467.                         {% endif %}
  468.                      </div>
  469.                     {% endif %}
  470.                     <div class="item_visual">
  471.                         {% for ProductImage in Product.ProductImage %}
  472.                             <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>
  473.                         {% else %}
  474.                             <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>
  475.                         {% endfor %}
  476.                     </div>
  477.                     <div class="item_nav">
  478.                         {% for ProductImage in Product.ProductImage %}
  479.                             <div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="80" height="80" loading="lazy"></div>
  480.                         {% endfor %}
  481.                     </div>
  482.                 </div>
  483.             </div>
  484.             <div class="ec-grid2__cell2">
  485.                 <div class="ec-productRole__profile" >
  486.                     {# 関連カテゴリ #}
  487.                     {% if Product.ProductCategories is not empty %}
  488.                         <div class="ec-productRole__category" style="padding:10px 0;">
  489.                             {% for ProductCategory in Product.ProductCategories %}
  490.                                 <ul>
  491.                                     <li>
  492.                                         {% for Category in ProductCategory.Category.path %}
  493.                                             <a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
  494.                                             <span>></span>{% endif -%}
  495.                                         {% endfor %}
  496.                                     </li>
  497.                                 </ul>
  498.                             {% endfor %}
  499.                         </div>
  500.                     {% endif %}
  501.                     {# 販売価格 #}
  502.                     <div class="ec-productRole__price">
  503.                         <span style="color:black;font-size:15px;">工事費込み価格</span>
  504.                         {% if Product.hasProductClass -%}
  505.                             {% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
  506.                                 <div class="ec-price">
  507.                                     <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>
  508.                                     <span class="ec-price__tax">({{ '税込'|trans }})~</span>
  509.                                 </div>
  510.                             {% else %}
  511.                                 <div class="ec-price">
  512.                                     <span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
  513.                                     <span class="ec-price__tax">({{ '税込'|trans }})</span>
  514.                                 </div>
  515.                             {% endif %}
  516.                         {% else %}
  517.                             <div class="ec-price">
  518.                                 <span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
  519.                                     <span class="ec-price__tax">({{ '税込'|trans }})~</span>
  520.                             </div>
  521.                         {% endif %}
  522.                     </div>
  523.                     {# タグ #}
  524.                     <ul class="ec-productRole__tags">
  525.                         {% for Tag in Product.Tags %}
  526.                             <li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
  527.                         {% endfor %}
  528.                     </ul>
  529.                     {# 商品コード #}
  530.                     {% if Product.code_min is not empty %}
  531.                         <div class="ec-productRole__code">
  532.                             {{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
  533.                         </div>
  534.                     {% endif %}
  535.                     <div class="ec-productRole__description">
  536.                         <div class="ec-rectHeading">
  537.                             <h4>製品情報</h4>
  538.                         </div>
  539.                         {{ Product.sales_infomation|raw|nl2br }}
  540.                     </div>
  541.                     <div class="card card-danger" style="clear:both;margin:1px;">
  542.                       <div class="card-header">
  543.                         <h3 class="card-title">見積シミュレーション</h3>
  544.                       </div>
  545.                       <div class="card-body p-2">
  546.                         <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のタイプを選択してください。</label></div>
  547.                         {% set type1 = getProduct_field(Product.id,"related_name1") %}
  548.                         {% if type1 and related_product1 and related_product1|length %}
  549.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  550.                           <label class="col-4 col-form-label mt-2">{{ type1 }}</label>
  551.                           <div class="col-8 mt-2">
  552.                             <div class="form-group clearfix">
  553.                               {% for rp_id, rp_name in related_product1 %}
  554.                               <div class="icheck-danger d-inline">
  555.                                 <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>
  556.                               </div>
  557.                               {% endfor %}
  558.                             </div>
  559.                           </div>
  560.                         </div>
  561.                         {% endif %}
  562.                         {% set type2 = getProduct_field(Product.id,"related_name2") %}
  563.                         {% if type2 and related_product2 and related_product2|length %}
  564.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  565.                           <label class="col-4 col-form-label mt-2">{{ type2 }}</label>
  566.                           <div class="col-8 mt-2">
  567.                             <div class="form-group clearfix">
  568.                               {% for rp_id, rp_name in related_product2 %}
  569.                               <div class="icheck-danger d-inline">
  570.                                 <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>
  571.                               </div>
  572.                               {% endfor %}
  573.                             </div>
  574.                           </div>
  575.                         </div>
  576.                         {% endif %}
  577.                         {% set type3 = getProduct_field(Product.id,"related_name3") %}
  578.                         {% if type3 and related_product3 and related_product3|length %}
  579.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  580.                           <label class="col-4 col-form-label mt-2">{{ type3 }}</label>
  581.                           <div class="col-8 mt-2">
  582.                             <div class="form-group clearfix">
  583.                               {% for rp_id, rp_name in related_product3 %}
  584.                               <div class="icheck-danger d-inline">
  585.                                 <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>
  586.                               </div>
  587.                               {% endfor %}
  588.                             </div>
  589.                           </div>
  590.                         </div>
  591.                         {% endif %}
  592.                         <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のオプションを選択してください。</label></div>
  593.                         {% if color and color|length %}
  594.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  595.                           <label class="col-4 col-form-label mt-2">カラー</label>
  596.                           <div class="col-8 mt-2">
  597.                             <div class="form-group clearfix">
  598.                             {% set idx = 0 %}
  599.                             {% for cc in color %}
  600.                               {% if cc and cc['name'] %}
  601.                               {% set idx = idx + 1 %}
  602.                               <div class="icheck-danger d-inline">
  603.                                 <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>
  604.                               </div>
  605.                               {% endif %}
  606.                             {% endfor %}
  607.                             </div>
  608.                           </div>
  609.                         </div>
  610.                         {% endif %}
  611.                         {% if p_w and p_w|length and p_w|join != "" %}
  612.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  613.                           <label class="col-4 col-form-label">幅</label>
  614.                           <div class="col-8">
  615.                             <div class="form-group clearfix">
  616.                             {% set idx = 0 %}
  617.                             {% for pw in p_w %}
  618.                               {% if pw %}
  619.                               {% set idx = idx + 1 %}
  620.                               <div class="icheck-danger d-inline">
  621.                                 <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>
  622.                               </div>
  623.                               {% endif %}
  624.                             {% endfor %}
  625.                             </div>
  626.                           </div>
  627.                         </div>
  628.                         {% endif %}
  629.                         {% if p_d and p_d|length and p_d|join != "" %}
  630.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  631.                           <label class="col-4 col-form-label">奥行き</label>
  632.                           <div class="col-8">
  633.                             <div class="form-group clearfix">
  634.                             {% set idx = 0 %}
  635.                             {% for pd in p_d %}
  636.                               {% if pd %}
  637.                               {% set idx = idx + 1 %}
  638.                               <div class="icheck-danger d-inline">
  639.                                 <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>
  640.                               </div>
  641.                               {% endif %}
  642.                             {% endfor %}
  643.                             </div>
  644.                           </div>
  645.                         </div>
  646.                         {% endif %}
  647.                         {% if p_h and p_h|length and p_h|join != "" %}
  648.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  649.                           <label class="col-4 col-form-label">高さ</label>
  650.                           <div class="col-8">
  651.                             <div class="form-group clearfix">
  652.                             {% set idx = 0 %}
  653.                             {% for ph in p_h %}
  654.                               {% if ph %}
  655.                               {% set idx = idx + 1 %}
  656.                               <div class="icheck-danger d-inline">
  657.                                 <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>
  658.                               </div>
  659.                               {% endif %}
  660.                             {% endfor %}
  661.                             </div>
  662.                           </div>
  663.                         </div>
  664.                         {% endif %}
  665.                         {% if p_m and p_m|length and p_m|join != "" %}
  666.                         <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  667.                           <label class="col-4 col-form-label">素材</label>
  668.                           <div class="col-8">
  669.                             <div class="form-group clearfix">
  670.                             {% set idx = 0 %}
  671.                             {% for pm in p_m %}
  672.                               {% if pm %}
  673.                               {% set idx = idx + 1 %}
  674.                               <div class="icheck-danger d-inline">
  675.                                 <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>
  676.                               </div>
  677.                               {% endif %}
  678.                             {% endfor %}
  679.                             </div>
  680.                           </div>
  681.                         </div>
  682.                         {% endif %}
  683.                         <!-- 1: 施工見積(通常)-->
  684.                         {% if ProductClass.SaleType.id == 1 %}
  685.                         {% endif %}
  686.                         <!-- 2: 施工見積(補助金・窓)-->
  687.                         {% if ProductClass.SaleType.id == 2 %}
  688.                             <!-- 幅・高さの数値指定 -->
  689.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  690.                               <label class="col-4 col-form-label">窓枠</label>
  691.                               <div class="col-4">
  692.                                 <div class="input-group">
  693.                                    <span class="input-group-text">高さ</span><input type="text" name="takasa" id="takasa" class="form-control" value="1" onchange="mitsumori_simulation('takasa','takasa');" /><span class="input-group-text">cm</span>
  694.                                 </div>
  695.                               </div>
  696.                               <div class="col-4">
  697.                                 <div class="input-group mb-3">
  698.                                    <span class="input-group-text">横幅</span><input type="text" name="yokohaba" id="yokohaba" class="form-control" value="1" onchange="mitsumori_simulation('yokohaba','yokohaba');" /><span class="input-group-text">cm</span>
  699.                                 </div>
  700.                               </div>
  701.                             </div>
  702.                             <!-- 枚数(入力)の指定 -->
  703.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  704.                               <label class="col-4 col-form-label">セット数</label>
  705.                               <div class="col-4 mb-3">
  706.                                 <div class="input-group">
  707.                                    <input type="text" name="set" id="set" class="form-control" value="1" onchange="mitsumori_simulation('set','set');" /><span class="input-group-text">セット</span>
  708.                                 </div>
  709.                               </div>
  710.                               <div class="col-4">
  711.                                 <button type="button" id="op_btn_1" class="btn btn-info" onclick="madoset(+1);">+</button>
  712.                                 <button type="button" id="op_btn_2" class="btn btn-danger" onclick="madoset(-1);">ー</button>
  713.                               </div>
  714.                             
  715.                         {% endif %}
  716.                         <!-- 3: 施工見積(物置・ゴミステーション)-->
  717.                         {% if ProductClass.SaleType.id == 3 %}
  718.                             <!-- 幅・奥行き・高さ -->
  719.                             <!-- 台数の指定 -->
  720.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  721.                               <label class="col-4 col-form-label">台数</label>
  722.                               <div class="col-4">
  723.                                 <div class="input-group mb-3">
  724.                                    <input type="text" name="daisu" id="daisu" class="form-control" value="1" onchange="mitsumori_simulation('daisu','daisu');" /><span class="input-group-text">台</span>
  725.                                 </div>
  726.                               </div>
  727.                               <div class="col-4">
  728.                                 <button type="button" id="op_btn_1" class="btn btn-info" onclick="daisu(+1);">+</button>
  729.                                 <button type="button" id="op_btn_2" class="btn btn-danger" onclick="daisu(-1);">ー</button>
  730.                               </div>
  731.                             </div>
  732.                         {% endif %}
  733.                         <!-- 4: 施工見積(フェンス・組み立て式)-->
  734.                         {% if ProductClass.SaleType.id == 4 %}
  735.                             <!-- 枚数(入力)の指定 -->
  736.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  737.                               <label class="col-4 col-form-label">枚数</label>
  738.                               <div class="col-4 mb-3">
  739.                                 <div class="input-group">
  740.                                    <input type="text" name="maisu" id="maisu" class="form-control" value="3" onchange="mitsumori_simulation('daisu','daisu');" /><span class="input-group-text">枚</span>
  741.                                 </div>
  742.                               </div>
  743.                               <div class="col-4">
  744.                                 <button type="button" id="op_btn_1" class="btn btn-info" onclick="maisu(+1);">+</button>
  745.                                 <button type="button" id="op_btn_2" class="btn btn-danger" onclick="maisu(-1);">ー</button>
  746.                               </div>
  747.                             </div>
  748.                         {% endif %}
  749.                         <!-- 5: 施工見積(ウッドデッキ・タイルデッキ)-->
  750.                         {% if ProductClass.SaleType.id == 5 %}
  751.                         {% endif %}
  752.                         <!-- 6: 施工見積(芝生・枚数・数量買い)-->
  753.                         {% if ProductClass.SaleType.id == 6 %}
  754.                             <!-- 平米(入力)の指定 -->
  755.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  756.                               <label class="col-4 col-form-label">枚数</label>
  757.                               <div class="col-4">
  758.                                 <div class="input-group">
  759.                                    <input type="text" name="heibei" id="heibei" class="form-control" value="1" onchange="mitsumori_simulation('heibei','heibei');" /><span class="input-group-text">平米</span>
  760.                                 </div>
  761.                               </div>
  762.                               <div class="col-4">
  763.                                 <button type="button" id="op_btn_1" class="btn btn-info" onclick="heibei(+1);">+</button>
  764.                                 <button type="button" id="op_btn_2" class="btn btn-danger" onclick="heibei(-1);">ー</button>
  765.                               </div>
  766.                             </div>
  767.                         {% endif %}
  768.                         <!-- 9: 商品のみ購入 -->
  769.                         <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">取り付け工事のご希望に関してお答えください。</label></div>
  770.                         {% for i in 0..10 %}
  771.                             {% if op and op|length >= i+1 %}
  772.                             {% if op[i]['name'] %}
  773.                             <div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
  774.                               <label class="col-4 col-form-label">{{ op[i]['name'] }}</label>
  775.                               <div class="col-8">
  776.                                 {{ op[i]['comment'] }}
  777.                                 <div class="form-group clearfix">
  778.                                   <div class="icheck-danger d-inline">
  779.                                     <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');cartbutton('{{ op[i]['on'] }}');"><label for="op{{ i }}_1">{{ op[i]['on'] }}</label>
  780.                                   </div>
  781.                                 </div>
  782.                                 <div class="form-group clearfix">
  783.                                   <div class="icheck-danger d-inline">
  784.                                     <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');cartbutton('{{ op[i]['off'] }}');"><label for="op{{ i }}_2">{{ op[i]['off'] }}</label>
  785.                                   </div>
  786.                                 </div>
  787.                               </div>
  788.                             </div>
  789.                             {% endif %}
  790.                             {% endif %}
  791.                         {% endfor %}
  792.                       </div>
  793.                       <!-- /.card-body -->
  794.                     </div>
  795.                     <form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
  796.                         {% if Product.stock_find %}
  797.                             <div class="ec-productRole__actions">
  798.                                 {% if form.classcategory_id1 is defined %}
  799.                                     <div class="ec-select">
  800.                                         {{ form_row(form.classcategory_id1) }}
  801.                                         {{ form_errors(form.classcategory_id1) }}
  802.                                     </div>
  803.                                     {% if form.classcategory_id2 is defined %}
  804.                                         <div class="ec-select">
  805.                                             {{ form_row(form.classcategory_id2) }}
  806.                                             {{ form_errors(form.classcategory_id2) }}
  807.                                         </div>
  808.                                     {% endif %}
  809.                                 {% endif %}
  810.                                 <div class="ec-numberInput">
  811.                                     {{ form_widget(form.quantity, { type: 'hidden' }) }}
  812.                                     {{ form_errors(form.quantity) }}
  813.                                 </div>
  814.                             </div>
  815.                             {% if ProductClass.SaleType.id != 9 %}
  816.                             <div class="ec-productRole__btn mt-3">
  817.                                 <button type="submit" id="cart_btn" class="ec-blockBtn--action add-cart" style="display:none;">カートに入れる</button>
  818.                             </div>
  819.                             {% else %}
  820.                             <div class="ec-productRole__btn mt-3">
  821.                                 <button type="submit" id="cart_btn" class="ec-blockBtn--action add-cart">
  822.                                     {{ 'カートに入れる'|trans }}
  823.                                 </button>
  824.                             </div>
  825.                             {% endif %}
  826.                         {% else %}
  827.                             <div class="ec-productRole__btn">
  828.                                 <button type="button" class="ec-blockBtn--action" disabled="disabled">
  829.                                     {{ 'ただいま品切れ中です。'|trans }}
  830.                                 </button>
  831.                             </div>
  832.                         {% endif %}
  833.                         <div class="ec-productRole__btn">
  834.                             <button type="button" class="ec-blockBtn--cancel" onclick="contact_form({{ Product.id }});">無料現地調査へ進む</button>
  835.                         </div>
  836.                         {{ form_rest(form) }}
  837.                     </form>
  838.                     <div class="ec-modal">
  839.                         <div class="ec-modal-overlay">
  840.                             <div class="ec-modal-wrap">
  841.                                 <span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
  842.                                 <div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
  843.                                 <div class="ec-modal-box">
  844.                                     <div class="ec-role">
  845.                                         <span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
  846.                                         <a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'カートへ進む'|trans }}</a>
  847.                                     </div>
  848.                                 </div>
  849.                             </div>
  850.                         </div>
  851.                     </div>
  852.                     <div class="ec-productRole__description">{{ Product.description_detail|raw|nl2br }}
  853.                     </div>
  854.                 </div>
  855.                 <div class="card col-12 collapsed-card sticky-top float-right">
  856.                     <div class="card-header">
  857.                       <h3 class="card-title">現在のお見積り額</h3>
  858.                       <div class="card-tools">
  859.                         <span class="float-left" id="mitsumori_message">395000円</span>
  860.                         <button type="button" class="btn btn-tool" data-card-widget="collapse">
  861.                           <i class="fas fa-plus"></i>
  862.                         </button>
  863.                       </div>
  864.                     </div>
  865.                     <div class="card-body p-0">
  866.                       <ul class="nav nav-pills flex-column">
  867.                         <li class="nav-item active">
  868.                           <a class="nav-link">
  869.                             <i class="far fa-file-alt"></i> 合計(工事費・税込)
  870.                             <span class="float-right" id="mitsumori_goukei">395,000円</span>
  871.                           </a>
  872.                         </li>
  873.                         <li class="nav-item active">
  874.                           <a class="nav-link">
  875.                             <i class="far fa-file-alt"></i> 商品価格
  876.                             <span class="float-right" id="mitsumori_price">307,008円</span>
  877.                           </a>
  878.                         </li>
  879.                         <li class="nav-item">
  880.                           <a class="nav-link">
  881.                             &nbsp;&nbsp;<i class="far fa-file-alt"></i> カタログ価格
  882.                             <span class="float-right" id="maker_price">479,700円</span>
  883.                           </a>
  884.                         </li>
  885.                         <li class="nav-item">
  886.                           <a class="nav-link">
  887.                             &nbsp;&nbsp;<i class="far fa-file-alt"></i> お値引き
  888.                             <span class="float-right" id="mitsumori_off">-172,692円</span>
  889.                           </a>
  890.                         </li>
  891.                         <li class="nav-item">
  892.                           <a class="nav-link">
  893.                             <i class="far fa-file-alt"></i> 基本工事費
  894.                             <span class="float-right" id="mitsumori_ct">53,250円</span>
  895.                           </a>
  896.                         </li>
  897.                         <li class="nav-item">
  898.                           <a class="nav-link">
  899.                             <i class="far fa-file-alt"></i> 施工オプション
  900.                             <span class="float-right"id="mitsumori_option">6,297円</span>
  901.                           </a>
  902.                         </li>
  903.                       </ul>
  904.                     </div>
  905.                     <div class="card-footer">
  906.                         <button type="button" id="mitsumori_btn" class="btn btn-info" data-toggle="modal" data-target="#modal-mitsumori">
  907.                           見積書表示
  908.                         </button>
  909.                         <button id="contact" class="btn btn-info" onclick="contact_form({{ Product.id }});">無料現地調査へ進む</button>
  910.                     </div>
  911.                 </div>
  912.             </div>
  913.         </div>
  914.     </div>
  915.   <div class="modal" id="modal-mitsumori">
  916.     <div class="modal-dialog modal-mitsumori" style="max-width:1000px">
  917.       <div class="modal-content">
  918.         <div class="modal-header">
  919.           <h4 class="modal-title">お見積書</h4>
  920.           <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  921.             <span aria-hidden="true">&times;</span>
  922.           </button>
  923.         </div>
  924.         <div class="modal-body">
  925.             <div class="invoice p-3 mb-5" style="max-width:1000px; margin:auto;">
  926.               <!-- title row -->
  927.               <div class="row">
  928.                 <div class="col-12">
  929.                   <h2>概算お見積書 
  930.                     <small class="float-right" style="font-size:14px;">発行日: 2025/03/14</small>
  931.                   </h2>
  932.                 </div>
  933.                 <!-- /.col -->
  934.               </div>
  935.               <!-- info row -->
  936.               <div class="row invoice-info">
  937.                 <div class="col-sm-8 invoice-col">
  938.                   <h3>お客様</h3>
  939.                   <span>下記の通り、お見積もり申し上げます。</span>
  940.                   <br />
  941.                   <br / >
  942.                   <br />
  943.                   <h2>お見積金額: <span id="mitsumori_kei">399,080円</span></h2>
  944.                   <span>
  945.                     <br/>
  946.                     <br/>
  947.                     <br/>
  948.                     <br/>
  949.                   </span>
  950.                 </div>
  951.                 <div class="col-sm-4 invoice-col">
  952.                   <p>
  953.                     <img alt="" src="/html/user_data/js/images/logo.png" style="width: 260px; max-width: 100%; max-height: 10mm;">
  954.                   </p>
  955.                   <p>有限会社プラス</p>
  956.                   <p>〒400-0334</p>
  957.                   <p>山梨県南アルプス市藤田1450番地2</p>
  958.                   <p>TEL: 055-284-6480</p>
  959.                   <img alt="" src="/html/user_data/js/images/seal.svg" style="z-index: 2; position: absolute; width: 21mm; left: 58mm; top: 36mm;">
  960.                 </div>
  961.                 <!-- /.col -->
  962.                 <!-- /.col -->
  963.               </div>
  964.               <!-- /.row -->
  965.               <!-- Table row -->
  966.               <div class="row">
  967.                 <div class="col-12 table-responsive">
  968.                   <table class="table table-striped">
  969.                     <thead>
  970.                       <tr>
  971.                         <th>項目</th>
  972.                         <th>数量</th>
  973.                         <th>単位</th>
  974.                         <th>単価</th>
  975.                         <th>小計</th>
  976.                       </tr>
  977.                     </thead>
  978.                     <tbody>
  979.                       <tr>
  980.                         <td>プレーンルーフ 600タイプ 1台用 単体セット</td>
  981.                         <td>1</td>
  982.                         <td>式</td>
  983.                         <td id="mitsumori_price_01">352,800</td>
  984.                         <td id="mitsumori_price_02">352,800</td>
  985.                       </tr>
  986.                       <tr>
  987.                         <td>基本工事費</td>
  988.                         <td>1</td>
  989.                         <td>式</td>
  990.                         <td id="mitsumori_ct_01">10,000</td>
  991.                         <td id="mitsumori_ct_02">10,000</td>
  992.                       </tr>
  993.                       <tr>
  994.                         <td>残土・ガラ処理</td>
  995.                         <td>1</td>
  996.                         <td>式</td>
  997.                         <td>0円</td>
  998.                         <td></td>
  999.                       </tr>
  1000.                       <tr>
  1001.                         <td> </td>
  1002.                         <td></td>
  1003.                         <td></td>
  1004.                         <td></td>
  1005.                         <td></td>
  1006.                       </tr>
  1007.                     </tbody>
  1008.                   </table>
  1009.                 </div>
  1010.                 <!-- /.col -->
  1011.               </div>
  1012.               <!-- /.row -->
  1013.               <div class="row">
  1014.                 <!-- accepted payments column -->
  1015.                 <div class="col-6">
  1016.                   <p class="lead">お支払い方法</p>
  1017.                   <p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">銀行振込、クレジットカード決済、PAYPAY決済
  1018.                     <br>銀行振込:山梨中央銀行 白根支店 普通口座 391402
  1019.                     <br>※商品代金と工事代金の総額が金100万円(税込)を超える場合、着手金として代金の半額をご契約後お支払いいただきます。 
  1020.                   </p>
  1021.                 </div>
  1022.                 <!-- /.col -->
  1023.                 <div class="col-6">
  1024.                   <div class="table-responsive">
  1025.                     <table class="table">
  1026.                       <tbody>
  1027.                         <tr>
  1028.                           <th style="width:50%">小計:</th>
  1029.                           <td id="mitsumori_shoukei">362,800</td>
  1030.                         </tr>
  1031.                         <tr>
  1032.                           <th>消費税 (10%)</th>
  1033.                           <td id="mitsumori_tax">36,280</td>
  1034.                         </tr>
  1035.                         <tr>
  1036.                           <th>合計:</th>
  1037.                           <td id="mitsumori_goukei_02">399,080</td>
  1038.                         </tr>
  1039.                       </tbody>
  1040.                     </table>
  1041.                   </div>
  1042.                 </div>
  1043.                 <!-- /.col -->
  1044.               </div>
  1045.               <!-- /.row -->
  1046.             </div>
  1047.         </div>
  1048.         <div class="modal-footer justify-content-between">
  1049.                   <button type="button" class="btn btn-primary float-right" style="margin-right: 5px;">
  1050.                     <i class="fas fa-download"></i>PDF出力
  1051.                   </button>
  1052.           <button type="button" class="btn btn-info" onclick="contact_form({{ Product.id }});">無料現地調査へ進む</button>
  1053.         </div>
  1054.       </div>
  1055.       <!-- /.modal-content -->
  1056.     </div>
  1057.     <!-- /.modal-dialog -->
  1058.   </div>
  1059.   <!-- /.modal -->
  1060. {% endblock %}