foreach ($order->getAllItems() as $item
{
$orderItemId = $item->getOrderItemId();
$orderItem = Mage::getModel('sales/order_item')->load($orderItemId);
$product = Mage::getModel('catalog/product')->load($item->getProductId());
$html.='<tr height="10">
<td>'.$item->getSku().'</td>
<td colspan="3">'.$product->getName().'</td>
<td>'.(int)$orderItem->getQtyBackordered().'</td>
<td>'.(int)$item['qty_ordered'].'</td>
</tr>';
}
With this code i am getting both simple and configurable product name but when i replace getAllItems by getAllVisibleItems then only show configurable product name but i want to show simple product name which was order