1 (edited by barbarian 02/08/2017 06:48:02 am)

Topic: Create local module for FA 2.4RC

I am trying to learn how to create module for FA 2.4RC. I just create a really simple one, only add a menu without anything. In my hooks, I write this:

class hooks_mymodule extends hooks {
    var $module_name = 'My module';
   
    function install_options($app) {
        global $path_to_root;

        switch($app->id) {
            case 'stock':
                $app->add_lapp_function(1, _('My module'),$path_to_root.'/modules/mymodule/mymodule.php', 'SA_ITEM', MENU_MAINTENANCE);
                break;
        }
    }
    function activate_extension($company, $check_only=true){
        return;
    }
   
    function deactivate_extension($company, $check_only=true){
        return;
    }
}

After I tried to activate it, I got this error:
Package mymodule is incompatible with current application version and cannot be activated.

What should I do? I think I don't need to create _init folder to create local extension.

Re: Create local module for FA 2.4RC

Change 'version' => '-' to 'version' => '2.4.0-2' in both installed_extensions.php and company/x/installed_extensions.php
Or you can commented lines 215-220 in admin/inst_modules.php then uncomment them after active your ext

Phuong