Magento orders: states and statuses

 

Magento orders have different states for following their process (billed, shipped, refunded...) in the order Workflow. These states are not visible in Magento back office. In fact, it is orders statuses that are displayed in back office and not their states.

Each state can have one or several statuses and a status can have only one state. By default, statuses and states have often the same name, that is why it is a little confusing. Here is the list of statuses and states available by default.

State codeState nameStatus codeStatus name
newNewpendingPending
pending_paymentPending Paymentpending_paypal
pending_amazon_asp
Pending PayPal
Pending Amazon Simple Pay
processingProcessingprocessingProcessing
completeCompletecompleteComplete
closedClosedclosedClosed
canceledCanceledcanceledCanceled
holdedOn HoldholdedOn Hold

For adding new status to a state, you just need to declare it in config.xml file

 

 

 

 

When we want to modify order status in some code, we have to be sure that current order state allows status wanted. It is possible to change both state and status with setState method

 

 

 

$status can also take false value in order to only set order state, or true value for setting status by taking first status associated to this state.

You can now adjust as you wish your order workflow in Magento.

 

源文:http://blog.baobaz.com/en/tag/magento-state-and-status

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值