');
}
j$(document).ready(function(){
var dialog = new FLTdialog();
var baseElm = j$('#unit-215');
var cartName = "submitcart[4]";
var age_limit = (function(){ return j$.ajax("https://www.kannax.com/usr-data/modules/extMdlEc/aj/common-unit.php?mode=getGlobalConst&key=age_limit",{type:"get",async:false, dataType: "json"}).responseJSON })();
cartName = cartName.replace("[", "\\[").replace("]", "\\]");
baseElm.find("[name=" + cartName + "]").click(function(){
var postData = {};
postData.product_id = "4";
var post_names = [
"quantity",
"in_cart_spec1",
"in_cart_spec2",
"in_cart_price",
"in_cart_price_before",
"in_cart_price_nottax",
"in_cart_name",
"in_cart_spec_price",
"in_cart_spec_price_before",
"in_cart_age",
"review_write"
];
for (var i=0; i
注意:酒類をご購入の方へ
\
\
「商品名:"+postData.in_cart_name+"」
\
\
酒類の購入には年齢制限があります。"+age+"未満の購入や飲酒は法律で禁止されております。
\
当サイトでは"+age+"未満の方は、酒類の購入はできません。ご購入される方の生年月日を入力した上でご購入いただきます。
";
promise=dialog.confirm(msg, "上記内容に同意の上、カートに入れる","購入をキャンセル","注 意
");
}
var exec=function(){
j$.ajax({
type: "POST",
url: "/usr-data/modules/extMdlEc/aj/cart.php",
dataType: "json",
async: true,
data: postData,
success: function(res) {
if (res.error=="") {
// dialog.alert("「"+postData.in_cart_name+"」をカートに追加しました。", "閉じる");
//イベント発火
var ev=document.createEvent("CustomEvent");
ev.initCustomEvent("inCart",false,false,postData);
document.dispatchEvent(ev);
//カートページへ飛ぶ
document.location.href = "https://www.kannax.com/cart/index.php";
} else {
dialog.alert(res.error.replace(/\r?\n/g,"
"), "閉じる");
}
},
error: function(XMLHttpRequest, textStatus, errorThrown){
},
complete: function(XMLHttpRequest, textStatus){
}
});
}
if(promise==null){
exec();
}else{
promise.done(function(data){
if(data.status=="ok"){
exec();
}
});
}
});
});
-->