0

I want to make a menu item, and maybe even a section in admin. This item will link me to a new form in admin. How can I do that, with a new module? I know I need a new module, but what else do I need, what kind of setup of config.xml etc...?

1

You need a system.xml in the etc folder of your module. Magento will automatically pick it up when it loads.

<?xml version="1.0"?>
<config>
    <tabs>
        <myextension translate="label" module="catalog">
            <label>My Extension</label>
            <sort_order>200</sort_order>
        </myextension>
    </tabs>
    <sections>
        <myextension translate="label" module="catalog">
            <class>separator-top</class>
            <label>My Extension</label>
            <tab>myextension</tab>
            <sort_order>40</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <mysection translate="label">
                    <label>My Section</label>
                    <sort_order>100</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        ...
                    </fields>
                </mysection>
            </groups>
        </myextension>
    </sections>
</config>

You can have a look at the Magento Core ones to get some example. Also, note that you will need to add the relevant nodes to your adminhtml.xml for permission issues (and you will probably need to log out and log back in to get rid of a persisting permission bug with Magento)

  • Thanks. Your answer actually helped me a lot. Although there are other things that need to be in order too. But, following your answer, I found the solution, so, thanks! – Vladimir Despotovic Nov 8 '16 at 21:55
  • You're welcome, glad I helped :) – Mayers Nov 8 '16 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.