New status not appearing on the order list

2019-09-11 11:54发布

问题:

I created a new status for the orders and it is being set correctly, my problem is that is not appearing on the order list... it is blank where it should be

what should I edit for this to work?

example:

 $order->setState('new_status', 'new_status', 'Some comment', false);
 $order->save();

thanks,
Joe

回答1:

I suspect you need to define the status in your module's config.xml file.

<config>
    <global>
        <sales>
            <order>
                <statuses>
                    <new_status translate="label"><label>Some status</label></new_status>
                </statuses>
            </order>
        </sales>
    </global>
</config>

This is how all other status codes are acquired.



标签: php magento