You can get Order Detail using this,
File Location = frontend/base/default/template/checkout/success.phtml
<?php
echo $order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());
$items = $order->getAllItems();
foreach ($items as $item){
$product = $item->getProduct();
$proids = $item->getProductId();
$name = $item->getName();
$storeId = 1;
echo "<br/>";
}
?>