How to create custom commerce order states? I want to create custom order state's and in a view use a "button" or a "select list" to toggle those states.

For example I have view that display's a table of all orders that are marked completed.
I would like to add a "button" or "select list" to each row so that I can toggle the state for each order.

Can this be done?
Two things there:

A. Define your custom order states with one of the Order info hooks.


hook_commerce_order_state_info
hook_commerce_order_status_info


B. Create a commerce_order based VBO view and add an operation to change the order state. It won't be a button on each row, just a checkbox or radio button, but you can batch update that way.

Alternatively, edit the order and set it's state on the edit form.