I want to get customer id & order id at order success page.
Already tried this : Success page get customer name and order id ..But not working
In index controller
public function successAction()
{
$this->_getState()->setCompleteStep(
Xx_Multistepcheckout_Model_Type_State::STEP_OVERVIEW
);
$this->_getState()->setActiveStep(
Xx_Multistepcheckout_Model_Type_State::STEP_SUCCESS
);
$this->loadLayout();
$this->_initLayoutMessages('checkout/session');
$ids = $this->_getCheckout()->getOrderIds();
Mage::dispatchEvent('checkout_multishipping_controller_success_action', array('order_ids' => $ids));
$this->renderLayout();
}
In order success page
$_orderIds = $this->getOrderIds();
But it's not giving any order Id's.
So to get order details I've tried following code in order success page.
$order = Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId());
print_r($order->getData());
It's also giving me an empty array.
Can you please suggest me what should I can do to get order id and customer id in order success page.