Skip to content

Commit 41c24ff

Browse files
author
Mplus Software
committed
Update naar API v0.9.9
1 parent 7b1d902 commit 41c24ff

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Mplusqapiclient.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
class MplusQAPIclient
44
{
5-
const CLIENT_VERSION = '0.9.8';
5+
const CLIENT_VERSION = '0.9.9';
66

77
var $MIN_API_VERSION_MAJOR = 0;
88
var $MIN_API_VERSION_MINOR = 9;
9-
var $MIN_API_VERSION_REVIS = 8;
9+
var $MIN_API_VERSION_REVIS = 9;
1010

1111
var $MAX_API_VERSION_MAJOR = 0;
1212
var $MAX_API_VERSION_MINOR = 9;
13-
var $MAX_API_VERSION_REVIS = 8;
13+
var $MAX_API_VERSION_REVIS = 9;
1414

1515
var $debug = false;
1616

@@ -1193,7 +1193,7 @@ public function parseProducts($soapProducts)
11931193
$products = array();
11941194
foreach ($soapProducts as $soapProduct) {
11951195
$product = objectToArray($soapProduct);
1196-
if (isset($product['groupNumbers'])) {
1196+
if (array_key_exists('groupNumbers', $product)) {
11971197
if ( ! is_array($product['groupNumbers'])) {
11981198
if ( ! empty($product['groupNumbers'])) {
11991199
$product['groupNumbers'] = array($product['groupNumbers']);
@@ -1206,6 +1206,15 @@ public function parseProducts($soapProducts)
12061206
else {
12071207
$product['groupNumbers'] = array();
12081208
}
1209+
if (array_key_exists('sortOrderGroupList', $product)) {
1210+
if (array_key_exists('sortOrderGroup', $product['sortOrderGroupList'])) {
1211+
$product['sortOrderGroupList'] = $product['sortOrderGroupList']['sortOrderGroup'];
1212+
} else {
1213+
$product['sortOrderGroupList'] = array();
1214+
}
1215+
} else {
1216+
$product['sortOrderGroupList'] = array();
1217+
}
12091218
if (isset($product['articleList']['article']) and ! isset($product['articleList']['article']['articleNumber'])) {
12101219
$product['articleList'] = $product['articleList']['article'];
12111220
}

0 commit comments

Comments
 (0)