문제

텍스트 상자에서 기본 파일 이름을 설정했지만 작동하지 않습니다.내가 뭘 잘못했는지 안내 할 수 있니?

내 코드는 다음과 같습니다.

앱 / 코드 / 학습 / 사용자 정의 / 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>
.

앱 / 코드 / 학습 / 사용자 정의 / 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>
.

앱 / 코드 / 학습 / 사용자 정의 / 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>
.

내가 어디에서 갔는지 알려주시겠습니까?

도움이 되었습니까?

해결책

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>
        <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은

처럼 보입니다.
<?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은

처럼 보입니다.
<?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>
.

시도해보십시오.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top