I am new in magento. i try to create a custom Module, for admin from tutorial, and when i try to access admin panel i got Fatal error: Uncaught Error: Class 'Mage_Sample_Helper_Data' not found
.
And if i disable the module , admin work fine.
Can't understand from where come the Mage alias instead Lern
thank you for help.
files look like this:
folders:
app
code
local
Lern
Sample
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Lern_Sample>
<version>0.1.0</version>
</Lern_Sample>
</modules>
<frontend>
<routers>
<sample>
<use>standard</use>
<args>
<module>Lern_Sample</module>
<frontName>sample</frontName>
</args>
</sample>
</routers>
</frontend>
<admin>
<routers>
<sample>
<use>admin</use>
<args>
<module>Lern_Sample</module>
<frontName>admin_sample</frontName>
</args>
</sample>
</routers>
</admin>
<global>
<helpers>
<helloworld>
<class>Lern_Sample_Helper</class>
</helloworld>
</helpers>
</global>
<adminhtml>
<menu>
<sample module="sample">
<title>Sample Module</title>
<sort_order>100</sort_order>
<children>
<sample module="sample">
<title>Sample Module</title>
<sort_order>0</sort_order>
<action>admin_sample/adminhtml_index</action>
</sample>
</children>
</sample>
</menu>
</adminhtml>
Helpers folder - file Data.php
class Lern_Sample_Helper_Data extends Mage_Core_Helper_Abstract {
}
Adminhtml controller:
class Lern_Sample_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action {
/**
* Admin controller index action
*
* @access public
* @return void
*/
public function indexAction() {
echo 'hello world in the admin side..!!!'. '';
}
}
helper
class. Also just so you know, support for Magento1.X is due to stop shortly .. so no more security updates etc. - should research Magento 2 :) - treyBake