4

I would like to change New order status text to something else at payment method section of magento2 admin.

Admin->Store->Configuration->Sales->Payment method->Check / Money Order

See attachment for better reference.

enter image description here

I know that i can change this by core changes but i would like to change this text without making any change in core file.

I am able to do this by editing system.xml

vendor/magento/module-offline-payments/etc/adminhtml/system.xml
10

Magento may load our custom system config and merge into the exist nodes. In our custom system config, we should try:

Tested on Magento 2.0.2 and 2.1.2

Vendor/ModuleName/etc/adminhtml/system.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="payment">
            <group id="checkmo">
                <field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Custom New Order Status</label> <!-- Custom label -->
                </field>  
            </group>
        </section>
    </system>
</config>

Remember to add overridden module - Magento_OfflinePayments

Vendor/ModuleName/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_YourModule" setup_version="1.0.0">
        <sequence>
            <module name="Magento_OfflinePayments"/>
        </sequence>
    </module>
</config>
  • 1
    This works. System.xml should live in Vendor/ModuleName/etc/adminhtml/system.xml. – Mat Hellums Oct 16 '16 at 16:40
  • @MatHellums I updated my answer properly. – Khoa TruongDinh Oct 16 '16 at 16:49
  • I tried your solution. but it doesn't helped me. Do i need to run any additional command? – Makwana Ketan Oct 16 '16 at 17:04
  • @MakwanaKetan which is your Magento version? – Khoa TruongDinh Oct 17 '16 at 3:57
  • 1
    This did not work (even though my <sequence> stuff was correct) and the module name was Exxx_Xxxxx. When modifying the order, so the module loaded last, in config.php everything worked fine... Magento 2.1.7... – Robban Jun 22 '17 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.