-
Notifications
You must be signed in to change notification settings - Fork 1
ShopCart
Karick Tung edited this page May 6, 2018
·
3 revisions
url
/shopcart/add
input
{
"prdID":180868,
"storeID":"530",
"shopQty":5,
"saveBy":"website"
"shopUUID": 'YourShopUUID', // 如果未傳入則由 Web Service 自行產生
"posNo":"99", // 目前默認 99
"transNo":"1234", // 目前默認 "1234"
"memberNo":"", // 會員號碼
"languageID":0 // 默認
"activationCodes/activationCode":""
}
output
{
"message":"处理成功",
"data": {
"storeID":"530",
"shopUUID":"dbf2166664754c3db8557e836e9554f0",
"totalSubAmt":1275,
"totalDiscountAmt",0
"totalAmt":1275,
"itemCount":1,
"shopcartTime":1519266101478,
"shopcartItems":[
{
"prdID":180868,
"prdDesc":"ST JULIEN 2ND WINE 2006",
"qty":5,
"prdRtlPrice":123,
"prdDiscount":0,
"prdmoNo":"A1234",
"prdFlag":"Y", // 產品是 "Y",promotion 是 "A"
"deptDesc":" ",
"subDeptDesc":" ",
}
],
"promotions":[
{
"apportValue":100,
"promoType":" ",
"promoNo":" ",
"promoDesc":" ",
"rewardType":" ",
"amountDisplayRule":" ", // Money / quantity / Empty
"apportionmentType":" ",
"rewardAmount":0,
},
],
"missedPromotions":[
{
"description":" ",
"ticketLevel":" ",
"missedPromotionItems":[
{
"plu":" ",
"pluDesc":" ",
"pluRtlPrice":" ",
"depDesc":" ",
}
]
}
]
},
"error_code":"2000",
"is_success":true
}
Artisan CLI
$ php artisan mpos-ws:cart:add
url
/shopcart/query
input
{
"shopUUID":"dbf2166664754c3db8557e836e9554f0",
"storeID":"530"
}
output
{
"message":"处理成功",
"data":{
"storeID":"530",
"shopUUID":"dbf2166664754c3db8557e836e9554f0",
"totalAmt":1275,
"itemCount":1,
"shopcartTime":1519266302012,
"shopcartItems":[
{
"prdID":180868,
"shopQty":5,
"mixMatchFlag":"0",
"prdBrandEnu":"DULUC DUCRU",
"prdBrandZht":" ",
"prdNameEnu":"ST JULIEN 2ND WINE 2006",
"prdNameZht":" ",
"prdStatus":"A",
"prdPrice":255,
"promPrice":null,
"prdSizeDesc":"75CL",
"prdPack":"U"
}
]
},
"error_code":"2000",
"is_success":true
}
,
Artisan CLI
$ php artisan mpos-ws:cart:view
url
/shopcart/remove
input
{
"shopUUID":"dbf2166664754c3db8557e836e9554f0",
"prdID":180868,
"shopQty":3,
"storeID":"530",
"saveBy":"website"
}
output
缺少product or qty代表清空shopcart
{
"message":"处理成功",
"data":{
"storeID":"530",
"shopUUID":"dbf2166664754c3db8557e836e9554f0",
"totalAmt":510,
"itemCount":1,
"shopcartTime":1519266640395,
"shopcartItems":[
{
"prdID":180868,
"shopQty":2,
"mixMatchFlag":"0",
"prdBrandEnu":"DULUC DUCRU",
"prdBrandZht":" ",
"prdNameEnu":"ST JULIEN 2ND WINE 2006",
"prdNameZht":" ",
"prdStatus":"A",
"prdPrice":255,
"promPrice":null,
"prdSizeDesc":"75CL",
"prdPack":"U"
}
]
},
"error_code":"2000",
"is_success":true
}
Artisan CLI
$ php artisan mpos-ws:cart:remove