I want to change the new order status for Cash On Delivery
Payment Method to Processing
I tried to do this:
I tried below changes in vendor but it didn't worked:
vendor\magento\module-offline-payments\etc\adminhtml\system.xml
<group id="cashondelivery" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Cash On Delivery Payment</label>
----
<field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>New Order Status</label>
<source_model>Magento\Sales\Model\Config\Source\Order\Status\Newprocessing</source_model>
OR
<source_model>Magento\Sales\Model\Config\Source\Order\Status</source_model>
</field>
---
</group>
Then I change in:
vendor\magento\module-offline-payments\etc\config.xml
<cashondelivery>
<active>0</active>
<model>Magento\OfflinePayments\Model\Cashondelivery</model>
<order_status>processing</order_status>
<title>Cash On Delivery</title>
<allowspecific>0</allowspecific>
<group>offline</group>
</cashondelivery>
also did not help. how can this be achieved?
Best Answer
You can achieve this from admin and need one change on system.xml Add below code:
Instead of
You will find the system.xml under
Note: Direct edit on core is not a good practice you can copy/override these onto your theme and do the change.
Then follow the below steps:
Under this you will find Other payment Methods click on that now you can see the Cash on delivery and other payment options.
Change the "New Order Status" status to processing. Check the screenshot.
After doing all the changes please clean cache.
Thats it!