What are the definitions of the order statuses? OR: Where should I integrate my order state?

The question:

I want to define some order states like “credit card payment received”, the question is to which statuses they belong. Is there a definition for each of the built-in statuses?

Edit: Seems like I mixed up “status” and “state”, I hope it gets clear from the context anyways. I blame the German Magento translation (State => Status, Status => Zustand)

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

According to “The Definitive Guide to Magento” [1], the order statuses are defined as follows:

  • Pending: Pending orders are brand new orders that have not been processed. Typically, these orders need to be invoiced and shipped.
  • Pending PayPal: Pending PayPal orders are brand new orders that have not been cleared by PayPal. […]
  • Processing: Processing means that orders have either been invoiced or shipped, but not both.
  • Complete: Orders marked as complete have been invoiced and have shipped.
  • Cancelled: Cancelled orders should be used if orders are cancelled or if the orders have not been paid for.
  • Closed: Closed orders are orders that have had a credit memo assigned to it and the customer has been refunded for their order.
  • On Hold: Orders placed on hold must be taken off hold before continuing any further actions.

Therefore a state “credit card payment received” would belong to processing, providing that the order has not been shipped yet.

Aligent Consulting[2] created a flow chart for order states:

magento order state flow


  1. Adam McCombs and Robert Banh: “The Definitive Guide to Magento”, Apress, 2009 (ISBN 1430272287, 9781430272281)
  2. https://twitter.com/aligent/status/509487359172177921/photo/1

Method 2

The different order states are defined in Mage_Sales_Model_Order:

const STATE_NEW             = 'new';
const STATE_PENDING_PAYMENT = 'pending_payment';
const STATE_PROCESSING      = 'processing';
const STATE_COMPLETE        = 'complete';
const STATE_CLOSED          = 'closed';
const STATE_CANCELED        = 'canceled';
const STATE_HOLDED          = 'holded';
const STATE_PAYMENT_REVIEW  = 'payment_review';

Method 3

Actually since 1.5 order statuses can be defined in Admin section and xml is not preferred way of adding/changing states or statuses.
Please make a difference between state and status. State is ‘processing’ status is ‘credit card payment received’

Order statuses can be created and modified in admin/sales_order_status/, no need to do anything in XML
You can assign a status only if order is in appropriate state. By default order goes into Processing state when it is invoiced or shipped.

Method 4

You can connect your new state to existing order statuses, or you create completely new. Simply modify the configuration file of the sales module as follows (app code core Mage Sales etc config.xml) with your new state:

<?xml version="1.0"?>
  <!-- ... -->
            <label>New Status</label>
            <description>Your Description here</description>

Refresh the cache, done.

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment