<style>
.add-to-cart{
cursor:pointer;
}
#dialog {
background-color: #fffad1;
}
#dialog .kazu {
width: 31px;
height: 25px;
}
#dialog .matrix * {
font-family: Arial, Helvetica, 'メイリオ', Meiryo, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'MS Pゴシック', sans-serif !important;
}
table.matrix{
border-collapse: initial;
border-spacing: 2px;
}
.matrix {
margin: 0;
width: 793px;
}
.matrix th {
padding: 2px;
font-size:18px;
line-height:105%;
text-align:center;
}
.matrix tr {
line-height: 1.8;
font-size: 12px;
}
.matrix td {
font-size: 12px;
line-height: 2em;
padding: 0px !important;
width: auto;
}
.matrix tr th:first-child, .matrix tr td:first-child {
width: 14px;
min-width: 14px;
max-width: 14px;
overflow: hidden;
}
.matrix .bgGray{
background: #dddddd;
margin: 3px;
}
.matrix .color-name {
width: 130px;
}
.matrix .color-name div {
max-width: 210px;
}
.matrix .size-column {
min-width: 70px;
width: 70px;
font-size: 18px;
}
.matrix .bgPink{
background: #ffc6e2;
}
.matrix_size {
}
.matrix_price_wrapper {
}
.matrix .matrix_price {
color: #CC3366;
font-size:14px;
font-weight:normal;
margin-right: 3px;
}
.matrix_price_yen {
color: #c36;
font-weight: normal;
font-size: 14px;
}
.matrix_price_tax {
display: block;
color: #c36;
font-weight: normal;
font-size: 14px;
}
.matrix span { margin:0px;padding:0px;}
.matrix .kazu-focus-background-color{
background-color: yellow !important;
}
.matrix input.kazu {
ime-mode: disabled;
border: 1px solid #7F9DB9;
}
input.kazu {
width: 31px;
height: 25px;
padding: 2px 1px 1px;
line-height: 100%;
font-size: 13px;
margin: 4px 0 4px 2px;
font-family: Arial,Helvetica,'メイリオ',Meiryo,'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','MS Pゴシック',sans-serif;
}
.matrix .zaiko {
font-size: 13px;
font-weight: normal;
line-height: 1em;
display: inline-block;
vertical-align: bottom;
margin-bottom: 3px;
white-space: nowrap;
}
.matrix .zaiko_comment {
font-size: 11px;
/* margin-left: 5px;*/
}
.matrix .zaiko_slash {
margin-left: 2px;
}
.matrix .zaiko_number {
font-size: 11px;
}
.matrix .zaiko-remaining {
color: #f00;
text-align: center;
margin: 2px 0;
}
.matrix .selling-color {
background-color: #f00;
color: #fff;
border-radius: 3px;
display: inline-block;
padding: 3px;
margin-left: 4px;
line-height: 1em;
}
.matrix span.rest {
font-size: 11px;
color: red;
display: block;
margin-left: 2px;
}
.matrix .least-10 {
margin: 2px 0;
color: red;
}
input.kazu.reservation {
border: 2px solid #FF0000;
padding: 1px 1px 1px 1px;
}
.nyuka-yotei {
color: #138a19;
line-height: 120%;
margin: 3px;
text-align: center;
white-space: nowrap;
}
.soldout {
color: #696969;
height: 20px;
text-align: center;
}
.sub-color-rgb {
display: inline-block;
width: 20px;
height: 20px;
border: 1px solid #ddd;
}
.sub-color-rgb,
.sub-color-name {
vertical-align: middle;
}
</style>
{{ include('Item/error_modal.twig') }}
<form name="form01" id="form01" method="POST">
<input type="hidden" id="OlToken" name="OlToken" value="{{ OlToken('matrix') }}">
<input type="hidden" id="goodsId" name="goodsId" value="{{ goods.getGoodsId }}">
{# カラーが10以上ある場合は上にもカートボタンを表示する #}
{% if isShowMatrixButtonAbove %}
{{ include('Item/matrix_button.twig') }}
{% endif %}
<img width="334px" height="50px" src="https://img0.land-mark.biz/ut_img/public_images/image_dt/cart_step1.gif" alt="ご希望のサイズ・カラーの枠に数字を入力"/>
{{ inventoryMatrix | raw }}
{{ include('Item/matrix_button.twig') }}
</form>
<script type="text/javascript" src="/javascripts/fixed-category-header.js?20170130_01"></script>
<script src="/javascripts/debounce.js?20240718"></script>
<script type="text/javascript">
$(function () {
var isProgress = false;
$(".add-to-cart").on("click", debounce(function(event){
var $form = $("#form01");
let getClass = $(this).children().attr('class');
let EstimateType = "{{EstimateType()}}";
console.log(EstimateType);
if (isProgress){
return;
}
isProgress = true
if(getClass == 'muji'){
var actionUrl="/cart/add_Normal";
}else if(getClass == 'print' || getClass == 'susoage'){
var actionUrl="/cart/valid_estimate";
}else if(getClass == 'sample'){
var actionUrl="/cart/add_sample";
}
$.ajax({
type: "POST",
url: actionUrl,
data: $form.serialize(),
dataType: 'json',
timespan: 1000,
})
.done(function(data, textStatus, jqXHR) {
console.log(jqXHR.status); // 200
console.log(textStatus); // success
console.log(data);
if(data.status=='OK'){
console.log(data.data);
if(getClass == 'print' || getClass == 'susoage'){
$form.attr('action','/estimate/');
$form.submit();
}else{
window.location.href= '/cart';
}
}
if(data.status=='Error'){
console.log(data.Errors);
var errorMsg="";
$.each(data.Errors ,function(index,val){
errorMsg += val.message+"\n";
});
if (data.show_error_modal) {
showErrorModal(errorMsg)
} else {
alert(errorMsg);
$form[0].reset();
}
$('#OlToken').val(data.OlToken);
}
})
.fail(function(jqXHR, textStatus, errorThrown) {
console.log(jqXHR.status); // 404...
console.log(textStatus); // error
console.log(errorThrown); // NOT FOUND
$form[0].reset();
alert('送信エラー:もう一度やり直してください');
location.reload();
})
.always(function() {
console.log("complete"); // complete
isProgress = false;
});
}, 500));
});
</script>
{% if Product is defined and Product and Product.freearea %}
<div class="ec-productRole__description">
{{ include(template_from_string(Product.freearea)) }}
</div>
{% endif %}