Skip to content

Commit e93aa29

Browse files
committed
Fixed product not loading child variation data
1 parent 23b2db0 commit e93aa29

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

includes/classes/AmazonProduct.php

+10
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ public function loadXML($xml){
142142
}
143143
}
144144
}
145+
//child relations use namespace but parent does not
146+
foreach($xml->Relationships->children('ns2',true) as $x){
147+
foreach($x->children() as $y){
148+
foreach($y->children() as $z){
149+
foreach($z->children() as $zzz){
150+
$this->data['Relationships'][$x->getName()][$y->getName()][$z->getName()][$zzz->getName()] = (string)$zzz;
151+
}
152+
}
153+
}
154+
}
145155
}
146156

147157
//CompetitivePricing

0 commit comments

Comments
 (0)