Is it possible to create a module/extension with only a Helper class declared? I am trying to create a module because I need to use a function on more than one phtml files.
So far I got this code:
/app/etc/modules/Mycompanyname_CategoryStep.xml
<?xml version="1.0"?>
<config>
<modules>
<Mycompanyname_CategoryStep>
<active>true</active>
<codePool>local</codePool>
</Mycompanyname_CategoryStep>
</modules>
</config>
/app/code/local/Mycompanyname/CategoryStep/Helper/Data.php
<?php
class Mycompanyname_CategoryStep_Helper_Data extends Mage_Core_Helper_Abstract
{
public function add($num1, $num2)
{
return $num1 + $num2;
}
}
/app/code/local/Mycompanyname/CategoryStep/etc/config.xml
<?xml version="1.0" encoding ="UTF-8"?>
<config>
<modules>
<Mycompanyname_CategoryStep>
<version>0.1.0</version>
</Mycompanyname_CategoryStep>
</modules>
<global>
<helpers>
<categorystep>
<class>Mycompanyname_CategoryStep_Helper</class>
</categorystep>
</helpers>
</global>
</config>
That's the error I get:
Fatal error: Class 'Mage_Categorystep_Helper_Data' not found in /home/account/public_html/app/Mage.php on line 550
Am I missing something? I followed this guide to create the module and this guide and several others to create the Helper class. Any help would be appreciated.