im doing some work with the Magento SOAP API and i am trying to create a valid list of orders. I have got the list but it shows both the configurable products as well as simple product giving me duplicating like the image below:
The first listing of the same product is the configurable product, the second is the simple product. What i need to do is filter out the simple products so they dont shown in the list or get stored. This sounds simple but there is one problem that im struggling to get my head around how to solve, and that is products like the Nokia in the image above are standard simple products and have no configurable properties and they also need to be shown!
So basically i need to get rid of the simple products relating to the configurable products but none others.
Here is my loop and array push:
foreach($sales_order_info->items as $i){
$nextItem = new item();
$nextItem->set_order_id($i->order_id);
$nextItem->set_sku($i->sku);
$nextItem->set_name($i->name);
$nextItem->set_qty_ordered($i->qty_ordered);
$nextItem->set_price($i->price);
$nextItem->set_row_total($i->row_total);
array_push($this->items, $nextItem);
}
Thanks very much