如何才能打電話到Magento SOAP API v2獲取vb.net中一組日期之間的所有銷售訂單?獲取銷售訂單日期
這是我到目前爲止所嘗試的,但是它仍然會返回0
銷售訂單,儘管它們存在。
Dim ae As associativeEntity = New associativeEntity()
ae.key = "status"
ae.value = "processing"
Dim params As filters = New filters
Dim dateFilter As complexFilter
dateFilter = New complexFilter()
dateFilter.key = "created_at"
Dim nestedFilterFrom As associativeMultiEntity = New associativeMultiEntity()
nestedFilterFrom.key = "gteq"
nestedFilterFrom.value = New String() {DateTime.Parse(fromDate).ToUniversalTime.ToString()}
dateFilter.value = nestedFilterFrom
Dim dateToFilter As complexFilter = New complexFilter()
Dim nestedFilterTo As associativeMultiEntity = New associativeMultiEntity()
nestedFilterTo.key = "lteq"
nestedFilterTo.value = New String() {DateTime.Parse(toDate).ToUniversalTime.ToString()}
dateToFilter.key = "created_at"
dateToFilter.value = nestedFilterTo
params.complex_filter = New complexFilter() {dateFilter, dateToFilter}
magentoWS.salesOrderList(sessionID, params)
我已經能夠獲得相同的代碼工作匹配狀態,如下所示。
Dim ae As associativeEntity = New associativeEntity
Dim params As filters = New filters()
ae.key = "status"
ae.value = "processing"
params.filter = New associativeEntity() {ae}
magentoWS.salesOrderList(sessionID, params)
'昏暗dateFromFilter作爲complexFilter =新complexFilter隨着{.KEY = createdAt,.value的= nestedFilterFrom}'你不能做到這一點:nestedFilterFrom是associativeMultiEntity,不能轉換爲associativeEntity –