1

Maybe its a simple question, but not for beginners :) . How can I add item to the admin menu? also with submenus in magento ? I created a module, which have the following structure enter image description here

the content of config.xml is :

<?xml version="1.0"?>
<config>
    <modules>
        <Netgroup_Attributegrouping>
             <version>0.1.0</version>
        </Netgroup_Attributegrouping>
    </modules>
</config>

and the content of adminhtml.xml is :

<?xml version="1.0"?>
<config>
<menu>
    <attributegrouping translate="title" module="attributegrouping">
        <title>AttributeGrouping</title>
        <sort_order>210</sort_order>
    </attributegrouping> 
</menu>
</config>

and the content of Helper/Data.php is:

<?php

class Netgroup_Attributegrouping_Helper_Data extends Mage_Core_Helper_Abstract
{

}

the file from modules/Netgroup_AttributeGrouping.xml content is :

    <?xml version="1.0"?>
<config>
    <modules>
        <Netgroup_Attributegrouping>
            <active>true</active>
            <codePool>local</codePool>
        </Netgroup_Attributegrouping>
    </modules>
</config>

BUT the result is nothing. What should I do ? thx

  • Did you see your module name appear in System > Configuration > Advanced? – Magebuzz Jul 24 '14 at 8:04
  • Now I am getting this: Fatal error: Class 'Mage_AttributeGrouping_Helper_Data' not found in C:\xampp\htdocs\dachim\app\Mage.php on line 546 – Attila Naghi Jul 24 '14 at 8:08
  • I think it is because a problem with the module name. You may try to use the name as Attributegrouping instead of AttributeGrouping. You should make it the same for everywhere. – Magebuzz Jul 24 '14 at 8:10
  • I change the name as you suggested everywhere in admin.xml, config.xml, Netgroup_Attributegrouping.xml and also the name of the folders, but i got the same error message – Attila Naghi Jul 24 '14 at 8:15
  • Please make sure that you disable cache and compilation. – Magebuzz Jul 24 '14 at 8:16
2

I notice you did not defind Helper in config.xml So you should add the following thing:

<global>
    <helpers>
      <attributegrouping>
        <class>Netgroup_Attributegrouping_Helper</class>
      </attributegrouping>
    </helpers>
</global>

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.