Magento Forum

Custom module with subdirectories
 
licentia
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2007-08-31
Portugal
 

Hi,

I’m developing a few modules for Magento, and I’m “stuck” here…

Why can’t we create subdirectories at app/code/local/MyFolder/OtherFolder

If we want sub folders the parent folder must be named Mage

I’m defining this in app/etc/modules

<config>
    <
modules>
        <
Mascker_Ctt>
            <
active>true</active>
            <
codePool>local</codePool>
        </
Mascker_Ctt>
    </
modules>
</
config>

But the Magento autoload function loads something like this:

Mage/Ctt/Helper/Data.php
instead of
Mascker/Ctt/Helper/Data.php

I’m doing something wrong??

How can we bypass this?

Regards,

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Magento model loader will fall back to Mage namespace if the model group was not declared in module’s config.xml.

Add this to Mascker/Ctt/etc/config.xml:

<config>
...
  <global>
    <
models>
      <
ctt><class>Mascker_Ctt_Model</class></ctt>
    </
models>
  </global>
...
</
config>
 
Magento Community Magento Community
Magento Community
Magento Community
 
licentia
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2007-08-31
Portugal
 

Hi Moshe,

Thanks for the answer, but still not working.

This code is part of a shipping module.

You can see the module with Mage instead Mascker here

http://www.magentocommerce.com/boards/viewthread/6167/

Best Regards,

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top