Magento – Get Current Customer from Admin Section

admincustomersales-order

If I am on the admin section for creating manual orders and I have selected to use an existing customer rather than create a new one how can I access that customers details?

To clarify, by manual orders I mean by clicking – Sales -> Orders -> Create New Order and then selecting a customer to create an order for.

I'm hoping there is a function similar to the Mage::registry for products and categories so that I can select the customer email address within a template loaded via a custom module.

Best Answer

Customer is saved in session. Assuming you are on the order create page, you can retrieve it like this:

Mage::getSingleton('adminhtml/session_quote')->getCustomer();
Related Topic