When using
$order = Mage::getModel("sales/order")->loadByIncrementId($OrderNo);
I can access product ids by
foreach ($order->getAllItems() as $item)
{
if ($item->getParentItemId() != NULL) continue;
echo $item->getProductId();
}
But when I access the order via an event observer this method fails.
$order = $observer->getEvent()->getOrder();
How do I get product ids in this case?
sales_order_payment_place_end
orsales_order_save_commit_after
orsales_model_service_quote_submit_success