I have an observer attached to sales_order_place_before and from that event I am getting the order items using
$event = $observer->getEvent();
$order = $event->getOrder();
$items = $order->getQuote()->getAllItems();
When I log these items in a foreach like so I get double the amount of products. That is, I get the configurable AND the simple product
foreach($items as $item){
$product = $item;
$sku = $product->getSku();
$name = $product->getName();
}
If I change the $items call to be $items = $order->getQuote()->getAllVisibleItems();
then I can get just the configurable products, but I want to get just the simple products.
My question is, how can I get just the simple products from the order.