1

I have set default file name in textbox but it's not working. Can you please guide me where I went wrong?

my Code is:

app/code/learning/Custom/etc/adminhtml/system.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Config/etc/system_file.xsd">
    <system>
        <tab id="custom" translate="label" sortOrder="0">
            <label>Custom Extension</label>
        </tab>
        <section id="custom_customer" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Customer</label>
            <tab>custom</tab>
            <resource>Learning_Custom::config_custom</resource>
            <group id="magento_customer_logs" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Magento Customer Logs</label>
                <field id="magento_request" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Magento Customer Request</label>
                </field>
                <field id="magento_response" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Magento Customer Response</label>
                </field>
            </group>
        </section>
    </system>
</config>

app/code/learning/Custom/etc/acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Learning_Custom::config_custom" title="Custom Section" sortOrder="80" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

app/code/learning/Custom/etc/config.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Store/etc/config.xsd">
    <default>
        <custom_customer>
            <magento_customer_logs>
                <magento_request>magento_request</magento_request>
                <magento_response>magento_response</magento_response>
            </magento_customer_logs>
        </custom_customer>
    </default>
</config>

Could you please let me know where I went wrong?

6
  • you have to remaining declare your modulename(Custom) in code.plz keep all the file inside Custom Folder. like app/code/learning/Custom/ Commented Nov 16, 2015 at 11:06
  • @RBJesadiya, Sorry, I forgot to Include Module name now I have updated my code plz.. look on this. Commented Nov 16, 2015 at 11:17
  • What is magento version you using ? Commented Nov 16, 2015 at 11:30
  • Magento ver. 1.0.0-beta. Commented Nov 16, 2015 at 11:31
  • I think you should write uppercase Learning and try refactor again Commented Nov 16, 2015 at 11:34

1 Answer 1

2

System.xml looks like

<?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>
        <tab id="custom" translate="label" sortOrder="0">
            <label>Custom Extension
        </tab>
        <section id="custom_customer" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Customer</label>
            <tab>custom</tab>
            <resource>Learning_Custom::config_custom</resource>
            <group id="magento_customer_logs" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Magento Customer Logs</label>
                <field id="magento_request" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Magento Customer Request</label>
                </field>
                <field id="magento_response" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Magento Customer Response</label>
                </field>
            </group>
        </section>
    </system>
</config>

acl.xml looks like

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Learning_Custom::config_custom" title="Custom Section" sortOrder="80" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

config.xml looks like

<?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>
        <custom_customer>
            <magento_customer_logs>
                <magento_request>magento_request</magento_request>
                <magento_response>magento_response</magento_response>
            </magento_customer_logs>
        </custom_customer>
    </default>
</config>

Try it.

2
  • Sorry, I forgot to Include Module name now I have updated my code plz.. look on this. Commented Nov 16, 2015 at 11:18
  • Yes it's working in newly released MCE 1.0.0 and MEE 1.0.0 Commented Nov 20, 2015 at 4:53

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.