From 1d9acae230dd0089658cc57d266a099e9a47e3c8 Mon Sep 17 00:00:00 2001 From: Mihai Solomon Date: Tue, 24 Nov 2020 11:10:59 +0200 Subject: [PATCH] Update MWSClient.php --- src/MWSClient.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/MWSClient.php b/src/MWSClient.php index fd8ecd2..3297ca6 100644 --- a/src/MWSClient.php +++ b/src/MWSClient.php @@ -660,6 +660,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; } }