Skip to content

Commit

Permalink
Merge pull request #3 from mihaisolomon/bugfix/add-ItemDimension-to-G…
Browse files Browse the repository at this point in the history
…etMatchingProductForId-method

Update MWSClient.php
  • Loading branch information
mihaisolomon authored Nov 24, 2020
2 parents 5c106c4 + 1d9acae commit 47bbb4a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/MWSClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,14 @@ public function GetMatchingProductForId(array $asin_array, $type = 'ASIN')
if (isset($product['SalesRankings']['SalesRank'])) {
$array['SalesRank'] = $product['SalesRankings']['SalesRank'];
}

if (isset($product['AttributeSets']['ItemAttributes']['ItemDimensions'])) {
$array['ItemDimensions'] = array_map(
'floatval',
$product['AttributeSets']['ItemAttributes']['ItemDimensions']
);
}

$found[$asin][] = $array;
}
}
Expand Down

0 comments on commit 47bbb4a

Please sign in to comment.