opencart版權(quán),magento添加產(chǎn)品
2022-10-26 10:08:36 - 米境通跨境電商
除產(chǎn)品選項(xiàng)外,我的購(gòu)物車(chē)似乎正在運(yùn)行.當(dāng)我單擊添加購(gòu)物車(chē)按鈕時(shí),該項(xiàng)目被添加,但是沒(méi)有添加任何選項(xiàng).我真的不明白為什么會(huì)這樣,因?yàn)槲沂褂胦ption_id和option_value_id將函數(shù)作為函數(shù)提交的選項(xiàng)作為數(shù)組提交了
$('#button-cart').on('click',function(){
varmodel_select=$('#modeloption:selected').val();
alert("working");
$.ajax({
url:'',
type:'post',
data:{'option':$('#networkoption:selected').val(),'product_id':model_select,'ajax':'1'},
success:function(json){
$('.success,.warning,.attention,information,.error').remove();
if(json['error']){
if(json['error']['option']){
for(iinjson['error']['option']){
$('#option-'+i).after(''+json['error']['option'][i]+'');
}
}