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>
asked Dec 7, 2018 at 12:52
Pankaj Sharma
1,3912 gold badges21 silver badges41 bronze badges
-
Could you include the system.xml file contents of both modules here. Just to make it easy to explainnikin– nikin2018年12月07日 13:05:19 +00:00Commented Dec 7, 2018 at 13:05
-
sure @nikin give me 2 min.Pankaj Sharma– Pankaj Sharma2018年12月07日 13:09:02 +00:00Commented Dec 7, 2018 at 13:09
-
@nikin I have added both system.xml files.Pankaj Sharma– Pankaj Sharma2018年12月07日 13:12:56 +00:00Commented Dec 7, 2018 at 13:12
1 Answer 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.
answered Dec 7, 2018 at 13:23
Ramkishan Suthar
4,0526 gold badges36 silver badges56 bronze badges
-
Thanks @Ramkishan, I changed
<tab>name of secondsystem.xmlfile with the tab name of firstsystem.xml. And it is working for me.Pankaj Sharma– Pankaj Sharma2018年12月10日 04:21:34 +00:00Commented Dec 10, 2018 at 4:21 -
Great @PankajSharma. Please accept the answer it'll help others.Ramkishan Suthar– Ramkishan Suthar2018年12月10日 05:16:32 +00:00Commented Dec 10, 2018 at 5:16
default