Question

So I'm still learning the programming side of Magento, but I thought if I copied everything that has anything to do with the Bundle product type, rename it to a new product type name (Assembly), that would get me close where I could then modify my new product type for the behavior I want. It almost worked, but obviously I'm doing something wrong. I created a new namespace under local. (MyNewNamespace) I copied every file that had anything to do with bundle into respective new files with everything changed to assembly and MyNewNamespace/Assembly for the classes.

Everything almost works, except I get Fatal error: Class 'Mage_Assembly_Helper_Data' not found.

I traced this to app/code/core/Mage/Core/Model/Config.php line 1213 in

public function getGroupedClassName($groupType, $classId, $groupRootNode=null).

On line 1253 it hardcodes mage_ to come up with the class name.

What am I missing? Can I not do what I did in my own namespace?

Was it helpful?

Solution

Looks like you need to add a Helper/Data.php file to your extension.

Check other modules to see how this is done by adding the folder/file and adding the <helper> configuration to your extension's config.xml

It does not need to have any methods, but must exist and extend the appropriate core class.

Once added and configured, Magento will stop looking for a Mage_ version.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top