Fix null value handling in getActiveCart API
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6727f42194
commit
186c3fcf68
1 changed files with 6 additions and 6 deletions
|
|
@ -71,16 +71,16 @@ try {
|
||||||
response["OK"] = true;
|
response["OK"] = true;
|
||||||
response["HAS_CART"] = true;
|
response["HAS_CART"] = true;
|
||||||
response["CART"] = {
|
response["CART"] = {
|
||||||
"OrderID": qCart.OrderID,
|
"OrderID": val(qCart.OrderID),
|
||||||
"OrderUUID": qCart.OrderUUID,
|
"OrderUUID": qCart.OrderUUID ?: "",
|
||||||
"BusinessID": qCart.OrderBusinessID,
|
"BusinessID": val(qCart.OrderBusinessID),
|
||||||
"BusinessName": len(trim(qCart.BusinessName)) ? qCart.BusinessName : "",
|
"BusinessName": len(trim(qCart.BusinessName)) ? qCart.BusinessName : "",
|
||||||
"BusinessOrderTypes": orderTypesArray,
|
"BusinessOrderTypes": orderTypesArray,
|
||||||
"OrderTypeID": qCart.OrderTypeID,
|
"OrderTypeID": val(qCart.OrderTypeID),
|
||||||
"OrderTypeName": orderTypeName,
|
"OrderTypeName": orderTypeName,
|
||||||
"ServicePointID": qCart.OrderServicePointID,
|
"ServicePointID": val(qCart.OrderServicePointID),
|
||||||
"ServicePointName": len(trim(qCart.ServicePointName)) ? qCart.ServicePointName : "",
|
"ServicePointName": len(trim(qCart.ServicePointName)) ? qCart.ServicePointName : "",
|
||||||
"ItemCount": qCart.ItemCount,
|
"ItemCount": val(qCart.ItemCount),
|
||||||
"AddedOn": dateTimeFormat(qCart.OrderAddedOn, "yyyy-mm-dd HH:nn:ss")
|
"AddedOn": dateTimeFormat(qCart.OrderAddedOn, "yyyy-mm-dd HH:nn:ss")
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue