Synopsis
I have created a basic local module that is designed to listen to an observer , which it does perfectly fine. However I wish the observer method to pull out some configured settings which changes the behaviour of it's task.
I want to add a new section under the Catalog
tab; I found this question.
I do not want to create a new tab, instead I do want a new section under the existing Catalog tab (similarly to Catalog > Inventory).
Current behaviour
Currently inside the control panel I click Catalog > Catalog
, low and behold inside this tab is a group called Section Name Under Catalog Tab. I also don't see my group Group Name.
Expected behaviour
I click Catalog > Section Name Under Catalog Tab
, inside this tab is a group called Group Name with my enable/disable field.
- As per Image example 1 - I'd expect a section called Section Name Under Catalog Tab;
- As per Image example 2 - I'd expect this to expand into a view with my group Group Name;
- Finally the group should contain the form present in Image exmaple 2.
Code snippets
local/Vendor/Module/etc/adminhtml.xml
<?xml version="1.0" ?>
<config>
<acl>
<resources>
<admin>
<children>
<system>
<children>
<config>
<children>
<mymodule translate="title" module="mymodule">
<title>Section inside Catalog</title>
</mymodule>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</config>
local/Vendor/Module/etc/system.xml
<?xml version="1.0" ?>
<config>
<sections>
<mymodule translate="label" module="mymodule">
<label>Section Name Under Catalog Tab</label>
<tab>catalog</tab>
<frontend_type>text</frontend_type>
<sort_order>0</sort_order>
<show_in_default>0</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<groups>
<category_options translate="label">
<label>Group Name</label>
<frontend_type>text</frontend_type>
<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>
<active translate="label">
<label>Enabled</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_enabledisable</source_model>
<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>
</active>
</fields>
</category_options>
</groups>
</mymodule>
</sections>
</config>