2

I have two modules with same vendor name. I want to display the second module system configuration setting under first module tab in admin. Do you guys have any idea?

Here are my system.xml files for both modules:

First module system.xml:

<?xml version="1.0"?>
<config>
<tabs>
    <modulename_marketing translate="label" module="marketing">
        <label>Grz Marketo marketing Cart Integration</label>
        <sort_order>2</sort_order>
    </modulename_marketing>
</tabs> 
<sections>
    <modulename_marketing translate="label" module="marketing">
        <class>separator-top</class>
        <label>Settings</label>
        <tab>modulename_marketing</tab>
        <sort_order>140</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>            
       <groups>
            <marketing_settings translate="label">
                <label>marketing Cart Configurations</label>
                <sort_order>4</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>0</show_in_website>    
                <fields>
                  <enable translate="label">
                        <label>Enable marketing Cart Integration</label>
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                        <!-- <frontend_model>modulename_Mkt_Block_Checkobjects</frontend_model> -->                 
                        <sort_order>1</sort_order>
                        <show_in_default>10</show_in_default>
                        <show_in_website>10</show_in_website>
                        <show_in_store>10</show_in_store>
                        <comment>Send marketing Cart informations from Magento to Marketo.</comment>
                   </enable>

                </fields>

                   <fields>
                    <marketing_cart_custom_object_api_name translate="label">
                        <label>marketinged Cart custom object API name</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>2</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <depends><enable>1</enable></depends>
                    </marketing_cart_custom_object_api_name>                    
                </fields>

            </marketing_settings>
        </groups>
         <groups>
            <uzkart_standard translate="label" module="marketing">
                <label>marketing Cron Time Settings</label>
                <sort_order>1</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <!--maybe another fields here-->
                    <frequency translate="label">
                        <label>Frequency</label>
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_cron_frequency</source_model>
                        <!-- Custom backend model which saves cron configuration -->
                        <backend_model>marketing/adminhtml_system_config_backend_marketing_cron</backend_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </frequency>
                    <!-- Cron job time -->
                    <time translate="label">
                        <label>Start Time</label>
                        <frontend_type>time</frontend_type>
                        <sort_order>201</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </time>
                </fields>
            </uzkart_standard>
        </groups>
      </modulename_marketing>
</sections>  
</config>

Second module 'system.xml`:

<?xml version="1.0"?>
<config>
<tabs>
    <modulename_marketing translate="label" module="marketing">
        <label>Grz Marketo marketing Cart Integration</label>
        <sort_order>2</sort_order>
    </modulename_marketing>
</tabs>
<sections>
    <modulename_marketing translate="label" module="marketing">
        <class>separator-top</class>
        <label>marketing Cart Settings</label>
        <tab>modulename_mkt</tab>
        <sort_order>140</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>            
       <groups>
            <marketing_settings translate="label">
                <label>marketing Cart Configurations</label>
                <sort_order>4</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>0</show_in_website>    
                <fields>
                  <enable translate="label">
                        <label>Enable marketing Cart Integration</label>
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                        <!-- <frontend_model>modulename_Mkt_Block_Checkobjects</frontend_model> -->                 
                        <sort_order>1</sort_order>
                        <show_in_default>10</show_in_default>
                        <show_in_website>10</show_in_website>
                        <show_in_store>10</show_in_store>
                        <comment>Send marketing Cart informations from Magento to Marketo.</comment>
                   </enable>

                </fields>
                <fields>
                    <marketing_cart_custom_object_api_name translate="label">
                        <label>marketinged Cart custom object API name</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>2</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <depends><enable>1</enable></depends>
                    </marketing_cart_custom_object_api_name>                    
                </fields>
            </marketing_settings>
        </groups>
        <groups>
            <marketing_cron translate="label" module="marketing">
                <label>Cron Settings</label>
                <sort_order>1</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <!--maybe another fields here-->
                    <minutes translate="label">
                        <label>Minute</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_minute</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </minutes>
                    <hours translate="label">
                        <label>Hours</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_hour</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </hours>
                    <days translate="label">
                        <label>Days (Month)</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_day</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </days>
                    <months translate="label">
                        <label>Month</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_month</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </months>
                    <weekdays translate="label">
                        <label>Day(week)</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_weekday</source_model>
                        <!-- Custom backend model which saves cron configuration -->
                        <backend_model>marketing/adminhtml_system_config_backend_marketing_weekday</backend_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </weekdays>
                </fields>
            </marketing_cron>
        </groups>
      </modulename_marketing>
</sections>  
</config>
3
  • Could you include the system.xml file contents of both modules here. Just to make it easy to explain
    – nikin
    Commented Dec 7, 2018 at 13:05
  • sure @nikin give me 2 min. Commented Dec 7, 2018 at 13:09
  • @nikin I have added both system.xml files. Commented Dec 7, 2018 at 13:12

1 Answer 1

1

Update your second module's system.xml like below.

<?xml version="1.0"?>
<config>
<sections>
    <modulename_marketing translate="label" module="marketing">
        <class>separator-top</class>
        <label>marketing Cart Settings</label>
        <tab>modulename_marketing</tab>
        <sort_order>140</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>            
       <groups>
            <marketing_settings translate="label">
                <label>marketing Cart Configurations</label>
                <sort_order>4</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>0</show_in_website>    
                <fields>
                  <enable translate="label">
                        <label>Enable marketing Cart Integration</label>
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                        <!-- <frontend_model>modulename_Mkt_Block_Checkobjects</frontend_model> -->                 
                        <sort_order>1</sort_order>
                        <show_in_default>10</show_in_default>
                        <show_in_website>10</show_in_website>
                        <show_in_store>10</show_in_store>
                        <comment>Send marketing Cart informations from Magento to Marketo.</comment>
                   </enable>

                </fields>
                <fields>
                    <marketing_cart_custom_object_api_name translate="label">
                        <label>marketinged Cart custom object API name</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>2</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <depends><enable>1</enable></depends>
                    </marketing_cart_custom_object_api_name>                    
                </fields>
            </marketing_settings>
        </groups>
        <groups>
            <marketing_cron translate="label" module="marketing">
                <label>Cron Settings</label>
                <sort_order>1</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <!--maybe another fields here-->
                    <minutes translate="label">
                        <label>Minute</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_minute</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </minutes>
                    <hours translate="label">
                        <label>Hours</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_hour</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </hours>
                    <days translate="label">
                        <label>Days (Month)</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_day</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </days>
                    <months translate="label">
                        <label>Month</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_month</source_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </months>
                    <weekdays translate="label">
                        <label>Day(week)</label>
                        <frontend_type>select</frontend_type>
                        <source_model>marketing/adminhtml_system_config_backend_marketing_weekday</source_model>
                        <!-- Custom backend model which saves cron configuration -->
                        <backend_model>marketing/adminhtml_system_config_backend_marketing_weekday</backend_model>
                        <sort_order>200</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <!--comment>Payment Fetch Frequency</comment-->
                    </weekdays>
                </fields>
            </marketing_cron>
        </groups>
      </modulename_marketing>
</sections>  
</config>

You just need to keep tab name as first tab name. Let me know if you need further help.

2
  • Thanks @Ramkishan, I changed <tab> name of second system.xml file with the tab name of first system.xml. And it is working for me. Commented Dec 10, 2018 at 4:21
  • Great @PankajSharma. Please accept the answer it'll help others. Commented Dec 10, 2018 at 5:16

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.