0

I am trying to predefine the values for field in Configuration > Sales > Sales Email

I am not sure how to predefine it & check if it works.

Any thoughts ?

enter image description here

4
  • Any thoughts on this?
    – devhs
    Mar 1, 2021 at 12:23
  • What exactly do You mean? Do You want to create new email template. Or edit existing, or what? Mar 1, 2021 at 12:45
  • Actually there is a backend settings see awesomescreenshot.com/image/… how can i set some email id in this through app/etc/config.php so this field data can't be changes from backend
    – devhs
    Mar 1, 2021 at 12:47
  • etc/config.xml will works only for new instance or for fields. If You need to change value for exising fields in Admin via code, use Install/Upgrade Scripts or DataPatches Mar 1, 2021 at 13:30

1 Answer 1

1
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <YourSectionId>
            <YourGroupId>
                <fieldId>1</fieldId>
                <enable>1</enable>
                <page_type>0</page_type>
                <button_color>1979c3</button_color>
                <sign_color>fffcff</sign_color>
            </YourGroupId>
        </YourSectionId>
    </default>
</config>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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