Adding Data.php Helper to Magento got an error

The following Alan Storm tutorial on setting up a Custom Magento System when I tried to add

Data.php in the auxiliary folder, I still get this error:

Fatal error: class 'Mage_Helloworld_Helper_Data' was not found in E: \ xampp \ htdocs \ magento \ app \ Mage.php on line 520

**Alanstormdotcom\Helloworld\Helper\Data.php** <?php class Alanstormdotcom_Helloworld_Helper_Data extends Mage_Core_Helper_Abstract { } **Alanstormdotcom\Helloworld\etc\system.xml** <?xml version="1.0"?> <config> <tabs> <helloconfig translate="label" module="helloworld"> <label>Hello Config</label> <sort_order>99999</sort_order> </helloconfig> </tabs> </config> **Alanstormdotcom\Helloworld\etc\config.xml** <?xml version="1.0"?> <config> <modules> <Alanstormdotcom_Helloworld> <version>0.1.0</version> </Alanstormdotcom_Helloworld> </modules> <frontend> <routers> <helloworld> <use>standard</use> <args> <module>Alanstormdotcom_Helloworld</module> <frontName>helloworld</frontName> </args> </helloworld> </routers> </frontend> <global> <helpers> <class>Alanstormdotcom_Helloworld_Helper</class> </helpers> </global> </config> 

I just wanted to find out .. I know this works for you, but still help me find why .. I could skip

something .. thanks.

+4
source share
1 answer

This bit is invalid:

 <global> <helpers> <class>Alanstormdotcom_Helloworld_Helper</class> </helpers> </global> 

It should be:

 <global> <helpers> <helloworld> <class>Alanstormdotcom_Helloworld_Helper</class> </helloworld> </helpers> </global> 

(The <helloworld> matches module="helloworld" above)

+13
source

Source: https://habr.com/ru/post/1340273/


All Articles