/**
  * Submit the quote. Quote submit process will create the order based on
  * quote data.
  *
  * @return Mage_Sales_Model_Order
  */
 public function submitOrder()
 {
     $this->_prepareQuote();
     $order = $this->_createOrder();
     // Create the transaction to place the order.
     $transaction = $this->_multishippingFactory->createOrderSaveTransaction($this->_quote, $order, $this->_quote->getCustomerId() ? $this->_quote->getCustomer() : null);
     // Dispatch events for when the order has been instantiated but before
     // any attempt has been made to actually save the order. Allows for
     // additional modifications to the order to be made before attempting
     // to save and place the order.
     $this->_checkoutDispatcher->dispatchBeforeOrderSubmit($this->_quote, $order);
     try {
         // Saving the transaction should trigger the order to be created -
         // save quote and order objects (incl. addresses & items), place
         // payments, and dispatch one last event that may be able to block
         // the order from being created.
         $transaction->save();
         $this->_inactivateQuote();
         $this->_checkoutDispatcher->dispatchOrderSubmitSuccess($this->_quote, $order);
     } catch (Exception $e) {
         $this->_cleanupFailedOrder($order);
         // Dispatch events signaling that the order failed to be created.
         // Allows related modules to cleanup or roll back actions taken
         // while attempting to creating the order.
         $this->_checkoutDispatcher->dispatchOrderSubmitFailure($this->_quote, $order);
         // Re-throw the exception to be handled in a user-friendly way elsewhere.
         throw $e;
     }
     // Signal that the order create was a success and the order has been
     // placed and saved.
     $this->_checkoutDispatcher->dispatchAfterOrderSubmit($this->_quote, $order);
     $this->_order = $order;
     return $order;
 }