{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'product_page' %}
{% block stylesheet %}
<style>
.slick-slider {
margin-bottom: 10px;
margin-top: -20px;
}
.slick-dots {
position: absolute;
bottom: -45px;
display: block;
width: 100%;
padding: 0;
list-style: none;
text-align: center;
}
.slick-dots li {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 0 5px;
padding: 0;
cursor: pointer;
}
.slick-dots li button {
font-size: 0;
line-height: 0;
display: block;
width: 20px;
height: 20px;
padding: 5px;
cursor: pointer;
color: transparent;
border: 0;
outline: none;
background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus {
outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
opacity: 1;
}
.slick-dots li button:before {
content: " ";
line-height: 20px;
position: absolute;
top: 0;
left: 0;
width: 12px;
height: 12px;
text-align: center;
opacity: .25;
background-color: black;
border-radius: 50%;
}
.slick-dots li.slick-active button:before {
opacity: .75;
background-color: black;
}
.slick-dots li button.thumbnail img {
width: 0;
height: 0;
}
</style>
<link rel="stylesheet" href="/html/user_data/js/style.css">
<link rel="stylesheet" href="/html/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
{% endblock %}
{% block javascript %}
<script>
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};
// 規格2に選択肢を割り当てる。
function fnSetClassCategories(form, classcat_id2_selected) {
var $form = $(form);
var product_id = $form.find('input[name=product_id]').val();
var $sele1 = $form.find('select[name=classcategory_id1]');
var $sele2 = $form.find('select[name=classcategory_id2]');
eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);
}
{% if form.classcategory_id2 is defined %}
fnSetClassCategories(
$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}
);
{% elseif form.classcategory_id1 is defined %}
eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);
{% endif %}
</script>
<script>
$(function() {
// bfcache無効化
$(window).bind('pageshow', function(event) {
if (event.originalEvent.persisted) {
location.reload(true);
}
});
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため
// img タグに width, height が付与されている.
// 630px 未満の画面サイズでは縦横比が壊れるための対策
// see https://github.com/EC-CUBE/ec-cube/pull/5023
$('.ec-grid2__cell').hide();
var removeSize = function () {
$('.slide-item').height('');
$('.slide-item img')
.removeAttr('width')
.removeAttr('height')
.removeAttr('style');
};
var slickInitial = function(slick) {
$('.ec-grid2__cell').fadeIn(1500);
var baseHeight = $(slick.target).height();
var baseWidth = $(slick.target).width();
var rate = baseWidth / baseHeight;
if(baseHeight * rate < 400){
$('.slide-item').height(baseHeight * rate); // 余白を削除する
}else{
$('.slide-item').height(400); // 余白を削除する
}
// transform を使用することでCLSの影響を受けないようにする
$('.slide-item img')
.css(
{
'transform-origin': 'top left',
'transform': 'scaleY(' + rate + ')',
'transition': 'transform .1s'
}
);
// 正しいサイズに近くなったら属性を解除する
setTimeout(removeSize, 500);
};
$('.item_visual').on('init', slickInitial);
// リサイズ時は CLS の影響を受けないため属性を解除する
$(window).resize(removeSize);
$('.item_visual').slick({
dots: false,
arrows: true,
responsive: [{
breakpoint: 768,
settings: {
dots: true,
arrows: false
}
}]
});
$('.slideThumb').on('click', function() {
var index = $(this).attr('data-index');
$('.item_visual').slick('slickGoTo', index, false);
})
});
</script>
<script>
$(function() {
$('.add-cart').on('click', function(event) {
{% if form.classcategory_id1 is defined %}
// 規格1フォームの必須チェック
if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {
$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
$('#classcategory_id1')[0].setCustomValidity('');
}
{% endif %}
{% if form.classcategory_id2 is defined %}
// 規格2フォームの必須チェック
if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {
$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');
return true;
} else {
$('#classcategory_id2')[0].setCustomValidity('');
}
{% endif %}
// 個数フォームのチェック
if ($('#quantity').val() < 1) {
$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');
return true;
} else {
$('#quantity')[0].setCustomValidity('');
}
event.preventDefault();
$form = $('#form1');
$.ajax({
url: $form.attr('action'),
type: $form.attr('method'),
data: $form.serialize(),
dataType: 'json',
beforeSend: function(xhr, settings) {
// Buttonを無効にする
$('.add-cart').prop('disabled', true);
}
}).done(function(data) {
// レスポンス内のメッセージをalertで表示
$.each(data.messages, function() {
$('#ec-modal-header').text(this);
});
$('.ec-modal').show()
// カートブロックを更新する
$.ajax({
url: "{{ url('block_cart') }}",
type: 'GET',
dataType: 'html'
}).done(function(html) {
$('.ec-headerRole__cart').html(html);
});
}).fail(function(data) {
alert('{{ 'カートへの追加に失敗しました。'|trans }}');
}).always(function(data) {
// Buttonを有効にする
$('.add-cart').prop('disabled', false);
});
});
});
$('.ec-modal-wrap').on('click', function(e) {
// モーダル内の処理は外側にバブリングさせない
e.stopPropagation();
});
$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {
$('.ec-modal').hide()
});
var pw = "";
var pd = "";
var ph = "";
var pm = "";
var pc = "";
var op0 = "";
var op1 = "";
var op2 = "";
var op3 = "";
var op4 = "";
var op5 = "";
var op6 = "";
var op7 = "";
var op8 = "";
var op9 = "";
var op10 = "";
const formatter = new Intl.NumberFormat('ja-JP');
function mitsumori_simulation(type , value_id){
var pp = {{ pp|raw }};
if(type == "pw"){
pw = $('#'+value_id).val();
}
if(type == "pd"){
pd = $('#'+value_id).val();
}
if(type == "ph"){
ph = $('#'+value_id).val();
}
if(type == "pm"){
pm = $('#'+value_id).val();
}
if(type == "pc"){
pc = $('#'+value_id).val();
}
if(type == "op0"){ op0 = $('#'+value_id).val(); }
if(type == "op1"){ op1 = $('#'+value_id).val(); }
if(type == "op2"){ op2 = $('#'+value_id).val(); }
if(type == "op3"){ op3 = $('#'+value_id).val(); }
if(type == "op4"){ op4 = $('#'+value_id).val(); }
if(type == "op5"){ op5 = $('#'+value_id).val(); }
if(type == "op6"){ op6 = $('#'+value_id).val(); }
if(type == "op7"){ op7 = $('#'+value_id).val(); }
if(type == "op8"){ op8 = $('#'+value_id).val(); }
if(type == "op9"){ op9 = $('#'+value_id).val(); }
if(type == "op10"){ op10 = $('#'+value_id).val(); }
if(pm == ""){
$('#mitsumori_message').text("素材を選択してください");
}
if(ph == ""){
$('#mitsumori_message').text("高さを選択してください");
}
if(pd == ""){
$('#mitsumori_message').text("奥行きを選択してください");
}
if(pw == ""){
$('#mitsumori_message').text("幅を選択してください");
}
if(pc == ""){
$('#mitsumori_message').text("カラーを選択してください");
$('#mitsumori_btn').hide();
$('#mitsumori_goukei').text("---円");
$('#mitsumori_off').text("---円");
$('#mitsumori_price').text("---円");
$('#maker_price').text("---円");
$('#mitsumori_ct').text("---円");
$('#mitsumori_option').text("---円");
}
if(pw != "" && pd != "" && ph != "" && pm != "" && pc != ""){
$('#mitsumori_btn').show();
pp.forEach((el) => {
if(pw == el.w && pd == el.d && ph == el.h && pm == el.m && pc == el.c){
if(op0 == "商品購入のみ" || op1 == "商品購入のみ" || op2 == "商品購入のみ" || op3 == "商品購入のみ" || op4 == "商品購入のみ"
|| op5 == "商品購入のみ" || op6 == "商品購入のみ" || op7 == "商品購入のみ" || op8 == "商品購入のみ" || op9 == "商品購入のみ"){
$('#mitsumori_message').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_goukei').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");
$('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");
$('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");
$('#mitsumori_ct').text("0円");
$('#mitsumori_option').text("0円");
$('#mitsumori_kei').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_ct_01').text("0円");
$('#mitsumori_ct_02').text("0円");
$('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price)) + "円");
mitsumori_goukei = (parseInt(el.price));
shoukei = mitsumori_goukei / 1.1;
tax = parseInt(mitsumori_goukei - shoukei);
$('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");
$('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");
}else{
$('#mitsumori_message').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
$('#mitsumori_goukei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
$('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");
$('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");
$('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");
$('#mitsumori_ct').text(formatter.format(parseInt(el.ct)) + "円");
$('#mitsumori_option').text("0円");
$('#mitsumori_kei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
$('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");
$('#mitsumori_ct_01').text(formatter.format(parseInt(el.ct)) + "円");
$('#mitsumori_ct_02').text(formatter.format(parseInt(el.ct)) + "円");
$('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");
mitsumori_goukei = (parseInt(el.price) + parseInt(el.ct));
shoukei = mitsumori_goukei / 1.1;
tax = parseInt(mitsumori_goukei - shoukei);
$('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");
$('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");
}
}
});
}
}
mitsumori_simulation("","");
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ Product.name }}",
"image": [
{% for img in Product.ProductImage %}
"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}
{% else %}
"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"
{% endfor %}
],
"description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",
{% if Product.code_min %}
"sku": "{{ Product.code_min }}",
{% endif %}
"offers": {
"@type": "Offer",
"url": "{{ url('product_detail', {'id': Product.id}) }}",
"priceCurrency": "{{ eccube_config.currency }}",
"price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},
"availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"
}
}
</script>
{% endblock %}
{% block main %}
<div class="ec-productRole" style="margin-top:20px;">
<div class="ec-grid2">
<div class="ec-grid2__cell">
<div class="ec-sliderItemRole">
{# 商品名 #}
<div class="ec-productRole__title">
<h2 class="ec-headingTitle">{{ Product.name }}</h2>
</div>
{% if BaseInfo.option_favorite_product %}
<div style="position:relative;top: 20px;left: 10px;z-index:100;">
{% if is_favorite == false %}
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
<button type="submit" id="favorite" class="favorite">♡</button>
</form>
{% else %}
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">
<button type="submit" id="favorite" class="favorite" style="color:red;">♥</button>
</form>
{% endif %}
</div>
{% endif %}
<div class="item_visual">
{% for ProductImage in Product.ProductImage %}
<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>
{% else %}
<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>
{% endfor %}
</div>
<div class="item_nav">
{% for ProductImage in Product.ProductImage %}
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="80" height="80" loading="lazy"></div>
{% endfor %}
</div>
</div>
</div>
<div class="ec-grid2__cell2">
<div class="ec-productRole__profile" >
{# 関連カテゴリ #}
{% if Product.ProductCategories is not empty %}
<div class="ec-productRole__category" style="padding:10px 0;">
{% for ProductCategory in Product.ProductCategories %}
<ul>
<li>
{% for Category in ProductCategory.Category.path %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}
<span>></span>{% endif -%}
{% endfor %}
</li>
</ul>
{% endfor %}
</div>
{% endif %}
{# 販売価格 #}
<div class="ec-productRole__price">
<span style="color:black;font-size:15px;">工事費込み価格</span>
{% if Product.hasProductClass -%}
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}
<div class="ec-price">
<span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class="ec-price__tax">({{ '税込'|trans }})~</span>
</div>
{% else %}
<div class="ec-price">
<span class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>
<span class="ec-price__tax">({{ '税込'|trans }})</span>
</div>
{% endif %}
{% else %}
<div class="ec-price">
<span class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>
<span class="ec-price__tax">({{ '税込'|trans }})~</span>
</div>
{% endif %}
</div>
{# タグ #}
<ul class="ec-productRole__tags">
{% for Tag in Product.Tags %}
<li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>
{% endfor %}
</ul>
{# 商品コード #}
{% if Product.code_min is not empty %}
<div class="ec-productRole__code">
{{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>
</div>
{% endif %}
<div class="ec-productRole__description">
<div class="ec-rectHeading">
<h4>製品情報</h4>
</div>
{{ Product.sales_infomation|raw|nl2br }}
</div>
<div class="card card-danger" style="clear:both;margin:1px;">
<div class="card-header">
<h3 class="card-title">見積シミュレーション</h3>
</div>
<div class="card-body p-2">
<div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のタイプを選択してください。</label></div>
{% set type1 = getProduct_field(Product.id,"related_name1") %}
{% if type1 and related_product1 and related_product1|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label mt-2">{{ type1 }}</label>
<div class="col-8 mt-2">
<div class="form-group clearfix">
{% for rp_id, rp_name in related_product1 %}
<div class="icheck-danger d-inline">
<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>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% set type2 = getProduct_field(Product.id,"related_name2") %}
{% if type2 and related_product2 and related_product2|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label mt-2">{{ type2 }}</label>
<div class="col-8 mt-2">
<div class="form-group clearfix">
{% for rp_id, rp_name in related_product2 %}
<div class="icheck-danger d-inline">
<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>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% set type3 = getProduct_field(Product.id,"related_name3") %}
{% if type3 and related_product3 and related_product3|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label mt-2">{{ type3 }}</label>
<div class="col-8 mt-2">
<div class="form-group clearfix">
<div class="icheck-danger d-inline">
<input type="radio" name="rp3" id="rp3_{{ Product.id }}" value="{{ Product.name }}" checked ><label for="rp3_{{ Product.id }}">{{ base_select3 }}</label>
</div>
{% for rp_id, rp_name in related_product3 %}
<div class="icheck-danger d-inline">
<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>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のカラー、サイズ、素材を選択してください。</label></div>
{% if color and color|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label mt-2">カラー</label>
<div class="col-8 mt-2">
<div class="form-group clearfix">
{% set idx = 0 %}
{% for cc in color %}
{% if cc and cc['name'] %}
{% set idx = idx + 1 %}
<div class="icheck-danger d-inline">
<input type="radio" name="color" id="cc_{{ idx }}" value="{{ cc['name'] }}" onclick="mitsumori_simulation('pc','cc_{{ idx }}');"><label for="cc_{{ idx }}">{{ cc['name'] }}</label>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if p_w and p_w|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label">幅</label>
<div class="col-8">
<div class="form-group clearfix">
{% set idx = 0 %}
{% for pw in p_w %}
{% if pw %}
{% set idx = idx + 1 %}
<div class="icheck-danger d-inline">
<input type="radio" name="pw" id="pw_{{ idx }}" value="{{ pw }}" onclick="mitsumori_simulation('pw','pw_{{ idx }}');"><label for="pw_{{ idx }}">{{ pw }}</label>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if p_d and p_d|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label">奥行き</label>
<div class="col-8">
<div class="form-group clearfix">
{% set idx = 0 %}
{% for pd in p_d %}
{% if pd %}
{% set idx = idx + 1 %}
<div class="icheck-danger d-inline">
<input type="radio" name="pd" id="pd_{{ idx }}" value="{{ pd }}" onclick="mitsumori_simulation('pd','pd_{{ idx }}');"><label for="pd_{{ idx }}">{{ pd }}</label>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if p_h and p_h|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label">高さ</label>
<div class="col-8">
<div class="form-group clearfix">
{% set idx = 0 %}
{% for ph in p_h %}
{% if ph %}
{% set idx = idx + 1 %}
<div class="icheck-danger d-inline">
<input type="radio" name="ph" id="ph_{{ idx }}" value="{{ ph }}" onclick="mitsumori_simulation('ph','ph_{{ idx }}');"><label for="ph_{{ idx }}">{{ ph }}</label>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% if p_w and p_w|length %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label">素材</label>
<div class="col-8">
<div class="form-group clearfix">
{% set idx = 0 %}
{% for pm in p_m %}
{% if pm %}
{% set idx = idx + 1 %}
<div class="icheck-danger d-inline">
<input type="radio" name="pm" id="pm_{{ idx }}" value="{{ pm }}" onclick="mitsumori_simulation('pm','pm_{{ idx }}');"><label for="pm_{{ idx }}">{{ pm }}</label>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
<div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">取り付け工事のご希望に関してお答えください。</label></div>
{% for i in 0..10 %}
{% if op and op|length >= i+1 %}
{% if op[i]['name'] %}
<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">
<label class="col-4 col-form-label">{{ op[i]['name'] }}</label>
<div class="col-8">
{{ op[i]['comment'] }}
<div class="form-group clearfix">
<div class="icheck-danger d-inline">
<input type="radio" name="op{{ i }}" id="op{{ i }}_1" value="{{ op[i]['on'] }}" onclick="mitsumori_simulation('op{{ i }}','op{{ i }}_1');"><label for="op{{ i }}_1">{{ op[i]['on'] }}</label>
</div>
</div>
<div class="form-group clearfix">
<div class="icheck-danger d-inline">
<input type="radio" name="op{{ i }}" id="op{{ i }}_2" value="{{ op[i]['off'] }}" onclick="mitsumori_simulation('op{{ i }}','op{{ i }}_2');"><label for="op{{ i }}_2">{{ op[i]['off'] }}</label>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
<!-- /.card-body -->
</div>
<form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">
{% if Product.stock_find %}
<div class="ec-productRole__actions">
{% if form.classcategory_id1 is defined %}
<div class="ec-select">
{{ form_row(form.classcategory_id1) }}
{{ form_errors(form.classcategory_id1) }}
</div>
{% if form.classcategory_id2 is defined %}
<div class="ec-select">
{{ form_row(form.classcategory_id2) }}
{{ form_errors(form.classcategory_id2) }}
</div>
{% endif %}
{% endif %}
<div class="ec-numberInput">
{{ form_widget(form.quantity, { type: 'hidden' }) }}
{{ form_errors(form.quantity) }}
</div>
</div>
{% if ProductClass.SaleType.id != 9 %}
<div class="ec-productRole__btn">
</div>
{% else %}
<div class="ec-productRole__btn">
<button type="submit" class="ec-blockBtn--action add-cart">
{{ 'カートに入れる'|trans }}
</button>
</div>
{% endif %}
{% else %}
<div class="ec-productRole__btn">
<button type="button" class="ec-blockBtn--action" disabled="disabled">
{{ 'ただいま品切れ中です。'|trans }}
</button>
</div>
{% endif %}
{{ form_rest(form) }}
</form>
<div class="ec-modal">
<div class="ec-modal-overlay">
<div class="ec-modal-wrap">
<span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>
<div id="ec-modal-header" class="text-center">{{ 'カートに追加しました。'|trans }}</div>
<div class="ec-modal-box">
<div class="ec-role">
<span class="ec-inlineBtn--cancel">{{ 'お買い物を続ける'|trans }}</span>
<a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ 'カートへ進む'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
<div class="ec-productRole__description">{{ Product.description_detail|raw|nl2br }}
</div>
</div>
<div class="card col-12 collapsed-card sticky-top float-right">
<div class="card-header">
<h3 class="card-title">現在のお見積り額</h3>
<div class="card-tools">
<span class="float-left" id="mitsumori_message">395000円</span>
<button type="button" class="btn btn-tool" data-card-widget="collapse">
<i class="fas fa-plus"></i>
</button>
</div>
</div>
<div class="card-body p-0">
<ul class="nav nav-pills flex-column">
<li class="nav-item active">
<a class="nav-link">
<i class="far fa-file-alt"></i> 合計(工事費・税込)
<span class="float-right" id="mitsumori_goukei">395,000円</span>
</a>
</li>
<li class="nav-item active">
<a class="nav-link">
<i class="far fa-file-alt"></i> 商品価格
<span class="float-right" id="mitsumori_price">307,008円</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link">
<i class="far fa-file-alt"></i> カタログ価格
<span class="float-right" id="maker_price">479,700円</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link">
<i class="far fa-file-alt"></i> お値引き
<span class="float-right" id="mitsumori_off">-172,692円</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link">
<i class="far fa-file-alt"></i> 基本工事費
<span class="float-right" id="mitsumori_ct">53,250円</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link">
<i class="far fa-file-alt"></i> 施工オプション
<span class="float-right"id="mitsumori_option">6,297円</span>
</a>
</li>
</ul>
</div>
<div class="card-footer">
<button type="button" id="mitsumori_btn" class="btn btn-info" data-toggle="modal" data-target="#modal-mitsumori">
見積書表示
</button>
<button id="contact" class="btn btn-info" onclick="location.href='/contact?product={{ Product.id }}';">無料現地調査へ進む</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="modal-mitsumori">
<div class="modal-dialog modal-mitsumori" style="max-width:1000px">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">お見積書</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="invoice p-3 mb-5" style="max-width:1000px; margin:auto;">
<!-- title row -->
<div class="row">
<div class="col-12">
<h2>概算お見積書
<small class="float-right" style="font-size:14px;">発行日: 2025/03/14</small>
</h2>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info">
<div class="col-sm-8 invoice-col">
<h3>お客様</h3>
<span>下記の通り、お見積もり申し上げます。</span>
<br />
<br / >
<br />
<h2>お見積金額: <span id="mitsumori_kei">399,080円</span></h2>
<span>
<br/>
<br/>
<br/>
<br/>
</span>
</div>
<div class="col-sm-4 invoice-col">
<p>
<img alt="" src="/html/user_data/js/images/logo.png" style="width: 260px; max-width: 100%; max-height: 10mm;">
</p>
<p>有限会社プラス</p>
<p>〒400-0334</p>
<p>山梨県南アルプス市藤田1450番地2</p>
<p>TEL: 055-284-6480</p>
<img alt="" src="/html/user_data/js/images/seal.svg" style="z-index: 2; position: absolute; width: 21mm; left: 58mm; top: 36mm;">
</div>
<!-- /.col -->
<!-- /.col -->
</div>
<!-- /.row -->
<!-- Table row -->
<div class="row">
<div class="col-12 table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>項目</th>
<th>数量</th>
<th>単位</th>
<th>単価</th>
<th>小計</th>
</tr>
</thead>
<tbody>
<tr>
<td>プレーンルーフ 600タイプ 1台用 単体セット</td>
<td>1</td>
<td>式</td>
<td id="mitsumori_price_01">352,800</td>
<td id="mitsumori_price_02">352,800</td>
</tr>
<tr>
<td>基本工事費</td>
<td>1</td>
<td>式</td>
<td id="mitsumori_ct_01">10,000</td>
<td id="mitsumori_ct_02">10,000</td>
</tr>
<tr>
<td>残土・ガラ処理</td>
<td>1</td>
<td>式</td>
<td>0円</td>
<td></td>
</tr>
<tr>
<td> </td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<div class="row">
<!-- accepted payments column -->
<div class="col-6">
<p class="lead">お支払い方法</p>
<p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">銀行振込、クレジットカード決済、PAYPAY決済
<br>銀行振込:山梨中央銀行 白根支店 普通口座 391402
<br>※商品代金と工事代金の総額が金100万円(税込)を超える場合、着手金として代金の半額をご契約後お支払いいただきます。
</p>
</div>
<!-- /.col -->
<div class="col-6">
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th style="width:50%">小計:</th>
<td id="mitsumori_shoukei">362,800</td>
</tr>
<tr>
<th>消費税 (10%)</th>
<td id="mitsumori_tax">36,280</td>
</tr>
<tr>
<th>合計:</th>
<td id="mitsumori_goukei_02">399,080</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-primary float-right" style="margin-right: 5px;">
<i class="fas fa-download"></i>PDF出力
</button>
<button type="button" class="btn btn-info" onclick="location.href='/contact?product={{ Product.id }}';">無料現地調査へ進む</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
{% endblock %}