From 2d764de64df1bd7637f4c5135cf8a38b0f68f444 Mon Sep 17 00:00:00 2001 From: Dmitry Mamontov Date: Mon, 23 Nov 2015 11:47:22 +0300 Subject: [PATCH] fix product quantity --- classes/Parser.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/classes/Parser.php b/classes/Parser.php index 9bd4913..a74242f 100644 --- a/classes/Parser.php +++ b/classes/Parser.php @@ -64,9 +64,8 @@ class Parser { } $items = array(); - $xmlItems = $xml->items; + $xmlItems = $xml->items->item; foreach($xmlItems as $xmlItem) { - $xmlItem = $xmlItem->item; $items[] = array( 'productId' => (string)$xmlItem['id'], 'productName' => (string)$xmlItem->name, @@ -101,4 +100,4 @@ class Parser { 'patronymic' => $patronymic ); } -} \ No newline at end of file +}