I'm checking each order line.
If the line was ordered, I have to do to something. If it was backordered, I will have to do something different. Like this:
private function myFunction($order){
$orderItems = $order->getAllVisibleItems();
foreach($orderItems as $item) {
$product = Mage::getModel('catalog/product')->load($item->getProductId());
if( $item was ordered )
foo();
elseif( $item was backordered )
bar();
}
}
I've already tried this post but it doesn't work.
How can I check both scenarios?