å è³¼åå:'
,purchasehtml:
''+
''+
''+
''
},
field: {
promotionhtml: ''
},
onItemAddPostBefore: function(SOURCE, ITEM, post) {
if ($('.shopping-add-item').length > 0){
post.data.purchase = [];
$('.shopping-add-item').each(function(){
if ($(this).find(".inp-cbx").prop('checked')){
var random = $(this).attr("data-random");
var id = $(this).attr("data-proid");
var oid = $(this).attr("data-oid");
var sid = $(this).attr("data-sid");
var qty = $(this).attr("data-qty");
var sname = $(this).attr("data-sname");
post.data.purchase.push({random:random,id:id,oid:oid,sid:sid,qty:qty,sname:sname});
}
});
}
}
});
if ($("#products-form-search").length > 0) {
$(".products-select-search").change(function () {
$("#products-form-search").submit();
});
}
if ($(".itemspec-color-btn").length > 0) {
$(".itemspec-color-btn").click(function(){
var specid = $(this).data("id");
$("#itemspec-color").val(specid);
$("#itemspec-color").change();
if ($("#color-"+specid).length > 0) {
$("#color-"+specid).trigger("click");
}
});
}
if ($("#products-selectmenu-link").length > 0) {
$("#products-selectmenu-link").change(function () {
var href = $(this).val() || null;
if (href)
window.location.href = href;
});
}
});