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)

Was it helpful?

Solution

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


Sources:

  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

OTHER TIPS

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';

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'

Update: 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.

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"?>
<config>
  <!-- ... -->
  <global>
    <sales>
      <order>
        <statuses>
          <new_status>
            <label>New Status</label>
            <description>Your Description here</description>
          </new_status>
        </statuses>
        <states>
          <new>
            <label>New</label>
            <statuses>
              <new_status/>
            </statuses>
            <visible_on_front/>
          </new>
        </states>
      </order>
    </sales>
  </global>
</config>

Refresh the cache, done.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top