Magento – How to get order Id in class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form

magento-1

How to get order Id in class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form ?

I tried out many ways such as, $this->getQuote->getId();, $this->getOrder->getId(); etc etc… But no Use. I am new in magento and extremely new to Its zend based module structure.

Any help will be appreciated.

Best Answer

First, do you want the quote id or the order id?

If you are after the quote id, try: $this->getQuote()->getId() (note that getQuote is a method).

If you are after order id, I am afraid you cannot do this. The order is created when you press the "place order" button so when you see the output of Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form, no order exists in the system yet. Only the quote is available at this time.