i am creating a module and i need the default order status for invoice.
i know the default status is processing but i don't want to hard code it.
i am already creating the invoice but the order status is not changing.
how can i get that any help will be appreciated.

this is how i generate invoice

     try {
           }else {

           $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();

           if (!$invoice->getTotalQty()) {
           Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));

           $transactionSave = Mage::getModel('core/resource_transaction')

     catch (Mage_Core_Exception $e) {



1 Answer 1


You can add the following line, it will change the order to the default processing state:


You will have to add a line like this though, it will not change automatically as far as I know.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.