| exception |
Twig\Error\RuntimeError {#4286
-lineno: 1646
-name: "Product/detail.twig"
-rawMessage: "Impossible to access an attribute ("id") on a null variable."
-sourcePath: "/home/xs538259/exterior-plus.jp/public_html/app/template/default/Product/detail.twig"
-sourceCode: """
{#\n
This file is part of EC-CUBE\n
\n
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.\n
\n
http://www.ec-cube.co.jp/\n
\n
For the full copyright and license information, please view the LICENSE\n
file that was distributed with this source code.\n
#}\n
{% extends 'default_frame.twig' %}\n
\n
{% set body_class = 'product_page' %}\n
\n
{% block stylesheet %}\n
<style>\n
\n
.slick-slider {\n
margin-bottom: 10px;\n
\t\t\tmargin-top: -20px;\n
}\n
\n
.slick-dots {\n
position: absolute;\n
bottom: -45px;\n
display: block;\n
width: 100%;\n
padding: 0;\n
list-style: none;\n
text-align: center;\n
}\n
\n
.slick-dots li {\n
position: relative;\n
display: inline-block;\n
width: 20px;\n
height: 20px;\n
margin: 0 5px;\n
padding: 0;\n
\n
cursor: pointer;\n
}\n
\n
.slick-dots li button {\n
font-size: 0;\n
line-height: 0;\n
display: block;\n
width: 20px;\n
height: 20px;\n
padding: 5px;\n
cursor: pointer;\n
color: transparent;\n
border: 0;\n
outline: none;\n
background: transparent;\n
}\n
\n
.slick-dots li button:hover,\n
.slick-dots li button:focus {\n
outline: none;\n
}\n
\n
.slick-dots li button:hover:before,\n
.slick-dots li button:focus:before {\n
opacity: 1;\n
}\n
\n
.slick-dots li button:before {\n
content: " ";\n
line-height: 20px;\n
position: absolute;\n
top: 0;\n
left: 0;\n
width: 12px;\n
height: 12px;\n
text-align: center;\n
opacity: .25;\n
background-color: black;\n
border-radius: 50%;\n
\n
}\n
\n
.slick-dots li.slick-active button:before {\n
opacity: .75;\n
background-color: black;\n
}\n
\n
.slick-dots li button.thumbnail img {\n
width: 0;\n
height: 0;\n
}\n
\n
</style>\n
<link rel="stylesheet" href="/html/user_data/js/style.css">\n
<link rel="stylesheet" href="/html/plugins/icheck-bootstrap/icheck-bootstrap.min.css">\n
<style>\n
/* ============================================\n
スマホ用 見積金額 下部固定バー\n
============================================ */\n
#sp-mitsumori-bar {\n
display: none;\n
}\n
\n
/* ============================================\n
商品タイプ選択 共通スタイル\n
============================================ */\n
\n
/* セクションラベル */\n
.rp-section-label {\n
font-size: 14px;\n
font-weight: bold;\n
color: #333;\n
margin-bottom: 10px;\n
}\n
.rp-section-label span {\n
font-weight: normal;\n
color: #c00;\n
}\n
\n
/* ---- 1. 画像付きカード ---- */\n
.rp-card-group {\n
display: flex;\n
flex-wrap: wrap;\n
gap: 8px;\n
margin-bottom: 4px;\n
}\n
.rp-card {\n
position: relative;\n
cursor: pointer;\n
width: 110px;\n
border: 2px solid #ddd;\n
border-radius: 10px;\n
overflow: hidden;\n
transition: border-color 0.2s, box-shadow 0.2s;\n
background: #fff;\n
}\n
.rp-card:hover {\n
border-color: #999;\n
box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n
}\n
.rp-card.is-selected {\n
border-color: #1a6fcf;\n
box-shadow: 0 2px 10px rgba(26,111,207,0.25);\n
}\n
.rp-card input[type="radio"] { display: none; }\n
.rp-card__image {\n
width: 100%;\n
aspect-ratio: 1 / 1;\n
object-fit: cover;\n
display: block;\n
background: #f5f5f5;\n
}\n
.rp-card__placeholder {\n
width: 100%;\n
aspect-ratio: 1 / 1;\n
background: #f0f0f0;\n
display: flex;\n
align-items: center;\n
justify-content: center;\n
color: #bbb;\n
font-size: 24px;\n
}\n
.rp-card__name {\n
display: block;\n
padding: 5px 5px;\n
font-size: 11px;\n
color: #333;\n
text-align: center;\n
line-height: 1.4;\n
word-break: break-all;\n
}\n
.rp-card.is-selected .rp-card__name { color: #1a6fcf; font-weight: bold; }\n
.rp-card.is-selected::after {\n
content: "✓";\n
position: absolute;\n
top: 3px; right: 6px;\n
color: #1a6fcf;\n
font-size: 13px;\n
font-weight: bold;\n
}\n
\n
/* ---- 2. ボタン式ラジオ(画像なし・8個以内)---- */\n
.rp-btn-group {\n
display: flex;\n
flex-wrap: wrap;\n
gap: 8px;\n
margin-bottom: 4px;\n
}\n
.rp-btn {\n
cursor: pointer;\n
padding: 8px 14px;\n
border: 2px solid #ddd;\n
border-radius: 10px;\n
font-size: 13px;\n
color: #333;\n
background: #fff;\n
transition: border-color 0.2s, background 0.2s;\n
white-space: nowrap;\n
}\n
.rp-btn:hover { border-color: #999; }\n
.rp-btn.is-selected {\n
border-color: #1a6fcf;\n
color: #1a6fcf;\n
font-weight: bold;\n
background: #f0f6ff;\n
}\n
.rp-btn input[type="radio"] { display: none; }\n
\n
/* ---- 3. プルダウン(画像なし・9個以上)---- */\n
.rp-select-wrap {\n
margin-bottom: 4px;\n
}\n
.rp-select {\n
width: 100%;\n
max-width: 420px;\n
padding: 8px 12px;\n
border: 2px solid #ddd;\n
border-radius: 10px;\n
font-size: 13px;\n
color: #333;\n
background: #fff;\n
appearance: none;\n
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");\n
background-repeat: no-repeat;\n
background-position: right 12px center;\n
cursor: pointer;\n
}\n
.rp-select:focus {\n
outline: none;\n
border-color: #1a6fcf;\n
}\n
\n
/* ---- オプション選択ボタン(枠線ラジオ)---- */\n
.opt-btn-group {\n
display: flex;\n
flex-wrap: wrap;\n
gap: 8px;\n
padding: 6px 0;\n
}\n
.opt-btn {\n
cursor: pointer;\n
padding: 7px 14px;\n
border: 2px solid #ddd;\n
border-radius: 10px;\n
font-size: 13px;\n
color: #333;\n
background: #fff;\n
transition: border-color 0.2s, background 0.2s;\n
white-space: nowrap;\n
}\n
.opt-btn:hover { border-color: #999; }\n
.opt-btn.is-selected {\n
border-color: #1a6fcf;\n
color: #1a6fcf;\n
font-weight: bold;\n
background: #f0f6ff;\n
}\n
.opt-btn input[type="radio"] { display: none; }\n
\n
/* ============================================\n
施工エリア案内\n
============================================ */\n
.ec-areaNotice {\n
margin: 16px 0;\n
padding: 16px 20px;\n
background: #f8f9fa;\n
border-left: 4px solid #1a6fcf;\n
border-radius: 0 8px 8px 0;\n
}\n
.ec-areaNotice__inner {\n
display: flex;\n
align-items: flex-start;\n
gap: 12px;\n
}\n
.ec-areaNotice__icon {\n
font-size: 22px;\n
line-height: 1;\n
flex-shrink: 0;\n
margin-top: 2px;\n
}\n
.ec-areaNotice__body {\n
flex: 1;\n
}\n
.ec-areaNotice__title {\n
font-size: 13px;\n
font-weight: bold;\n
color: #1a6fcf;\n
margin: 0 0 6px;\n
}\n
.ec-areaNotice__text {\n
font-size: 13px;\n
color: #444;\n
line-height: 1.7;\n
margin: 0;\n
}\n
.ec-areaNotice__text strong {\n
color: #222;\n
}\n
.ec-areaNotice__link {\n
display: inline-block;\n
margin-top: 8px;\n
font-size: 12px;\n
color: #1a6fcf;\n
text-decoration: underline;\n
}\n
.ec-areaNotice__link:hover {\n
color: #0d4fa0;\n
}\n
\n
/* ============================================\n
SNSシェア + ブランド名 タイトル行\n
============================================ */\n
.ec-productRole__titleRow {\n
display: flex;\n
align-items: center;\n
justify-content: space-between;\n
gap: 8px;\n
margin-bottom: 4px;\n
}\n
.ec-productRole__titleRow .ec-headingTitle {\n
margin: 0;\n
flex: 1;\n
font-size: 18px;\n
}\n
.ec-share-inline {\n
display: flex;\n
align-items: center;\n
gap: 8px;\n
flex-shrink: 0;\n
}\n
@media (max-width: 767px) {\n
/* maker_area の float を解除して独立表示 */\n
#maker_area {\n
float: none !important;\n
width: auto !important;\n
height: auto !important;\n
display: block;\n
margin-bottom: 4px;\n
}\n
/* タイトル行: 商品名が全幅を占有しSNSは右寄せ下段 */\n
.ec-productRole__titleRow {\n
flex-wrap: wrap;\n
clear: both;\n
}\n
.ec-productRole__titleRow .ec-headingTitle {\n
flex: 1 1 100%;\n
font-size: 16px;\n
}\n
.ec-share-inline {\n
flex: 0 0 auto;\n
margin-left: auto;\n
}\n
}\n
.ec-share-inline a {\n
display: flex;\n
align-items: center;\n
justify-content: center;\n
width: 32px;\n
height: 32px;\n
border-radius: 50%;\n
font-size: 15px;\n
color: #fff;\n
text-decoration: none;\n
transition: opacity 0.2s;\n
}\n
.ec-share-inline a:hover { opacity: 0.8; }\n
.ec-share-inline .share-twitter { background: #000; }\n
.ec-share-inline .share-facebook { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }\n
.ec-share-inline .share-line { background: #06c755; }\n
\n
/* description_detail下のシェアブロックはPC/スマホ共通で非表示(タイトル行に移動) */\n
.ec-productRole__share { display: none; }\n
\n
/* ============================================\n
PC用: 現在のお見積り額カード強調\n
============================================ */\n
@media (min-width: 768px) {\n
.mitsumori-card-pc {\n
border: 2px solid #1a6fcf !important;\n
border-radius: 10px !important;\n
box-shadow: 0 4px 16px rgba(26,111,207,0.18) !important;\n
margin-top: 20px;\n
overflow: hidden;\n
background: linear-gradient(135deg, #1a6fcf, #0d4fa0) !important;\n
}\n
.mitsumori-card-pc .card-header {\n
background: linear-gradient(135deg, #1a6fcf, #0d4fa0) !important;\n
color: #fff !important;\n
padding: 14px 16px !important;\n
border-bottom: none !important;\n
}\n
.mitsumori-card-pc .card-title {\n
color: #fff !important;\n
font-size: 15px !important;\n
font-weight: bold !important;\n
margin: 0 !important;\n
}\n
.mitsumori-card-pc #mitsumori_message {\n
font-size: 22px !important;\n
font-weight: bold !important;\n
color: #fff !important;\n
}\n
.mitsumori-card-pc .btn-tool {\n
color: #fff !important;\n
}\n
/* 合計行を大きく強調 */\n
.mitsumori-card-pc .nav-item:first-child .nav-link {\n
font-size: 16px !important;\n
font-weight: bold !important;\n
color: #c00 !important;\n
background: #fff8f8 !important;\n
padding: 12px 16px !important;\n
}\n
.mitsumori-card-pc .nav-item:first-child #mitsumori_goukei {\n
font-size: 20px !important;\n
font-weight: bold !important;\n
color: #c00 !important;\n
}\n
/* card-body(明細リスト)を白背景に */\n
.mitsumori-card-pc .card-body {\n
background: #fff !important;\n
}\n
.mitsumori-card-pc .card-footer {\n
background: #f8faff !important;\n
border-top: 1px solid #dce8fb !important;\n
padding: 12px 16px !important;\n
}\n
}\n
\n
@media (max-width: 767px) {\n
/* スマホでは現在のお見積り額カードの強調スタイルをすべてリセット */\n
.mitsumori-card-pc {\n
border: none !important;\n
border-radius: 0 !important;\n
box-shadow: none !important;\n
margin-top: 0 !important;\n
overflow: visible !important;\n
background: none !important;\n
}\n
.mitsumori-card-pc .card-header {\n
background: none !important;\n
color: inherit !important;\n
padding: inherit !important;\n
border-bottom: inherit !important;\n
}\n
.mitsumori-card-pc .card-title { color: inherit !important; }\n
.mitsumori-card-pc #mitsumori_message { font-size: inherit !important; color: inherit !important; }\n
.mitsumori-card-pc .btn-tool { color: inherit !important; }\n
/* 折りたたみトグルボタン */\n
.btn-mitsumori-toggle {\n
background: none !important;\n
border: 1px solid #aaa !important;\n
border-radius: 4px !important;\n
padding: 2px 8px !important;\n
font-size: 12px !important;\n
color: #333 !important;\n
line-height: 1.4 !important;\n
}\n
.btn-mitsumori-toggle .toggle-icon {\n
display: inline-block;\n
transition: transform 0.2s;\n
}\n
/* 展開状態: ▼→▲ */\n
.card:not(.collapsed-card) .btn-mitsumori-toggle .toggle-icon::before {\n
content: "▲ 閉じる";\n
}\n
.card:not(.collapsed-card) .btn-mitsumori-toggle .toggle-icon {\n
display: none;\n
}\n
.card:not(.collapsed-card) .btn-mitsumori-toggle::after {\n
content: "▲ 閉じる";\n
font-size: 12px;\n
}\n
.mitsumori-card-pc .nav-item:first-child .nav-link {\n
font-size: inherit !important;\n
color: inherit !important;\n
background: none !important;\n
padding: inherit !important;\n
}\n
.mitsumori-card-pc .nav-item:first-child #mitsumori_goukei {\n
font-size: inherit !important;\n
color: inherit !important;\n
}\n
.mitsumori-card-pc .card-footer {\n
background: none !important;\n
border-top: inherit !important;\n
padding: inherit !important;\n
}\n
/* 横スクロール禁止 */\n
body, html {\n
overflow-x: hidden;\n
max-width: 100vw;\n
}\n
/* ボタンの折り返しを許可(nowrapが原因で横スクロール発生するため) */\n
.opt-btn,\n
.rp-btn {\n
white-space: normal;\n
word-break: break-all;\n
}\n
/* エリア案内: スマホでコンパクト */\n
.ec-areaNotice {\n
margin: 8px 0;\n
padding: 8px 10px;\n
border-left-width: 3px;\n
cursor: pointer;\n
}\n
.ec-areaNotice__inner {\n
flex-direction: row;\n
gap: 8px;\n
align-items: flex-start;\n
}\n
.ec-areaNotice__icon { font-size: 15px; }\n
/* タイトル行: 展開トグル */\n
.ec-areaNotice__title {\n
font-size: 11px;\n
margin-bottom: 3px;\n
display: flex;\n
justify-content: space-between;\n
align-items: center;\n
}\n
.ec-areaNotice__title::after {\n
content: "▼";\n
font-size: 9px;\n
color: #888;\n
margin-left: 6px;\n
transition: transform 0.2s;\n
}\n
.ec-areaNotice.is-open .ec-areaNotice__title::after {\n
transform: rotate(180deg);\n
}\n
/* 折りたたみ対象: 閉じた状態では非表示 */\n
.ec-areaNotice__detail {\n
display: none;\n
}\n
.ec-areaNotice.is-open .ec-areaNotice__detail {\n
display: block;\n
}\n
.ec-areaNotice__text { font-size: 11px; line-height: 1.5; }\n
.ec-areaNotice__text br { display: none; }\n
.ec-areaNotice__link { font-size: 11px; margin-top: 3px; }\n
.rp-card { width: calc(33.333% - 6px); min-width: 80px; }\n
\n
#sp-mitsumori-bar {\n
display: flex;\n
position: fixed;\n
bottom: 0;\n
left: 0;\n
right: 0;\n
z-index: 1000;\n
background: #fff;\n
border-top: 2px solid #e0e0e0;\n
box-shadow: 0 -2px 8px rgba(0,0,0,0.12);\n
align-items: center;\n
padding: 8px 12px;\n
gap: 10px;\n
}\n
#sp-mitsumori-bar .sp-bar__label {\n
font-size: 11px;\n
color: #666;\n
white-space: nowrap;\n
}\n
#sp-mitsumori-bar .sp-bar__price {\n
font-size: 18px;\n
font-weight: bold;\n
color: #c00;\n
flex: 1;\n
}\n
#sp-mitsumori-bar .sp-bar__btn {\n
font-size: 12px;\n
padding: 8px 12px;\n
background: #333;\n
color: #fff;\n
border: none;\n
border-radius: 6px;\n
white-space: nowrap;\n
cursor: pointer;\n
}\n
/* 下部バーの高さ分ページ下部にpaddingを追加 */\n
body {\n
padding-bottom: 64px;\n
}\n
}\n
</style>\n
{% endblock %}\n
\n
{% block javascript %}\n
\n
<script>\n
eccube.classCategories = {{ class_categories_as_json(Product)|raw }};\n
\n
// 規格2に選択肢を割り当てる。\n
function fnSetClassCategories(form, classcat_id2_selected) {\n
var $form = $(form);\n
var product_id = $form.find('input[name=product_id]').val();\n
var $sele1 = $form.find('select[name=classcategory_id1]');\n
var $sele2 = $form.find('select[name=classcategory_id2]');\n
eccube.setClassCategories($form, product_id, $sele1, $sele2, classcat_id2_selected);\n
}\n
\n
{% if form.classcategory_id2 is defined %}\n
fnSetClassCategories(\n
$('#form1'), {{ form.classcategory_id2.vars.value|json_encode|raw }}\n
);\n
{% elseif form.classcategory_id1 is defined %}\n
eccube.checkStock($('#form1'), {{ Product.id }}, {{ form.classcategory_id1.vars.value|json_encode|raw }}, null);\n
{% endif %}\n
</script>\n
<script>\n
$(function() {\n
// bfcache無効化\n
$(window).bind('pageshow', function(event) {\n
if (event.originalEvent.persisted) {\n
location.reload(true);\n
}\n
});\n
\n
// Core Web Vital の Cumulative Layout Shift(CLS)対策のため\n
// img タグに width, height が付与されている.\n
// 630px 未満の画面サイズでは縦横比が壊れるための対策\n
// see https://github.com/EC-CUBE/ec-cube/pull/5023\n
$('.ec-grid2__cell').hide();\n
var removeSize = function () {\n
$('.slide-item').height('');\n
$('.slide-item img')\n
.removeAttr('width')\n
.removeAttr('height')\n
.removeAttr('style');\n
\n
};\n
var slickInitial = function(slick) {\n
$('.ec-grid2__cell').fadeIn(1500);\n
var baseHeight = $(slick.target).height();\n
var baseWidth = $(slick.target).width();\n
var rate = baseWidth / baseHeight;\n
\t\t\t\tif(baseHeight * rate < 400){\n
\t $('.slide-item').height(baseHeight * rate); // 余白を削除する\n
\t\t\t\t}else{\n
\t $('.slide-item').height(400); // 余白を削除する\n
\t\t\t\t}\n
// transform を使用することでCLSの影響を受けないようにする\n
$('.slide-item img')\n
.css(\n
{\n
'transform-origin': 'top left',\n
'transform': 'scaleY(' + rate + ')',\n
'transition': 'transform .1s'\n
}\n
);\n
// 正しいサイズに近くなったら属性を解除する\n
setTimeout(removeSize, 500);\n
};\n
$('.item_visual').on('init', slickInitial);\n
// リサイズ時は CLS の影響を受けないため属性を解除する\n
$(window).resize(removeSize);\n
$('.item_visual').slick({\n
dots: false,\n
arrows: true,\n
responsive: [{\n
breakpoint: 768,\n
settings: {\n
dots: true,\n
\t\tarrows: false\n
}\n
}]\n
});\n
\n
$('.slideThumb').on('click', function() {\n
var index = $(this).attr('data-index');\n
$('.item_visual').slick('slickGoTo', index, false);\n
})\n
});\n
\n
</script>\n
<script>\n
$(function() {\n
$('.add-cart').on('click', function(event) {\n
{% if form.classcategory_id1 is defined %}\n
// 規格1フォームの必須チェック\n
if ($('#classcategory_id1').val() == '__unselected' || $('#classcategory_id1').val() == '') {\n
$('#classcategory_id1')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');\n
return true;\n
} else {\n
$('#classcategory_id1')[0].setCustomValidity('');\n
}\n
{% endif %}\n
\n
{% if form.classcategory_id2 is defined %}\n
// 規格2フォームの必須チェック\n
if ($('#classcategory_id2').val() == '__unselected' || $('#classcategory_id2').val() == '') {\n
$('#classcategory_id2')[0].setCustomValidity('{{ '項目が選択されていません'|trans }}');\n
return true;\n
} else {\n
$('#classcategory_id2')[0].setCustomValidity('');\n
}\n
{% endif %}\n
\n
// タイプ2: カート送信直前に set_count を quantity に同期\n
if($('#set_count').length){\n
var _sc = parseInt($('#set_count').val()) || 1;\n
$('#quantity').val(_sc);\n
$('input[name="quantity"]').val(_sc);\n
}\n
\n
// 個数フォームのチェック\n
if ($('#quantity').val() < 1) {\n
$('#quantity')[0].setCustomValidity('{{ '1以上で入力してください。'|trans }}');\n
return true;\n
} else {\n
$('#quantity')[0].setCustomValidity('');\n
}\n
\n
event.preventDefault();\n
$form = $('#form1');\n
$.ajax({\n
url: $form.attr('action'),\n
type: $form.attr('method'),\n
data: $form.serialize(),\n
dataType: 'json',\n
beforeSend: function(xhr, settings) {\n
// Buttonを無効にする\n
$('.add-cart').prop('disabled', true);\n
}\n
}).done(function(data) {\n
// レスポンス内のメッセージをalertで表示\n
$.each(data.messages, function() {\n
$('#ec-modal-header').text(this);\n
});\n
\n
$('.ec-modal').show()\n
\n
// カートブロックを更新する\n
$.ajax({\n
url: "{{ url('block_cart') }}",\n
type: 'GET',\n
dataType: 'html'\n
}).done(function(html) {\n
$('.ec-headerRole__cart').html(html);\n
});\n
}).fail(function(data) {\n
alert('{{ '施工検討リストへの追加に失敗しました。'|trans }}');\n
}).always(function(data) {\n
// Buttonを有効にする\n
$('.add-cart').prop('disabled', false);\n
});\n
});\n
});\n
\n
$('.ec-modal-wrap').on('click', function(e) {\n
// モーダル内の処理は外側にバブリングさせない\n
e.stopPropagation();\n
});\n
$('.ec-modal-overlay, .ec-modal, .ec-modal-close, .ec-inlineBtn--cancel').on('click', function() {\n
$('.ec-modal').hide()\n
});\n
\n
\n
\t\tvar pw = "{% if mitsumori_json %}{{ mitsumori_json.pw }}{% endif %}";\n
\t\tvar pd = "{% if mitsumori_json %}{{ mitsumori_json.pd }}{% endif %}";\n
\t\tvar ph = "{% if mitsumori_json %}{{ mitsumori_json.ph }}{% endif %}";\n
\t\tvar pm = "{% if mitsumori_json %}{{ mitsumori_json.pm }}{% endif %}";\n
\t\tvar pc = "{% if mitsumori_json %}{{ mitsumori_json.pc }}{% endif %}";\n
\t\tvar op0 = "{% if mitsumori_json %}{{ mitsumori_json.op[0] }}{% endif %}";\n
\t\tvar op1 = "{% if mitsumori_json %}{{ mitsumori_json.op[1] }}{% endif %}";\n
\t\tvar op2 = "{% if mitsumori_json %}{{ mitsumori_json.op[2] }}{% endif %}";\n
\t\tvar op3 = "{% if mitsumori_json %}{{ mitsumori_json.op[3] }}{% endif %}";\n
\t\tvar op4 = "{% if mitsumori_json %}{{ mitsumori_json.op[4] }}{% endif %}";\n
\t\tvar op5 = "{% if mitsumori_json %}{{ mitsumori_json.op[5] }}{% endif %}";\n
\t\tvar op6 = "{% if mitsumori_json %}{{ mitsumori_json.op[6] }}{% endif %}";\n
\t\tvar op7 = "{% if mitsumori_json %}{{ mitsumori_json.op[7] }}{% endif %}";\n
\t\tvar op8 = "{% if mitsumori_json %}{{ mitsumori_json.op[8] }}{% endif %}";\n
\t\tvar op9 = "{% if mitsumori_json %}{{ mitsumori_json.op[9] }}{% endif %}";\n
\t\tvar op10 = "{% if mitsumori_json %}{{ mitsumori_json.op[10] }}{% endif %}";\n
\n
\t\tconst formatter = new Intl.NumberFormat('ja-JP');\n
\n
\t\tfunction mitsumori_simulation(type , value_id){\n
\t\t\tvar pp = {{ pp|raw }};\n
\t\t\tif(type == "pw"){\n
\t\t\t\tpw = $('#'+value_id).val();\n
\t\t\t}\n
\t\t\tif(type == "pd"){\n
\t\t\t\tpd = $('#'+value_id).val();\n
\t\t\t}\n
\t\t\tif(type == "ph"){\n
\t\t\t\tph = $('#'+value_id).val();\n
\t\t\t}\n
\t\t\tif(type == "pm"){\n
\t\t\t\tpm = $('#'+value_id).val();\n
\t\t\t}\n
\t\t\tif(type == "pc"){\n
\t\t\t\tpc = $('#'+value_id).val();\n
\t\t\t}\n
\t\t\tif(type == "op0"){ op0 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op1"){ op1 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op2"){ op2 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op3"){ op3 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op4"){ op4 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op5"){ op5 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op6"){ op6 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op7"){ op7 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op8"){ op8 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op9"){ op9 = $('#'+value_id).val(); }\n
\t\t\tif(type == "op10"){ op10 = $('#'+value_id).val(); }\n
\n
\t\t\tif(pm == ""){\n
\t\t\t\t$('#mitsumori_message').text("素材を選択してください");\n
\t\t\t}\n
\t\t\tif(ph == ""){\n
\t\t\t\t$('#mitsumori_message').text("高さを選択してください");\n
\t\t\t}\n
\t\t\tif(pd == ""){\n
\t\t\t\t$('#mitsumori_message').text("奥行きを選択してください");\n
\t\t\t}\n
\t\t\tif(pw == ""){\n
\t\t\t\t$('#mitsumori_message').text("幅を選択してください");\n
\t\t\t}\n
\t\t\tif(pc == ""){\n
\t\t\t\t$('#mitsumori_message').text("カラーを選択してください");\n
\t\t\t\t$('#mitsumori_btn').hide();\n
\t\t\t\t$('#mitsumori_goukei').text("---円");\n
\t\t\t\t$('#mitsumori_off').text("---円");\n
\t\t\t\t$('#mitsumori_price').text("---円");\n
\t\t\t\t$('#maker_price').text("---円");\n
\t\t\t\t$('#mitsumori_ct').text("---円");\n
\t\t\t\t$('#mitsumori_option').text("---円");\n
\t\t\t}\n
\t\t\tif(pw != "" && pd != "" && ph != "" && pm != "" && pc != ""){\n
\t\t\t\t$('#mitsumori_btn').show();\n
\n
\t\t\t\tvar pp_matched = false;\n
\t\t\t\tpp.forEach((el) => {\n
\t\t\t\t if((pw == el.w || pw == "指定なし") && (pd == el.d || pd == "指定なし") && (ph == el.h || ph == "指定なし") && (pm == el.m || pm == "指定なし") && (pc == el.c || pc == "指定なし")){\n
\t\t\t\t\tpp_matched = true;\n
\n
\t\t\t\t\tif(op0 == "商品購入のみ" || op1 == "商品購入のみ" || op2 == "商品購入のみ" || op3 == "商品購入のみ" || op4 == "商品購入のみ"\n
\t\t\t\t\t\t|| op5 == "商品購入のみ" || op6 == "商品購入のみ" || op7 == "商品購入のみ" || op8 == "商品購入のみ" || op9 == "商品購入のみ"){\n
\t\t\t\t\t \t$('#mitsumori_message').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_goukei').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_ct').text("0円");\n
\t\t\t\t\t \t$('#mitsumori_option').text("0円");\n
\n
\t\t\t\t\t \t$('#mitsumori_kei').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_ct_01').text("0円");\n
\t\t\t\t\t \t$('#mitsumori_ct_02').text("0円");\n
\t\t\t\t\t \t$('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price)) + "円");\n
\n
\t\t\t\t\t\tmitsumori_goukei = (parseInt(el.price));\n
\t\t\t\t\t\tshoukei = mitsumori_goukei / 1.1;\n
\t\t\t\t\t\ttax = parseInt(mitsumori_goukei - shoukei);\n
\t\t\t\t\t \t$('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");\n
\t\t\t\t\t}else{\n
\t\t\t\t\t \t$('#mitsumori_message').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_goukei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_off').text(formatter.format(parseInt(el.price) - parseInt(el.maker_price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_price').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#maker_price').text(formatter.format(parseInt(el.maker_price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_ct').text(formatter.format(parseInt(el.ct)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_option').text("0円");\n
\n
\t\t\t\t\t \t$('#mitsumori_kei').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");\n
\n
\n
\t\t\t\t\t \t$('#mitsumori_price_01').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_price_02').text(formatter.format(parseInt(el.price)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_ct_01').text(formatter.format(parseInt(el.ct)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_ct_02').text(formatter.format(parseInt(el.ct)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_goukei_02').text(formatter.format(parseInt(el.price) + parseInt(el.ct)) + "円");\n
\n
\t\t\t\t\t\tmitsumori_goukei = (parseInt(el.price) + parseInt(el.ct));\n
\t\t\t\t\t\tshoukei = mitsumori_goukei / 1.1;\n
\t\t\t\t\t\ttax = parseInt(mitsumori_goukei - shoukei);\n
\n
\t\t\t\t\t \t$('#mitsumori_shoukei').text(formatter.format(parseInt(shoukei)) + "円");\n
\t\t\t\t\t \t$('#mitsumori_tax').text(formatter.format(parseInt(tax)) + "円");\n
\n
\t\t\t\t\t}\n
\t\t\t\t }\n
\t\t\t\t});\n
\n
\t\t\t\tif (!pp_matched) {\n
\t\t\t\t\t$('#mitsumori_message').text("この組み合わせは対応しておりません");\n
\t\t\t\t\t$('#mitsumori_btn').hide();\n
\t\t\t\t\t$('#mitsumori_goukei').text("---円");\n
\t\t\t\t\t$('#mitsumori_off').text("---円");\n
\t\t\t\t\t$('#mitsumori_price').text("---円");\n
\t\t\t\t\t$('#maker_price').text("---円");\n
\t\t\t\t\t$('#mitsumori_ct').text("---円");\n
\t\t\t\t\t$('#mitsumori_option').text("---円");\n
\t\t\t\t\t$('#mitsumori_kei').text("---円");\n
\t\t\t\t\t$('#mitsumori_shoukei').text("---円");\n
\t\t\t\t\t$('#mitsumori_tax').text("---円");\n
\t\t\t\t}\t\n
\n
\n
\t\t\t\t// タイプ5: ステップ・フェンス・面積の現在値を取得\n
\t\t\t\tif($('input[name=deck_step]:checked').length){ deck_step = $('input[name=deck_step]:checked').val(); }\n
\t\t\t\tif($('input[name=deck_fence]:checked').length){ deck_fence = $('input[name=deck_fence]:checked').val(); }\n
\n
\t\t\t\t// タイプ2: 窓サイズ・窓タイプ・ガラスタイプ・セット数\n
\t\t\t\tvar mado_w_val = $('#mado_w').val() || '';\n
\t\t\t\tvar mado_h_val = $('#mado_h').val() || '';\n
\t\t\t\tvar mado_type_val = $('input[name=mado_type]:checked').val() || '';\n
\t\t\t\tvar glass_type_val = $('input[name=glass_type]:checked').val() || '';\n
\t\t\t\tvar set_count_val = parseInt($('#set_count').val()) || 1;\n
\n
\t\t\t\t// タイプ3: 台数\n
\t\t\t\tvar daisu_val = parseInt($('#daisu').val()) || 1;\n
\n
\t\t\t\t// タイプ4・6: 枚数\n
\t\t\t\tvar maisu_val = parseInt($('#maisu').val()) || 1;\n
\n
\t\t\t\t// タイプ5: 面積\n
\t\t\t\tvar area_val = $('#area').val() || '';\n
\n
\t\t\t\t// sale_type\n
\t\t\t\tvar sale_type_id = {{ ProductClass.SaleType.id }};\n
\n
\t\t\t\tvar mitsumori_json = { "mitsumori_goukei": $('#mitsumori_goukei').text(),\n
\t\t\t\t\t\t\t\t\t\t"mitsumori_goukei_02": $('#mitsumori_goukei_02').text(),\n
\t\t\t\t\t\t\t\t\t\t"mitsumori_price": $('#mitsumori_price').text(),\n
\t\t\t\t\t\t\t\t\t\t"maker_price": $('#maker_price').text(),\n
\t\t\t\t\t\t\t\t\t\t"mitsumori_off": $('#mitsumori_off').text(),\n
\t\t\t\t\t\t\t\t\t\t"mitsumori_ct": $('#mitsumori_ct').text(),\n
\t\t\t\t\t\t\t\t\t\t"mitsumori_option": $('#mitsumori_option').text(),\n
\t\t\t\t\t\t\t\t\t\t"product_id": {{ Product.id }},\n
\t\t\t\t\t\t\t\t\t\t"sale_type": sale_type_id,\n
\t\t\t\t\t\t\t\t\t\t"pw": pw,\n
\t\t\t\t\t\t\t\t\t\t"pd": pd,\n
\t\t\t\t\t\t\t\t\t\t"ph": ph,\n
\t\t\t\t\t\t\t\t\t\t"pm": pm,\n
\t\t\t\t\t\t\t\t\t\t"pc": pc,\n
\t\t\t\t\t\t\t\t\t\t"op": [op0,op1,op2,op3,op4,op5,op6,op7,op8,op9,op10],\n
\t\t\t\t\t\t\t\t\t\t"mado_w": mado_w_val,\n
\t\t\t\t\t\t\t\t\t\t"mado_h": mado_h_val,\n
\t\t\t\t\t\t\t\t\t\t"mado_type": mado_type_val,\n
\t\t\t\t\t\t\t\t\t\t"glass_type": glass_type_val,\n
\t\t\t\t\t\t\t\t\t\t"set_count": set_count_val,\n
\t\t\t\t\t\t\t\t\t\t"daisu": daisu_val,\n
\t\t\t\t\t\t\t\t\t\t"maisu": maisu_val,\n
\t\t\t\t\t\t\t\t\t\t"area": area_val,\n
\t\t\t\t\t\t\t\t\t\t"deck_step": deck_step,\n
\t\t\t\t\t\t\t\t\t\t"deck_fence": deck_fence };\n
\n
\t\t\t\t$('#mitsumori_json').val(JSON.stringify(mitsumori_json));\n
\t\t\t\t\n
\t\t\t}\n
\t\t\t\n
\n
\t\t}\n
\n
{% if color and color|length == 1 %}\n
pc = "指定なし";\n
\t\t\t{% for cc in color %}{% if cc and cc['name'] %} pc = "{{ cc['name'] }}"; {% endif %}{% endfor %}\n
\t\t{% endif %}\n
\n
{% if p_w and (p_w|length == 1 or p_w|join == "") %}\n
pw = "指定なし";\n
\t\t\t{% for pw in p_w %}{% if pw %} pw = "{{ pw }}"; {% endif %}{% endfor %}\n
\t\t{% endif %}\n
\n
{% if p_d and (p_d|length == 1 or p_d|join == "") %}\n
pd = "指定なし";\n
\t\t\t{% for pd in p_d %}{% if pd %} pd = "{{ pd }}"; {% endif %}{% endfor %}\n
\t\t{% endif %}\n
\n
{% if p_h and (p_h|length == 1 or p_h|join == "") %}\n
ph = "指定なし";\n
\t\t\t{% for ph in p_h %}{% if ph %} ph = "{{ ph }}"; {% endif %}{% endfor %}\n
\t\t{% endif %}\n
\n
{% if p_m and (p_m|length == 1 or p_m|join == "") %}\n
pm = "指定なし";\n
\t\t\t{% for pm in p_m %}{% if pm %} pm = "{{ pm }}"; {% endif %}{% endfor %}\n
\t\t{% endif %}\n
\n
\t\t// ページ読み込み時: タイプ別に quantity の初期値をセット\n
\t\t(function initQuantityByType(){\n
\t\t\tvar saleType = {{ ProductClass.SaleType.id }};\n
\t\t\tif(saleType == 2 && $('#set_count').length){\n
\t\t\t\tvar _v = parseInt($('#set_count').val()) || 1;\n
\t\t\t\t$('#quantity').val(_v);\n
\t\t\t\t$('input[name="quantity"]').val(_v);\n
\t\t\t} else if(saleType == 3 && $('#daisu').length){\n
\t\t\t\t$('#quantity').val(parseInt($('#daisu').val()) || 1);\n
\t\t\t} else if((saleType == 4 || saleType == 6) && $('#maisu').length){\n
\t\t\t\t$('#quantity').val(parseInt($('#maisu').val()) || 1);\n
\t\t\t} else if(saleType == 9 && $('#quantity_only').length){\n
\t\t\t\t$('#quantity').val(parseInt($('#quantity_only').val()) || 1);\n
\t\t\t}\n
\t\t})();\n
\n
\t\t// type → ラベルのプレフィックス文字列\n
\t\tvar optLabelMap = {pc:'カラー', pw:'幅', pd:'奥行き', ph:'高さ', pm:'素材'};\n
\t\t// type → input[name]\n
\t\tvar optNameMap = {pc:'color', pw:'pw', pd:'pd', ph:'ph', pm:'pm'};\n
\n
\t\t// opt-btn用: 値を直接受け取るラッパー\n
\t\tfunction mitsumori_simulation_val(type, value) {\n
\t\t\tif (type === 'pc') pc = value;\n
\t\t\tif (type === 'pw') pw = value;\n
\t\t\tif (type === 'pd') pd = value;\n
\t\t\tif (type === 'ph') ph = value;\n
\t\t\tif (type === 'pm') pm = value;\n
\n
\t\t\t// is-selected クラスを同グループ内で付け替え\n
\t\t\tvar inputName = optNameMap[type];\n
\t\t\tif (inputName) {\n
\t\t\t\tvar $btns = $('input[name="' + inputName + '"]').closest('.opt-btn');\n
\t\t\t\t$btns.removeClass('is-selected');\n
\t\t\t\t$btns.filter(function(){\n
\t\t\t\t\treturn $(this).find('input').val() === value;\n
\t\t\t\t}).addClass('is-selected');\n
\t\t\t}\n
\n
\t\t\t// ラベル行の選択値テキストを更新(例: 「カラー: ブラック」)\n
\t\t\tvar labelPrefix = optLabelMap[type];\n
\t\t\tif (labelPrefix) {\n
\t\t\t\t// 対象のrp-section-labelを特定(input[name]を含む親を遡る)\n
\t\t\t\tvar $group = $('input[name="' + inputName + '"]').first().closest('.form-group');\n
\t\t\t\tvar $label = $group.find('.rp-section-label');\n
\t\t\t\t$label.html(labelPrefix + ': <span>' + value + '</span>');\n
\t\t\t}\n
\n
\t\t\t// simulation本体を呼ぶ(value_idは空でOK、グローバル変数を使う)\n
\t\t\tmitsumori_simulation('', '');\n
\t\t}\n
\n
\t\tmitsumori_simulation("","");\n
\n
\t\t// onload: 見積金額が確定している場合は「工事費込み価格」表示を一致させる\n
\t\t(function syncPrice02Display() {\n
\t\t\tvar goukeiEl = document.getElementById('mitsumori_goukei');\n
\t\t\tvar displayEl = document.getElementById('price02-display');\n
\t\t\tif (!goukeiEl || !displayEl) return;\n
\t\t\tvar goukeiText = goukeiEl.textContent.trim();\n
\t\t\t// ---円(未確定)の場合は書き換えない\n
\t\t\tif (goukeiText && goukeiText !== '---円') {\n
\t\t\t\tdisplayEl.textContent = goukeiText;\n
\t\t\t}\n
\t\t\t// 以降の変更にも追従: mitsumori_goukei を監視\n
\t\t\tnew MutationObserver(function() {\n
\t\t\t\tvar text = goukeiEl.textContent.trim();\n
\t\t\t\tif (text && text !== '---円') {\n
\t\t\t\t\tdisplayEl.textContent = text;\n
\t\t\t\t}\n
\t\t\t}).observe(goukeiEl, { childList: true, subtree: true, characterData: true });\n
\t\t})();\n
\t\tfunction contact_form(product_id){\n
\t\t\t$('#form1').attr('action', '{{ url('contact', {product:Product.id}) }}');\n
\t\t\t$('#form1').submit();\n
\t\t}\n
\n
\t\t// maisu / madoset は下部の新しい関数定義を使用\n
\n
\n
\t\tfunction heibei(bei){\n
\t\t\t$('#heibei').val(parseInt($('#heibei').val()) + bei);\n
\t\t\tif(parseInt($('#heibei').val()) < 1){ $('#heibei').val(1); }\n
\t\t\tif(parseInt($('#heibei').val()) > 100){ $('#heibei').val(100); }\n
\t\t\t$('#quantity').val($('#heibei').val());\n
\t\t\tmitsumori_simulation('heibei','heibei');\n
\t\t}\n
\t\tfunction daisu(dai){\n
\t\t\t$('#daisu').val(parseInt($('#daisu').val()) + dai);\n
\t\t\tif(parseInt($('#daisu').val()) < 1){ $('#daisu').val(1); }\n
\t\t\tif(parseInt($('#daisu').val()) > 10){ $('#daisu').val(10); }\n
\t\t\t$('#quantity').val($('#daisu').val());\n
\t\t\tmitsumori_simulation('daisu','daisu');\n
\t\t}\n
\t\tfunction maisu(mai){\n
\t\t\t$('#maisu').val(parseInt($('#maisu').val()) + mai);\n
\t\t\tif(parseInt($('#maisu').val()) < 1){ $('#maisu').val(1); }\n
\t\t\tif(parseInt($('#maisu').val()) > 100){ $('#maisu').val(100); }\n
\t\t\t$('#quantity').val($('#maisu').val());\n
\t\t\tmitsumori_simulation('maisu','maisu');\n
\t\t}\n
\n
\t\t// タイプ2: セット数プルダウン連動\n
\t\tfunction madosetSelect(val){\n
\t\t\tvar v = parseInt(val);\n
\t\t\tif(v < 1) v = 1;\n
\t\t\tif(v > 20) v = 20;\n
\t\t\t// id="quantity" と name="quantity" 両方を確実に書き換え\n
\t\t\t$('#quantity').val(v);\n
\t\t\t$('input[name="quantity"]').val(v);\n
\t\t\tmitsumori_simulation('set','set_count');\n
\t\t}\n
\t\t// タイプ2: ±ボタン版(後方互換)\n
\t\tfunction madoset(mai){\n
\t\t\tvar current = parseInt($('#set_count').val()) || 1;\n
\t\t\tvar next = current + mai;\n
\t\t\tif(next < 1) next = 1;\n
\t\t\tif(next > 20) next = 20;\n
\t\t\t$('#set_count').val(next);\n
\t\t\tmadosetSelect(next);\n
\t\t}\n
\n
\t\t// タイプ5: ステップ・フェンス選択値を mitsumori_json に保存するためのグローバル変数\n
\t\tvar deck_step = "{% if mitsumori_json %}{{ mitsumori_json.deck_step|default('不要') }}{% else %}不要{% endif %}";\n
\t\tvar deck_fence = "{% if mitsumori_json %}{{ mitsumori_json.deck_fence|default('不要') }}{% else %}不要{% endif %}";\n
\n
\t\t// PDF出力: モーダルの mitsumori_json をフォームに同期してから送信\n
\t\tfunction syncPdfJson(){\n
\t\t\tvar jsonVal = $('#mitsumori_json').val();\n
\t\t\t$('#pdf_mitsumori_json').val(jsonVal);\n
\t\t}\n
\n
\t\t// タイプ9: 商品のみ購入\n
\t\tfunction quantityOnly(val){\n
\t\t\tvar current = parseInt($('#quantity_only').val()) || 1;\n
\t\t\tvar next = current + val;\n
\t\t\tif(next < 1) next = 1;\n
\t\t\t$('#quantity_only').val(next);\n
\t\t\t$('#quantity').val(next);\n
\t\t}\n
\n
// ===== スマホ用下部固定バーへの金額同期 =====\n
// mitsumori_message と mitsumori_goukei を監視して下部バーを更新\n
(function() {\n
var msgTarget = document.getElementById('mitsumori_message');\n
var goukeiTarget = document.getElementById('mitsumori_goukei');\n
var spPrice = document.getElementById('sp-mitsumori-price');\n
var spBtn = document.querySelector('#sp-mitsumori-bar .sp-bar__btn');\n
if (!spPrice || !spBtn) return;\n
\n
function syncBar() {\n
var msg = msgTarget ? msgTarget.textContent : '';\n
var goukei = goukeiTarget ? goukeiTarget.textContent : '---円';\n
\n
// メッセージが「〇〇を選択してください」の場合はメッセージを表示しボタンを非表示\n
if (msg.indexOf('選択してください') !== -1) {\n
spPrice.textContent = msg;\n
spPrice.style.fontSize = '13px';\n
spPrice.style.color = '#888';\n
spBtn.style.display = 'none';\n
} else {\n
// 価格確定時はボタンを表示\n
spPrice.textContent = goukei;\n
spPrice.style.fontSize = '18px';\n
spPrice.style.color = '#c00';\n
spBtn.style.display = 'block';\n
}\n
}\n
\n
// 初期値を同期\n
syncBar();\n
\n
// mitsumori_message の変化を監視\n
if (msgTarget) {\n
new MutationObserver(syncBar).observe(\n
msgTarget, { childList: true, subtree: true, characterData: true }\n
);\n
}\n
// mitsumori_goukei の変化も監視\n
if (goukeiTarget) {\n
new MutationObserver(syncBar).observe(\n
goukeiTarget, { childList: true, subtree: true, characterData: true }\n
);\n
}\n
})();\n
\n
// ===== 現在のお見積り額: 折りたたみトグルボタンのテキスト切り替え =====\n
(function() {\n
var card = document.querySelector('.mitsumori-card-pc');\n
var btn = document.querySelector('.btn-mitsumori-toggle .toggle-icon');\n
if (!card || !btn) return;\n
// MutationObserverでcollapsed-cardクラスの変化を監視\n
new MutationObserver(function() {\n
if (card.classList.contains('collapsed-card')) {\n
btn.textContent = '▼ 詳細';\n
} else {\n
btn.textContent = '▲ 閉じる';\n
}\n
}).observe(card, { attributes: true, attributeFilter: ['class'] });\n
})();\n
\n
// ===== エリア案内: スマホのみタップで展開 =====\n
(function() {\n
var notice = document.querySelector('.ec-areaNotice');\n
if (!notice) return;\n
notice.addEventListener('click', function(e) {\n
if (window.innerWidth > 767) return;\n
// リンククリック時は展開/折りたたみせずリンク遷移\n
if (e.target.tagName === 'A') return;\n
notice.classList.toggle('is-open');\n
});\n
})();\n
\n
</script>\n
<script type="application/ld+json">\n
{\n
"@context": "https://schema.org/",\n
"@type": "Product",\n
"name": "{{ Product.name }}",\n
"image": [\n
{% for img in Product.ProductImage %}\n
"{{ app.request.schemeAndHttpHost }}{{ asset(img, 'save_image') }}"{% if not loop.last %},{% endif %}\n
\n
{% else %}\n
"{{ app.request.schemeAndHttpHost }}{{ asset(''|no_image_product, 'save_image') }}"\n
{% endfor %}\n
],\n
"description": "{{ Product.description_list | default(Product.description_detail) | replace({'\n': '', '\r': ''}) | slice(0,300) }}",\n
{% if Product.code_min %}\n
"sku": "{{ Product.code_min }}",\n
{% endif %}\n
"offers": {\n
"@type": "Offer",\n
"url": "{{ url('product_detail', {'id': Product.id}) }}",\n
"priceCurrency": "{{ eccube_config.currency }}",\n
"price": {{ Product.getPrice02IncTaxMin ? Product.getPrice02IncTaxMin : 0}},\n
"availability": "{{ Product.stock_find ? "InStock" : "OutOfStock" }}"\n
}\n
}\n
</script>\n
\n
{% endblock %}\n
\n
{% block main %}\n
<div class="ec-productRole" style="margin-top:20px;">\n
<div class="ec-grid2">\n
<div class="ec-grid2__cell">\n
<div class="ec-sliderItemRole">\n
\t {# 商品名 + ブランド名 + SNSシェア #}\n
\t <div class="ec-productRole__title">\n
\t <div class="ec-productRole__titleRow">\n
\t <h2 class="ec-headingTitle">{{ Product.name }}</h2>\n
\t <div class="ec-share-inline">\n
\t <a href="https://twitter.com/share?url={{ app.request.uri|url_encode }}&text={{ Product.name|url_encode }}"\n
\t class="share-twitter" target="_blank" rel="noreferrer noopener" title="Xでシェア">\n
\t <svg viewBox="0 0 24 24" style="width:15px;height:15px;fill:#fff;"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.74l7.73-8.835L1.254 2.25H8.08l4.254 5.622L18.244 2.25zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>\n
\t </a>\n
\t <a href="https://www.instagram.com/" class="share-facebook" target="_blank" rel="noreferrer noopener" title="Instagram">\n
\t <svg viewBox="0 0 24 24" style="width:15px;height:15px;fill:#fff;"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>\n
\t </a>\n
\t <a href="https://social-plugins.line.me/lineit/share?url={{ app.request.uri|url_encode }}"\n
\t class="share-line" target="_blank" rel="noreferrer noopener" title="LINEでシェア">\n
\t <i class="fab fa-line"></i>\n
\t </a>\n
\t </div>\n
\t </div>\n
\t </div>\n
{% if BaseInfo.option_favorite_product %}\n
<div style="position:relative;top: 20px;left: 10px;z-index:100;">\n
\t\t\t\t\t\t{% if is_favorite == false %}\n
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">\n
<button type="submit" id="favorite" class="favorite">♡</button>\n
</form>\n
{% else %}\n
<form action="{{ url('product_add_favorite', {id:Product.id}) }}" method="post">\n
<button type="submit" id="favorite" class="favorite" style="color:red;">♥</button>\n
</form>\n
{% endif %}\n
</div>\n
{% endif %}\n
<div class="item_visual">\n
{% for ProductImage in Product.ProductImage %}\n
<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>\n
{% else %}\n
<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>\n
{% endfor %}\n
</div>\n
<div class="item_nav">\n
{% for ProductImage in Product.ProductImage %}\n
<div class="slideThumb" data-index="{{ loop.index0 }}"><img src="{{ asset(ProductImage, 'save_image') }}" alt="" width="80" height="80" loading="lazy"></div>\n
{% endfor %}\n
</div>\n
\n
</div>\n
\n
{# ===== 施工エリア案内(見積シミュレーションの下)===== #}\n
<div class="ec-areaNotice" style="margin-top:16px;margin-right:10px;">\n
<div class="ec-areaNotice__inner">\n
<div class="ec-areaNotice__icon">📍</div>\n
<div class="ec-areaNotice__body">\n
<p class="ec-areaNotice__title">施工対応エリアについて</p>\n
<div class="ec-areaNotice__detail">\n
<p class="ec-areaNotice__text">\n
当店の施工サービスは、<strong>山梨県全域</strong>および<br>\n
<strong>諏訪エリア(諏訪市・岡谷市・茅野市・諏訪郡)</strong>を対象としております。<br>\n
上記エリア外のお客様には、商品のみのご購入が可能でございます。<br>\n
ご不明な点がございましたら、お気軽にお問い合わせください。\n
</p>\n
<a class="ec-areaNotice__link" href="{{ url('contact') }}">エリア外のお客様・ご相談はこちら →</a>\n
</div>\n
</div>\n
</div>\n
</div>\n
\n
</div>\n
\n
<div class="ec-grid2__cell2">\n
<div class="ec-productRole__profile" >\n
{# 関連カテゴリ #}\n
{% if Product.ProductCategories is not empty %}\n
<div class="ec-productRole__category" style="padding:10px 0;">\n
{% for ProductCategory in Product.ProductCategories %}\n
<ul>\n
<li>\n
{% for Category in ProductCategory.Category.path %}\n
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">{{ Category.name }}</a> {%- if loop.last == false %}\n
<span>></span>{% endif -%}\n
{% endfor %}\n
</li>\n
</ul>\n
{% endfor %}\n
</div>\n
{% endif %}\n
{# 販売価格 #}\n
<div class="ec-productRole__price">\n
\t\t\t\t\t\t<span style="color:black;font-size:15px;">工事費込み価格</span>\n
{% if Product.hasProductClass -%}\n
{% if Product.getPrice02IncTaxMin == Product.getPrice02IncTaxMax %}\n
<div class="ec-price">\n
<span id="price02-display" class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }}</span>\n
<span class="ec-price__tax">({{ '税込'|trans }})~</span>\n
</div>\n
{% else %}\n
<div class="ec-price">\n
<span id="price02-display" class="ec-price__price price02-default">{{ Product.getPrice02IncTaxMin|price }} ~ {{ Product.getPrice02IncTaxMax|price }}</span>\n
<span class="ec-price__tax">({{ '税込'|trans }})</span>\n
</div>\n
{% endif %}\n
{% else %}\n
<div class="ec-price">\n
<span id="price02-display" class="ec-price__price">{{ Product.getPrice02IncTaxMin|price }}</span>\n
<span class="ec-price__tax">({{ '税込'|trans }})~</span>\n
</div>\n
{% endif %}\n
</div>\n
{# タグ #}\n
<ul class="ec-productRole__tags">\n
{% for Tag in Product.Tags %}\n
<li class="ec-productRole__tag tag_{{ Tag.id }}">{{ Tag }}</li>\n
{% endfor %}\n
</ul>\n
{# 商品コード #}\n
{% if Product.code_min is not empty %}\n
<div class="ec-productRole__code">\n
{{ '商品コード'|trans }}: <span class="product-code-default">{{ Product.code_min }}{% if Product.code_min != Product.code_max %} ~ {{ Product.code_max }}{% endif %}</span>\n
</div>\n
{% endif %}\n
\n
<div class="ec-productRole__description">\n
\t\t\t\t <div class="ec-rectHeading">\n
\t\t\t\t <h4>製品情報</h4>\n
\t\t\t\t </div>\n
\t\t\t\t\t\t{{ Product.sales_infomation|raw|nl2br }}\n
</div>\n
\n
\n
\t\t\t\t\t<div class="card card-danger" style="clear:both;margin:1px;">\n
\t\t\t\t\t <div class="card-header">\n
\t\t\t\t\t <h3 class="card-title">見積シミュレーション</h3>\n
\t\t\t\t\t </div>\n
\t\t\t\t\t <div class="card-body p-2">\n
{% set related_image = getProduct_field(Product.id,"related_image") %}\n
{# related_image は配列: ["1段目画像あり","2段目画像あり","3段目画像あり"] のうち該当するものが格納 #}\n
{% set img1 = related_image and ("1段目画像あり" in related_image) %}\n
{% set img2 = related_image and ("2段目画像あり" in related_image) %}\n
{% set img3 = related_image and ("3段目画像あり" in related_image) %}\n
{% set img4 = related_image and ("4段目画像あり" in related_image) %}\n
\t\t\t\t\t {% set type1 = getProduct_field(Product.id,"related_name1") %}\n
\t\t\t\t\t\t{% set type2 = getProduct_field(Product.id,"related_name2") %}\n
\t\t\t\t\t\t{% set type3 = getProduct_field(Product.id,"related_name3") %}\n
\t\t\t\t\t\t{% set type4 = getProduct_field(Product.id,"related_name4") %}\n
\t\t\t\t\t\t{% set hasRelated = (type1 and related_product1 and related_product1|length)\n
\t\t\t\t\t\t or (type2 and related_product2 and related_product2|length)\n
\t\t\t\t\t\t or (type3 and related_product3 and related_product3|length)\n
\t\t\t\t\t\t or (type4 and related_product4 and related_product4|length) %}\n
\t\t\t\t\t\t{% if hasRelated %}\n
\t\t\t\t\t\t <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のタイプを選択してください。</label></div>\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t{# ===== 1段目 ===== #}\n
\t\t\t\t\t\t{% if type1 and related_product1 and related_product1|length %}\n
\t\t\t\t\t\t<div class="form-group mt-3 pb-3" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t <div class="rp-section-label">{{ type1 }}{% if img1 and base_select1 %}: <span>{{ base_select1 }}</span>{% endif %}</div>\n
\t\t\t\t\t\t {% if img1 %}\n
\t\t\t\t\t\t {# --- 画像付きカード --- #}\n
\t\t\t\t\t\t <div class="rp-card-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product1 %}\n
\t\t\t\t\t\t <label class="rp-card{% if base_select1 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp1" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select1 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t <img class="rp-card__image"\n
\t\t\t\t\t\t src="{{ asset('p' ~ rp_id ~ '_cp_1.jpg', 'save_image') }}"\n
\t\t\t\t\t\t alt="{{ rp_name }}"\n
\t\t\t\t\t\t onerror="this.style.display='none';this.nextElementSibling.style.display='flex';">\n
\t\t\t\t\t\t <div class="rp-card__placeholder" style="display:none;">📦</div>\n
\t\t\t\t\t\t <span class="rp-card__name">{{ rp_name }}</span>\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% elseif related_product1|length >= 9 %}\n
\t\t\t\t\t\t {# --- プルダウン(9個以上)--- #}\n
\t\t\t\t\t\t <div class="rp-select-wrap">\n
\t\t\t\t\t\t <select class="rp-select" onchange="location.href='/products/detail/'+this.value;">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product1 %}\n
\t\t\t\t\t\t <option value="{{ rp_id }}"{% if base_select1 == rp_name %} selected{% endif %}>{{ rp_name }}</option>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </select>\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% else %}\n
\t\t\t\t\t\t {# --- ボタン式ラジオ(8個以内)--- #}\n
\t\t\t\t\t\t <div class="rp-btn-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product1 %}\n
\t\t\t\t\t\t <label class="rp-btn{% if base_select1 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp1" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select1 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t {{ rp_name }}\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% endif %}\n
\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t{# ===== 2段目 ===== #}\n
\t\t\t\t\t\t{% if type2 and related_product2 and related_product2|length %}\n
\t\t\t\t\t\t<div class="form-group mt-3 pb-3" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t <div class="rp-section-label">{{ type2 }}{% if img2 and base_select2 %}: <span>{{ base_select2 }}</span>{% endif %}</div>\n
\t\t\t\t\t\t {% if img2 %}\n
\t\t\t\t\t\t <div class="rp-card-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product2 %}\n
\t\t\t\t\t\t <label class="rp-card{% if base_select2 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp2" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select2 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t <img class="rp-card__image"\n
\t\t\t\t\t\t src="{{ asset('p' ~ rp_id ~ '_cp_1.jpg', 'save_image') }}"\n
\t\t\t\t\t\t alt="{{ rp_name }}"\n
\t\t\t\t\t\t onerror="this.style.display='none';this.nextElementSibling.style.display='flex';">\n
\t\t\t\t\t\t <div class="rp-card__placeholder" style="display:none;">📦</div>\n
\t\t\t\t\t\t <span class="rp-card__name">{{ rp_name }}</span>\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% elseif related_product2|length >= 9 %}\n
\t\t\t\t\t\t <div class="rp-select-wrap">\n
\t\t\t\t\t\t <select class="rp-select" onchange="location.href='/products/detail/'+this.value;">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product2 %}\n
\t\t\t\t\t\t <option value="{{ rp_id }}"{% if base_select2 == rp_name %} selected{% endif %}>{{ rp_name }}</option>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </select>\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% else %}\n
\t\t\t\t\t\t <div class="rp-btn-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product2 %}\n
\t\t\t\t\t\t <label class="rp-btn{% if base_select2 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp2" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select2 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t {{ rp_name }}\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% endif %}\n
\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t{# ===== 3段目 ===== #}\n
\t\t\t\t\t\t{% if type3 and related_product3 and related_product3|length %}\n
\t\t\t\t\t\t<div class="form-group mt-3 pb-3" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t <div class="rp-section-label">{{ type3 }}{% if img3 and base_select3 %}: <span>{{ base_select3 }}</span>{% endif %}</div>\n
\t\t\t\t\t\t {% if img3 %}\n
\t\t\t\t\t\t <div class="rp-card-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product3 %}\n
\t\t\t\t\t\t <label class="rp-card{% if base_select3 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp3" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select3 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t <img class="rp-card__image"\n
\t\t\t\t\t\t src="{{ asset('p' ~ rp_id ~ '_cp_1.jpg', 'save_image') }}"\n
\t\t\t\t\t\t alt="{{ rp_name }}"\n
\t\t\t\t\t\t onerror="this.style.display='none';this.nextElementSibling.style.display='flex';">\n
\t\t\t\t\t\t <div class="rp-card__placeholder" style="display:none;">📦</div>\n
\t\t\t\t\t\t <span class="rp-card__name">{{ rp_name }}</span>\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% elseif related_product3|length >= 9 %}\n
\t\t\t\t\t\t <div class="rp-select-wrap">\n
\t\t\t\t\t\t <select class="rp-select" onchange="location.href='/products/detail/'+this.value;">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product3 %}\n
\t\t\t\t\t\t <option value="{{ rp_id }}"{% if base_select3 == rp_name %} selected{% endif %}>{{ rp_name }}</option>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </select>\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% else %}\n
\t\t\t\t\t\t <div class="rp-btn-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product3 %}\n
\t\t\t\t\t\t <label class="rp-btn{% if base_select3 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp3" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select3 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t {{ rp_name }}\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% endif %}\n
\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t{# ===== 4段目 ===== #}\n
\t\t\t\t\t\t{% if type4 and related_product4 and related_product4|length %}\n
\t\t\t\t\t\t<div class="form-group mt-3 pb-3" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t <div class="rp-section-label">{{ type4 }}{% if img4 and base_select4 %}: <span>{{ base_select4 }}</span>{% endif %}</div>\n
\t\t\t\t\t\t {% if img4 %}\n
\t\t\t\t\t\t {# --- 画像付きカード --- #}\n
\t\t\t\t\t\t <div class="rp-card-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product4 %}\n
\t\t\t\t\t\t <label class="rp-card{% if base_select4 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp4" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select4 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t <img class="rp-card__image"\n
\t\t\t\t\t\t src="{{ asset('p' ~ rp_id ~ '_cp_1.jpg', 'save_image') }}"\n
\t\t\t\t\t\t alt="{{ rp_name }}" loading="lazy">\n
\t\t\t\t\t\t <span class="rp-card__label">{{ rp_name }}</span>\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% elseif related_product4|length >= 9 %}\n
\t\t\t\t\t\t {# --- プルダウン(9個以上)--- #}\n
\t\t\t\t\t\t <div class="rp-select-wrap">\n
\t\t\t\t\t\t <select class="rp-select" onchange="location.href='/products/detail/'+this.value;">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product4 %}\n
\t\t\t\t\t\t <option value="{{ rp_id }}"{% if base_select4 == rp_name %} selected{% endif %}>{{ rp_name }}</option>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </select>\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% else %}\n
\t\t\t\t\t\t {# --- ボタン式ラジオ(8個以内)--- #}\n
\t\t\t\t\t\t <div class="rp-btn-group">\n
\t\t\t\t\t\t {% for rp_id, rp_name in related_product4 %}\n
\t\t\t\t\t\t <label class="rp-btn{% if base_select4 == rp_name %} is-selected{% endif %}"\n
\t\t\t\t\t\t onclick="location.href='/products/detail/{{ rp_id }}';">\n
\t\t\t\t\t\t <input type="radio" name="rp4" value="{{ rp_name }}"\n
\t\t\t\t\t\t {% if base_select4 == rp_name %}checked{% endif %}>\n
\t\t\t\t\t\t {{ rp_name }}\n
\t\t\t\t\t\t </label>\n
\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t {% endif %}\n
\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t{% endif %}\n
\n
\n
\t\t\t\t\t <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">この商品のオプションを選択してください。</label></div>\n
\n
{% if color and color|length and ProductClass.SaleType.id != 3 %}\n
<div class="form-group mt-3 pb-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
<div class="rp-section-label">カラー{% if mitsumori_json and mitsumori_json.pc %}: <span>{{ mitsumori_json.pc }}</span>{% endif %}</div>\n
<div class="opt-btn-group">\n
{% set idx = 0 %}\n
{% for cc in color %}{% if cc and cc['name'] %}{% set idx = idx + 1 %}\n
<label class="opt-btn{% if (mitsumori_json and mitsumori_json.pc == cc['name']) or color|length == 1 %} is-selected{% endif %}"\n
onclick="mitsumori_simulation_val('pc', '{{ cc['name']|e('js') }}');">\n
<input type="radio" name="color" id="cc_{{ idx }}" value="{{ cc['name'] }}"\n
{% if (mitsumori_json and mitsumori_json.pc == cc['name']) or color|length == 1 %}checked{% endif %}>\n
{{ cc['name'] }}\n
</label>\n
{% endif %}{% endfor %}\n
</div>\n
</div>\n
{% endif %}\n
\n
{% if p_w and p_w|length and p_w|join != "" %}\n
<div class="form-group mt-3 pb-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
<div class="rp-section-label">幅{% if mitsumori_json and mitsumori_json.pw %}: <span>{{ mitsumori_json.pw }}</span>{% endif %}</div>\n
<div class="opt-btn-group">\n
{% set idx = 0 %}\n
{% for pw in p_w %}{% if pw %}{% set idx = idx + 1 %}\n
<label class="opt-btn{% if (mitsumori_json and mitsumori_json.pw == pw) or p_w|length == 1 %} is-selected{% endif %}"\n
onclick="mitsumori_simulation_val('pw', '{{ pw|e('js') }}');">\n
<input type="radio" name="pw" id="pw_{{ idx }}" value="{{ pw }}"\n
{% if (mitsumori_json and mitsumori_json.pw == pw) or p_w|length == 1 %}checked{% endif %}>\n
{{ pw }}\n
</label>\n
{% endif %}{% endfor %}\n
</div>\n
</div>\n
{% endif %}\n
\n
{% if p_d and p_d|length and p_d|join != "" %}\n
<div class="form-group mt-3 pb-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
<div class="rp-section-label">奥行き{% if mitsumori_json and mitsumori_json.pd %}: <span>{{ mitsumori_json.pd }}</span>{% endif %}</div>\n
<div class="opt-btn-group">\n
{% set idx = 0 %}\n
{% for pd in p_d %}{% if pd %}{% set idx = idx + 1 %}\n
<label class="opt-btn{% if (mitsumori_json and mitsumori_json.pd == pd) or p_d|length == 1 %} is-selected{% endif %}"\n
onclick="mitsumori_simulation_val('pd', '{{ pd|e('js') }}');">\n
<input type="radio" name="pd" id="pd_{{ idx }}" value="{{ pd }}"\n
{% if (mitsumori_json and mitsumori_json.pd == pd) or p_d|length == 1 %}checked{% endif %}>\n
{{ pd }}\n
</label>\n
{% endif %}{% endfor %}\n
</div>\n
</div>\n
{% endif %}\n
\n
{% if p_h and p_h|length and p_h|join != "" %}\n
<div class="form-group mt-3 pb-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
<div class="rp-section-label">高さ{% if mitsumori_json and mitsumori_json.ph %}: <span>{{ mitsumori_json.ph }}</span>{% endif %}</div>\n
<div class="opt-btn-group">\n
{% set idx = 0 %}\n
{% for ph in p_h %}{% if ph %}{% set idx = idx + 1 %}\n
<label class="opt-btn{% if (mitsumori_json and mitsumori_json.ph == ph) or p_h|length == 1 %} is-selected{% endif %}"\n
onclick="mitsumori_simulation_val('ph', '{{ ph|e('js') }}');">\n
<input type="radio" name="ph" id="ph_{{ idx }}" value="{{ ph }}"\n
{% if (mitsumori_json and mitsumori_json.ph == ph) or p_h|length == 1 %}checked{% endif %}>\n
{{ ph }}\n
</label>\n
{% endif %}{% endfor %}\n
</div>\n
</div>\n
{% endif %}\n
\n
{% if p_m and p_m|length and p_m|join != "" %}\n
<div class="form-group mt-3 pb-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
<div class="rp-section-label">素材{% if mitsumori_json and mitsumori_json.pm %}: <span>{{ mitsumori_json.pm }}</span>{% endif %}</div>\n
<div class="opt-btn-group">\n
{% set idx = 0 %}\n
{% for pm in p_m %}{% if pm %}{% set idx = idx + 1 %}\n
<label class="opt-btn{% if (mitsumori_json and mitsumori_json.pm == pm) or p_m|length == 1 %} is-selected{% endif %}"\n
onclick="mitsumori_simulation_val('pm', '{{ pm|e('js') }}');">\n
<input type="radio" name="pm" id="pm_{{ idx }}" value="{{ pm }}"\n
{% if (mitsumori_json and mitsumori_json.pm == pm) or p_m|length == 1 %}checked{% endif %}>\n
{{ pm }}\n
</label>\n
{% endif %}{% endfor %}\n
</div>\n
</div>\n
{% endif %}\n
\n
\t\t\t\t\t\t<!-- 1: 施工見積(通常) → 幅/奥行/高さ/素材/カラーは上部の共通ブロックで表示済み -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 1 %}\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t<!-- 2: 施工見積(補助金・窓) -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 2 %}\n
\n
\t\t\t\t\t\t\t{# 窓サイズ(自由入力) #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">窓サイズ</label>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <div class="input-group">\n
\t\t\t\t\t\t\t <span class="input-group-text">窓幅</span>\n
\t\t\t\t\t\t\t <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');">\n
\t\t\t\t\t\t\t <span class="input-group-text">cm</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <div class="input-group">\n
\t\t\t\t\t\t\t <span class="input-group-text">窓高さ</span>\n
\t\t\t\t\t\t\t <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');">\n
\t\t\t\t\t\t\t <span class="input-group-text">cm</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t\t{# 窓タイプ(p_d データから選択肢を生成) #}\n
\t\t\t\t\t\t\t{% if p_d and p_d|length and p_d|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">窓タイプ</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pd_val in p_d %}\n
\t\t\t\t\t\t\t {% if pd_val %}\n
\t\t\t\t\t\t\t {% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="mado_type" id="mado_type_{{ idx }}" value="{{ pd_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pd == pd_val) or (p_d|length == 1) %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pd','mado_type_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="mado_type_{{ idx }}">{{ pd_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}\n
\t\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# ガラスタイプ(p_m データから選択肢を生成) #}\n
\t\t\t\t\t\t\t{% if p_m and p_m|length and p_m|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">ガラスタイプ</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pm_val in p_m %}\n
\t\t\t\t\t\t\t {% if pm_val %}\n
\t\t\t\t\t\t\t {% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="glass_type" id="glass_type_{{ idx }}" value="{{ pm_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pm == pm_val) or (p_m|length == 1) %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pm','glass_type_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="glass_type_{{ idx }}">{{ pm_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}\n
\t\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# セット数(プルダウン) → quantity に連動 #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">セット数</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <select name="set_count" id="set_count" class="form-control" onchange="madosetSelect(this.value);">\n
\t\t\t\t\t\t\t {% for i in 1..20 %}\n
\t\t\t\t\t\t\t <option value="{{ i }}" {% if mitsumori_json and mitsumori_json.set_count == i %}selected{% endif %}>{{ i }} セット</option>\n
\t\t\t\t\t\t\t {% endfor %}\n
\t\t\t\t\t\t\t </select>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t<!-- 3: 施工見積(物置・ゴミステーション) -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 3 %}\n
\n
\t\t\t\t\t\t\t{# 幅・奥行き・高さ(p_w/p_d/p_h からラジオボタン生成) #}\n
\t\t\t\t\t\t\t{% if p_w and p_w|length and p_w|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">幅</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pw_val in p_w %}{% if pw_val %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="pw" id="pw3_{{ idx }}" value="{{ pw_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pw == pw_val) or p_w|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pw','pw3_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="pw3_{{ idx }}">{{ pw_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{% if p_d and p_d|length and p_d|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">奥行き</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pd_val in p_d %}{% if pd_val %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="pd" id="pd3_{{ idx }}" value="{{ pd_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pd == pd_val) or p_d|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pd','pd3_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="pd3_{{ idx }}">{{ pd_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{% if p_h and p_h|length and p_h|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">高さ</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for ph_val in p_h %}{% if ph_val %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="ph" id="ph3_{{ idx }}" value="{{ ph_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.ph == ph_val) or p_h|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('ph','ph3_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="ph3_{{ idx }}">{{ ph_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# 棚タイプ(p_m データから選択肢を生成) #}\n
\t\t\t\t\t\t\t{% if p_m and p_m|length and p_m|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">棚タイプ<br><small class="text-muted">(間仕切り仕様)</small></label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pm_val in p_m %}{% if pm_val %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="pm" id="pm3_{{ idx }}" value="{{ pm_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pm == pm_val) or p_m|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pm','pm3_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="pm3_{{ idx }}">{{ pm_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# カラー(共通の color データ使用) #}\n
\t\t\t\t\t\t\t{% if color and color|length %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">カラー</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for cc in color %}{% if cc and cc['name'] %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="color3" id="cc3_{{ idx }}" value="{{ cc['name'] }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pc == cc['name']) or color|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pc','cc3_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="cc3_{{ idx }}">{{ cc['name'] }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# 台数 #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">台数</label>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <div class="input-group mb-3">\n
\t\t\t\t\t\t\t <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');">\n
\t\t\t\t\t\t\t <span class="input-group-text">台</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <button type="button" class="btn btn-info" onclick="daisu(+1);">+</button>\n
\t\t\t\t\t\t\t <button type="button" class="btn btn-danger" onclick="daisu(-1);">ー</button>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t<!-- 4: 施工見積(フェンス・組み立て式) -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 4 %}\n
\n
\t\t\t\t\t\t\t{# 枚数 #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">枚数</label>\n
\t\t\t\t\t\t\t <div class="col-4 mb-3">\n
\t\t\t\t\t\t\t <div class="input-group">\n
\t\t\t\t\t\t\t <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');">\n
\t\t\t\t\t\t\t <span class="input-group-text">枚</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <button type="button" class="btn btn-info" onclick="maisu(+1);">+</button>\n
\t\t\t\t\t\t\t <button type="button" class="btn btn-danger" onclick="maisu(-1);">ー</button>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t<!-- 5: 施工見積(ウッドデッキ・タイルデッキ) -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 5 %}\n
\n
\t\t\t\t\t\t\t{# 施工面積(㎡ 直接入力) #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">施工面積</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="input-group">\n
\t\t\t\t\t\t\t <input type="number" name="area" id="area"\n
\t\t\t\t\t\t\t class="form-control"\n
\t\t\t\t\t\t\t value="{{ mitsumori_json.area|default('') }}"\n
\t\t\t\t\t\t\t placeholder="例: 7.5"\n
\t\t\t\t\t\t\t min="0.1" step="0.1"\n
\t\t\t\t\t\t\t onchange="mitsumori_simulation('area','area');">\n
\t\t\t\t\t\t\t <span class="input-group-text">㎡</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <small class="text-muted">幅(cm) × 奥行き(cm) ÷ 10000 = ㎡</small>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t\t{# ステップの有無 #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">ステップ</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="deck_step" id="deck_step_yes" value="必要"\n
\t\t\t\t\t\t\t {% if mitsumori_json and mitsumori_json.deck_step == '必要' %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('op0','deck_step_yes');">\n
\t\t\t\t\t\t\t <label for="deck_step_yes">必要</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="deck_step" id="deck_step_no" value="不要"\n
\t\t\t\t\t\t\t {% if not mitsumori_json or mitsumori_json.deck_step == '不要' or not mitsumori_json.deck_step %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('op0','deck_step_no');">\n
\t\t\t\t\t\t\t <label for="deck_step_no">不要</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t\t{# ウッドデッキフェンスの有無 #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">デッキフェンス</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="deck_fence" id="deck_fence_yes" value="必要"\n
\t\t\t\t\t\t\t {% if mitsumori_json and mitsumori_json.deck_fence == '必要' %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('op1','deck_fence_yes');">\n
\t\t\t\t\t\t\t <label for="deck_fence_yes">必要</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="deck_fence" id="deck_fence_no" value="不要"\n
\t\t\t\t\t\t\t {% if not mitsumori_json or mitsumori_json.deck_fence == '不要' or not mitsumori_json.deck_fence %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('op1','deck_fence_no');">\n
\t\t\t\t\t\t\t <label for="deck_fence_no">不要</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t<!-- 6: 施工見積(芝生・枚数・数量買い) -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 6 %}\n
\n
\t\t\t\t\t\t\t{# 規格(p_m データ → 素材から抽出) #}\n
\t\t\t\t\t\t\t{% if p_m and p_m|length and p_m|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">規格</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pm_val in p_m %}{% if pm_val %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="pm" id="pm6_{{ idx }}" value="{{ pm_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pm == pm_val) or p_m|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pm','pm6_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="pm6_{{ idx }}">{{ pm_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# 芝の長さ(p_w データ → 幅から抽出) #}\n
\t\t\t\t\t\t\t{% if p_w and p_w|length and p_w|join != "" %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">芝の長さ</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t {% set idx = 0 %}\n
\t\t\t\t\t\t\t {% for pw_val in p_w %}{% if pw_val %}{% set idx = idx + 1 %}\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <input type="radio" name="pw" id="pw6_{{ idx }}" value="{{ pw_val }}"\n
\t\t\t\t\t\t\t {% if (mitsumori_json and mitsumori_json.pw == pw_val) or p_w|length == 1 %}checked{% endif %}\n
\t\t\t\t\t\t\t onclick="mitsumori_simulation('pw','pw6_{{ idx }}');">\n
\t\t\t\t\t\t\t <label for="pw6_{{ idx }}">{{ pw_val }}</label>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t {% endif %}{% endfor %}\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t\t{# 施工面積(㎡ 自由入力) #}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">施工面積</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t\t\t <div class="input-group">\n
\t\t\t\t\t\t\t <input type="number" name="area" id="area"\n
\t\t\t\t\t\t\t class="form-control"\n
\t\t\t\t\t\t\t value="{{ mitsumori_json.area|default('') }}"\n
\t\t\t\t\t\t\t placeholder="例: 10.5"\n
\t\t\t\t\t\t\t min="0.1" step="0.1"\n
\t\t\t\t\t\t\t onchange="mitsumori_simulation('area','area');">\n
\t\t\t\t\t\t\t <span class="input-group-text">平米</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\n
\t\t\t\t\t\t{% endif %}\n
\n
\t\t\t\t\t\t<!-- 9: 商品のみ購入 -->\n
\t\t\t\t\t\t{% if ProductClass.SaleType.id == 9 %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">数量</label>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <div class="input-group mb-3">\n
\t\t\t\t\t\t\t <input type="number" name="quantity_only" id="quantity_only" class="form-control" value="1" min="1" onchange="$('#quantity').val(this.value);">\n
\t\t\t\t\t\t\t <span class="input-group-text">個</span>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="col-4">\n
\t\t\t\t\t\t\t <button type="button" class="btn btn-info" onclick="quantityOnly(+1);">+</button>\n
\t\t\t\t\t\t\t <button type="button" class="btn btn-danger" onclick="quantityOnly(-1);">ー</button>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t{% endif %}\n
\n
\n
\n
\n
\t\t\t\t\t <div class="row" style="border-bottom:1px solid rgba(0,0,0,.125)"><label class="col-12 col-form-label">取り付け工事のご希望に関してお答えください。</label></div>\n
\t\t\t\t\t\t{% for i in 0..10 %}\n
\t\t\t\t\t\t\t{% if op and op|length >= i+1 %}\n
\t\t\t\t\t\t\t{% if op[i]['name'] %}\n
\t\t\t\t\t\t\t<div class="form-group row mt-2" style="border-bottom:1px solid rgba(0,0,0,.125)">\n
\t\t\t\t\t\t\t <label class="col-4 col-form-label">{{ op[i]['name'] }}</label>\n
\t\t\t\t\t\t\t <div class="col-8">\n
\t\t\t\t\t {{ op[i]['comment'] }}\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <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>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t <div class="form-group clearfix">\n
\t\t\t\t\t\t\t <div class="icheck-danger d-inline">\n
\t\t\t\t\t\t\t <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>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t </div>\n
\t\t\t\t\t\t\t</div>\n
\t\t\t\t\t\t\t{% endif %}\n
\t\t\t\t\t\t\t{% endif %}\n
\t\t\t\t\t\t{% endfor %}\n
\n
\t\t\t\t\t </div>\n
\t\t\t\t\t <!-- /.card-body -->\n
\t\t\t\t\t</div>\n
\n
\n
<form action="{{ url('product_add_cart', {id:Product.id}) }}" method="post" id="form1" name="form1">\n
{% if Product.stock_find %}\n
<div class="ec-productRole__actions">\n
{% if form.classcategory_id1 is defined %}\n
<div class="ec-select">\n
{{ form_row(form.classcategory_id1) }}\n
{{ form_errors(form.classcategory_id1) }}\n
</div>\n
{% if form.classcategory_id2 is defined %}\n
<div class="ec-select">\n
{{ form_row(form.classcategory_id2) }}\n
{{ form_errors(form.classcategory_id2) }}\n
</div>\n
{% endif %}\n
{% endif %}\n
<div class="ec-numberInput">\n
{{ form_widget(form.quantity, { type: 'hidden' }) }}\n
{{ form_errors(form.quantity) }}\n
</div>\n
</div>\n
\n
{% else %}\n
<div class="ec-productRole__btn">\n
<button type="button" class="ec-blockBtn--action" disabled="disabled">\n
{{ 'ただいま品切れ中です。'|trans }}\n
</button>\n
</div>\n
{% endif %}\n
<div class="ec-productRole__btn mt-3">\n
<button type="submit" id="cart_btn" class="ec-blockBtn--action add-cart">施工検討リストに入れる</button>\n
</div>\n
{{ form_rest(form) }}\n
</form>\n
<div class="ec-modal">\n
<div class="ec-modal-overlay">\n
<div class="ec-modal-wrap">\n
<span class="ec-modal-close"><span class="ec-icon"><img src="{{ asset('assets/icon/cross-dark.svg') }}" alt=""/></span></span>\n
<div id="ec-modal-header" class="text-center">{{ '施工検討リストに追加しました。'|trans }}</div>\n
<div class="ec-modal-box">\n
<div class="ec-role">\n
<span class="ec-inlineBtn--cancel">{{ '商品検索を続ける'|trans }}</span>\n
<a href="{{ url('cart') }}" class="ec-inlineBtn--action">{{ '施工検討リストへ進む'|trans }}</a>\n
</div>\n
</div>\n
</div>\n
</div>\n
</div>\n
<div class="ec-productRole__description">{{ Product.description_detail|raw|nl2br }}\n
</div>\n
\n
{# SNSシェア #}\n
<div class="ec-productRole__share">\n
<ul class="ec-share">\n
<li class="ec-share__item">\n
<a href="https://twitter.com/share?url={{ app.request.uri|url_encode }}&text={{ Product.name|url_encode }}" class="ec-share__link ec-share__link--twitter" target="_blank" rel="noreferrer noopener">\n
<i class="fab fa-twitter"></i>\n
</a>\n
</li>\n
<li class="ec-share__item">\n
<a href="https://www.facebook.com/sharer/sharer.php?u={{ app.request.uri|url_encode }}" class="ec-share__link ec-share__link--facebook" target="_blank" rel="noreferrer noopener">\n
<i class="fab fa-facebook-f"></i>\n
</a>\n
</li>\n
<li class="ec-share__item">\n
<a href="https://social-plugins.line.me/lineit/share?url={{ app.request.uri|url_encode }}" class="ec-share__link ec-share__link--line" target="_blank" rel="noreferrer noopener">\n
<i class="fab fa-line"></i>\n
</a>\n
</li>\n
</ul>\n
</div>\n
</div>\n
\t\t\t\t{# ===== スマホ用 見積金額 下部固定バー ===== #}\n
\t\t\t\t<div id="sp-mitsumori-bar">\n
\t\t\t\t <div>\n
\t\t\t\t <div class="sp-bar__label">合計(工事費・税込)</div>\n
\t\t\t\t <div class="sp-bar__price" id="sp-mitsumori-price">---円</div>\n
\t\t\t\t </div>\n
\t\t\t\t <button type="button" class="sp-bar__btn"\n
\t\t\t\t onclick="document.getElementById('cart_btn2') && document.getElementById('cart_btn2').click();">\n
\t\t\t\t 検討リストへ\n
\t\t\t\t </button>\n
\t\t\t\t</div>\n
\n
\t\t\t\t<div class="card col-12 collapsed-card sticky-top float-right mitsumori-card-pc">\n
\t\t\t\t\t<div class="card-header">\n
\t\t\t\t\t <h3 class="card-title">現在のお見積り額</h3>\n
\t\t\t\t\t <div class="card-tools">\n
\t\t\t\t\t <span class="float-left" id="mitsumori_message">395000円</span>\n
\t\t\t\t\t <button type="button" class="btn btn-tool btn-mitsumori-toggle" data-card-widget="collapse" title="詳細を表示">\n
\t\t\t\t\t <span class="toggle-icon">▼ 詳細</span>\n
\t\t\t\t\t </button>\n
\t\t\t\t\t </div>\n
\t\t\t\t\t</div>\n
\t\t\t\t\t<div class="card-body p-0">\n
\t\t\t\t\t <ul class="nav nav-pills flex-column">\n
\t\t\t\t\t <li class="nav-item active">\n
\t\t\t\t\t <a class="nav-link">\n
\t\t\t\t\t <i class="far fa-file-alt"></i> 合計(工事費・税込)\n
\t\t\t\t\t <span class="float-right" id="mitsumori_goukei">395,000円</span>\n
\t\t\t\t\t </a>\n
\t\t\t\t\t </li>\n
\t\t\t\t\t <li class="nav-item active">\n
\t\t\t\t\t <a class="nav-link">\n
\t\t\t\t\t <i class="far fa-file-alt"></i> 商品価格\n
\t\t\t\t\t <span class="float-right" id="mitsumori_price">307,008円</span>\n
\t\t\t\t\t </a>\n
\t\t\t\t\t </li>\n
\t\t\t\t\t <li class="nav-item">\n
\t\t\t\t\t <a class="nav-link">\n
\t\t\t\t\t <i class="far fa-file-alt"></i> カタログ価格\n
\t\t\t\t\t <span class="float-right" id="maker_price">479,700円</span>\n
\t\t\t\t\t </a>\n
\t\t\t\t\t </li>\n
\t\t\t\t\t <li class="nav-item">\n
\t\t\t\t\t <a class="nav-link">\n
\t\t\t\t\t <i class="far fa-file-alt"></i> お値引き\n
\t\t\t\t\t <span class="float-right" id="mitsumori_off">-172,692円</span>\n
\t\t\t\t\t </a>\n
\t\t\t\t\t </li>\n
\t\t\t\t\t <li class="nav-item">\n
\t\t\t\t\t <a class="nav-link">\n
\t\t\t\t\t <i class="far fa-file-alt"></i> 基本工事費\n
\t\t\t\t\t <span class="float-right" id="mitsumori_ct">53,250円</span>\n
\t\t\t\t\t </a>\n
\t\t\t\t\t </li>\n
\t\t\t\t\t <li class="nav-item">\n
\t\t\t\t\t <a class="nav-link">\n
\t\t\t\t\t <i class="far fa-file-alt"></i> 施工オプション\n
\t\t\t\t\t <span class="float-right"id="mitsumori_option">6,297円</span>\n
\t\t\t\t\t </a>\n
\t\t\t\t\t </li>\n
\t\t\t\t\t </ul>\n
\t\t\t\t\t</div>\n
\t\t\t\t\t<div class="card-footer">\n
\t\t <button type="button" id="mitsumori_btn" class="btn btn-info" data-toggle="modal" data-target="#modal-mitsumori">\n
\t\t 見積書表示\n
\t\t </button>\n
<button type="submit" id="cart_btn2" class="btn btn-info add-cart">施工検討リストに入れる</button>\n
\n
\t\t\t\t\t</div>\n
\t\t\t\t</div>\n
</div>\n
\n
</div>\n
\n
</div>\n
\n
<div class="modal" id="modal-mitsumori">\n
<div class="modal-dialog modal-mitsumori" style="max-width:1000px">\n
<div class="modal-content">\n
<div class="modal-header">\n
<h4 class="modal-title">お見積書</h4>\n
<button type="button" class="close" data-dismiss="modal" aria-label="Close">\n
<span aria-hidden="true">×</span>\n
</button>\n
</div>\n
<div class="modal-body">\n
\t\t\t<div class="invoice p-3 mb-5" style="max-width:1000px; margin:auto;">\n
\t\t\t <!-- title row -->\n
\t\t\t <div class="row">\n
\t\t\t <div class="col-12">\n
\t\t\t <h2>概算お見積書 \n
\t\t\t <small class="float-right" style="font-size:14px;">発行日: 2025/03/14</small>\n
\t\t\t </h2>\n
\t\t\t </div>\n
\t\t\t <!-- /.col -->\n
\t\t\t </div>\n
\t\t\t <!-- info row -->\n
\t\t\t <div class="row invoice-info">\n
\t\t\t <div class="col-sm-8 invoice-col">\n
\t\t\t <h3>お客様</h3>\n
\t\t\t <span>下記の通り、お見積もり申し上げます。</span>\n
\t\t\t <br />\n
\t\t\t <br / >\n
\t\t\t <br />\n
\t\t\t <h2>お見積金額: <span id="mitsumori_kei">399,080円</span></h2>\n
\t\t\t <span>\n
\t\t\t <br/>\n
\t\t\t <br/>\n
\t\t\t <br/>\n
\t\t\t <br/>\n
\t\t\t </span>\n
\t\t\t </div>\n
\t\t\t <div class="col-sm-4 invoice-col">\n
\t\t\t <p>\n
\t\t\t <img alt="" src="/html/user_data/js/images/logo.png" style="width: 260px; max-width: 100%; max-height: 10mm;">\n
\t\t\t </p>\n
\t\t\t <p>有限会社プラス</p>\n
\t\t\t <p>〒400-0334</p>\n
\t\t\t <p>山梨県南アルプス市藤田1450番地2</p>\n
\t\t\t <p>TEL: 055-284-6480</p>\n
\t\t\t <img alt="" src="/html/user_data/js/images/seal.svg" style="z-index: 2; position: absolute; width: 21mm; left: 58mm; top: 36mm;">\n
\t\t\t </div>\n
\t\t\t <!-- /.col -->\n
\t\t\t <!-- /.col -->\n
\t\t\t </div>\n
\t\t\t <!-- /.row -->\n
\t\t\t <!-- Table row -->\n
\t\t\t <div class="row">\n
\t\t\t <div class="col-12 table-responsive">\n
\t\t\t <table class="table table-striped">\n
\t\t\t <thead>\n
\t\t\t <tr>\n
\t\t\t <th>項目</th>\n
\t\t\t <th>数量</th>\n
\t\t\t <th>単位</th>\n
\t\t\t <th>単価</th>\n
\t\t\t <th>小計</th>\n
\t\t\t </tr>\n
\t\t\t </thead>\n
\t\t\t <tbody>\n
\t\t\t <tr>\n
\t\t\t <td>プレーンルーフ 600タイプ 1台用 単体セット</td>\n
\t\t\t <td>1</td>\n
\t\t\t <td>式</td>\n
\t\t\t <td id="mitsumori_price_01">352,800</td>\n
\t\t\t <td id="mitsumori_price_02">352,800</td>\n
\t\t\t </tr>\n
\t\t\t <tr>\n
\t\t\t <td>基本工事費</td>\n
\t\t\t <td>1</td>\n
\t\t\t <td>式</td>\n
\t\t\t <td id="mitsumori_ct_01">10,000</td>\n
\t\t\t <td id="mitsumori_ct_02">10,000</td>\n
\t\t\t </tr>\n
\t\t\t <tr>\n
\t\t\t <td>残土・ガラ処理</td>\n
\t\t\t <td>1</td>\n
\t\t\t <td>式</td>\n
\t\t\t <td>0円</td>\n
\t\t\t <td></td>\n
\t\t\t </tr>\n
\t\t\t <tr>\n
\t\t\t <td> </td>\n
\t\t\t <td></td>\n
\t\t\t <td></td>\n
\t\t\t <td></td>\n
\t\t\t <td></td>\n
\t\t\t </tr>\n
\t\t\t </tbody>\n
\t\t\t </table>\n
\t\t\t </div>\n
\t\t\t <!-- /.col -->\n
\t\t\t </div>\n
\t\t\t <!-- /.row -->\n
\t\t\t <div class="row">\n
\t\t\t <!-- accepted payments column -->\n
\t\t\t <div class="col-6">\n
\t\t\t <p class="lead">お支払い方法</p>\n
\t\t\t <p class="text-muted well well-sm shadow-none" style="margin-top: 10px;">銀行振込、クレジットカード決済、PAYPAY決済\n
\t\t\t <br>銀行振込:山梨中央銀行 白根支店 普通口座 391402\n
\t\t\t <br>※商品代金と工事代金の総額が金100万円(税込)を超える場合、着手金として代金の半額をご契約後お支払いいただきます。 \n
\t\t\t </p>\n
\t\t\t </div>\n
\t\t\t <!-- /.col -->\n
\t\t\t <div class="col-6">\n
\t\t\t <div class="table-responsive">\n
\t\t\t <table class="table">\n
\t\t\t <tbody>\n
\t\t\t <tr>\n
\t\t\t <th style="width:50%">小計:</th>\n
\t\t\t <td id="mitsumori_shoukei">362,800</td>\n
\t\t\t </tr>\n
\t\t\t <tr>\n
\t\t\t <th>消費税 (10%)</th>\n
\t\t\t <td id="mitsumori_tax">36,280</td>\n
\t\t\t </tr>\n
\t\t\t <tr>\n
\t\t\t <th>合計:</th>\n
\t\t\t <td id="mitsumori_goukei_02">399,080</td>\n
\t\t\t </tr>\n
\t\t\t </tbody>\n
\t\t\t </table>\n
\t\t\t </div>\n
\t\t\t </div>\n
\t\t\t <!-- /.col -->\n
\t\t\t </div>\n
\t\t\t <!-- /.row -->\n
\t\t\t</div>\n
</div>\n
<div class="modal-footer justify-content-between">\n
\t\t\t {# PDF出力: mitsumori_json を POST して PDF ダウンロード #}\n
\t\t\t <form method="post" action="{{ url('mitsumori_pdf') }}" target="_blank" id="pdf_download_form">\n
\t\t\t <input type="hidden" name="_token" value="{{ csrf_token('mitsumori_pdf') }}">\n
\t\t\t <input type="hidden" name="mitsumori_json" id="pdf_mitsumori_json">\n
\t\t\t <button type="submit" class="btn btn-primary float-right" style="margin-right: 5px;" onclick="syncPdfJson();">\n
\t\t\t <i class="fas fa-download"></i>PDF出力\n
\t\t\t </button>\n
\t\t\t </form>\n
<button type="submit" id="cart_btn3" class="btn btn-info add-cart">施工検討リストに入れる</button>\n
</div>\n
</div>\n
<!-- /.modal-content -->\n
</div>\n
<!-- /.modal-dialog -->\n
</div>\n
<!-- /.modal -->\n
\n
\n
\n
{% endblock %}\n
"""
#message: "Impossible to access an attribute ("id") on a null variable."
#code: 0
#file: "/home/xs538259/exterior-plus.jp/public_html/app/template/default/Product/detail.twig"
#line: 1646
trace: {
/home/xs538259/exterior-plus.jp/public_html/app/template/default/Product/detail.twig:1646 {
twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = [], $type = 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false, int $lineno = -1) …
› <!-- 1: 施工見積(通常) → 幅/奥行/高さ/素材/カラーは上部の共通ブロックで表示済み -->
› {% if ProductClass.SaleType.id == 1 %}
› {% endif %}
}
/home/xs538259/exterior-plus.jp/public_html/var/cache/dev/twig/ce/ce33f1a336b501ccf515e493a104daa7fd455b12fbf3de30504bd569466a894b.php:2972 {
__TwigTemplate_da5ad31feda8695d41b76c2e300641cf69fccce492d7fb053b687f2a0b3adb3c->block_main($context, array $blocks = []) …
› if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ProductClass"]) || array_key_exists("ProductClass", $context) ? $context["ProductClass"] : (function () { throw new RuntimeError('Variable "ProductClass" does not exist.', 1646, $this->source); })()), "SaleType", [], "any", false, false, false, 1646), "id", [], "any", false, false, false, 1646) == 1)) {
› // line 1647
› echo "\t\t\t\t\t\t";
arguments: {
$env: Twig\Environment {#722 …}
$source: Twig\Source {#3749 …}
$object: null
$item: "id"
$arguments: []
$type: "any"
$isDefinedTest: false
$ignoreStrictCheck: false
$sandboxed: false
$lineno: 1646
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Template.php:182 {
Twig\Template->displayBlock($name, array $context, array $blocks = [], $useBlocks = true, self $templateContext = null) …
› try {
› $template->$block($context, $blocks);
› } catch (Error $e) {
arguments: {
$context: [ …52]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/var/cache/dev/twig/09/098df59d6d793d2b30f13a3b700b7686534ead4d9e2203fa5d4c975039539d2c.php:300 {
__TwigTemplate_e92af4eb34c45adf7bb4416620316aa24a1f69236acab3fde6c76af712b20559->doDisplay(array $context, array $blocks = []) …
› echo " ";
› $this->displayBlock('main', $context, $blocks);
› // line 116
arguments: {
$name: "main"
$context: [ …42]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Template.php:405 {
Twig\Template->displayWithErrorHandling(array $context, array $blocks = []) …
› try {
› $this->doDisplay($context, $blocks);
› } catch (Error $e) {
arguments: {
$context: [ …38]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Template.php:378 {
Twig\Template->display(array $context, array $blocks = []) …
› {
› $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
› }
arguments: {
$context: [ …37]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/src/Eccube/Twig/Template.php:41 {
Eccube\Twig\Template->display(array $context, array $blocks = []) …
› } else {
› parent::display($event->getParameters(), $blocks);
› }
arguments: {
$context: [ …30]
$blocks: []
}
}
/home/xs538259/exterior-plus.jp/public_html/var/cache/dev/twig/ce/ce33f1a336b501ccf515e493a104daa7fd455b12fbf3de30504bd569466a894b.php:53 {
__TwigTemplate_da5ad31feda8695d41b76c2e300641cf69fccce492d7fb053b687f2a0b3adb3c->doDisplay(array $context, array $blocks = []) …
› $this->parent = $this->loadTemplate("default_frame.twig", "Product/detail.twig", 11);
› $this->parent->display($context, array_merge($this->blocks, $blocks));
›
arguments: {
$context: [ …38]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Template.php:405 {
Twig\Template->displayWithErrorHandling(array $context, array $blocks = []) …
› try {
› $this->doDisplay($context, $blocks);
› } catch (Error $e) {
arguments: {
$context: [ …38]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Template.php:378 {
Twig\Template->display(array $context, array $blocks = []) …
› {
› $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
› }
arguments: {
$context: [ …37]
$blocks: [ …3]
}
}
/home/xs538259/exterior-plus.jp/public_html/src/Eccube/Twig/Template.php:41 {
Eccube\Twig\Template->display(array $context, array $blocks = []) …
› } else {
› parent::display($event->getParameters(), $blocks);
› }
arguments: {
$context: [ …30]
$blocks: []
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Template.php:390 {
Twig\Template->render(array $context) …
› try {
› $this->display($context);
› } catch (\Throwable $e) {
arguments: {
$context: [ …24]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/TemplateWrapper.php:45 {
Twig\TemplateWrapper->render(array $context = []): string …
› // as it should only be used by internal code
› return $this->template->render($context, \func_get_args()[1] ?? []);
› }
arguments: {
$context: [ …24]
...: {
[]
}
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/twig/twig/src/Environment.php:318 {
Twig\Environment->render($name, array $context = []) …
› {
› return $this->load($name)->render($context);
› }
arguments: {
$context: [ …24]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/sensio/framework-extra-bundle/src/EventListener/TemplateListener.php:115 {
Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener->onKernelView(KernelEvent $event) …
› } else {
› $event->setResponse(new Response($this->twig->render($template->getTemplate(), $parameters)));
› }
arguments: {
$name: "Product/detail.twig"
$context: [ …24]
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117 {
Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object $event, string $eventName, EventDispatcherInterface $dispatcher): void …
›
› ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
›
arguments: {
$event: Symfony\Component\HttpKernel\Event\ViewEvent {#3720 …}
...: {
"kernel.view"
Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher {#888 …}
}
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php:230 {
Symfony\Component\EventDispatcher\EventDispatcher->callListeners(iterable $listeners, string $eventName, object $event) …
› }
› $listener($event, $eventName, $this);
› }
arguments: {
$event: Symfony\Component\HttpKernel\Event\ViewEvent {#3720 …}
$eventName: "kernel.view"
$dispatcher: Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher {#888 …}
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php:59 {
Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object $event, string $eventName = null): object …
› if ($listeners) {
› $this->callListeners($listeners, $eventName, $event);
› }
arguments: {
$listeners: [ …1]
$eventName: "kernel.view"
$event: Symfony\Component\HttpKernel\Event\ViewEvent {#3720 …}
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154 {
Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object $event, string $eventName = null): object …
› try {
› $this->dispatcher->dispatch($event, $eventName);
› } finally {
arguments: {
$event: Symfony\Component\HttpKernel\Event\ViewEvent {#3720 …}
$eventName: "kernel.view"
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/http-kernel/HttpKernel.php:168 {
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response …
› $event = new ViewEvent($this, $request, $type, $response);
› $this->dispatcher->dispatch($event, KernelEvents::VIEW);
›
arguments: {
$event: Symfony\Component\HttpKernel\Event\ViewEvent {#3720 …}
$eventName: "kernel.view"
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/http-kernel/HttpKernel.php:75 {
Symfony\Component\HttpKernel\HttpKernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) …
› try {
› return $this->handleRaw($request, $type);
› } catch (\Exception $e) {
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#14 …}
$type: 1
}
}
/home/xs538259/exterior-plus.jp/public_html/vendor/symfony/http-kernel/Kernel.php:202 {
Symfony\Component\HttpKernel\Kernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true) …
› try {
› return $this->getHttpKernel()->handle($request, $type, $catch);
› } finally {
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#14 …}
$type: 1
$catch: true
}
}
/home/xs538259/exterior-plus.jp/public_html/index.php:83 {
› $kernel = new Kernel($env, $debug);
› $response = $kernel->handle($request);
› $response->send();
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#14 …}
}
}
}
} |