Marcos
Marcos

Reputation: 241

Error when I try to install module in prestashop

Following the Developer's manual for prestashop I've this problem:

My code for my Test Module is:

    if (!defined("_PS_VERSION_")){
    exit;
}

class MyModule extends Module{      
    public function __construct(){
        $this->name='Testing';
        $this->tab='Modulo Prueba';
        $this->version=1.0;
        $this->author='Uniagro';
        $this->need_instance=0;

        parent::__construct();

        $this->displayName = $this->l('Test');
        $this->description = $this->l('Este es un modulo de prueba');       
    }

    public function install(){
        if (parent::install()==false){
            return false;
        }
        return true;
    }   

    public function uninstall(){
        if (!parent::uninstall()){
            Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'mymodule');          
        }
        parent::uninstall();
    }
}

But, if I try to activate my module I always see this error:

You don't have permissions to update your Testing module.

I try prestashop in local and I've permissions to write in this folder.

I'm ussing Prestashop version 1.6.0.9

Upvotes: 0

Views: 3220

Answers (1)

gskema
gskema

Reputation: 3211

Your module name is set incorrectly:

   $this->name='mymodule'; 

   // This is internal module name in lowercase letters,
   // must match the folder name too

   // Class name must match too but it can be in camel case : MyModule

Upvotes: 3

Related Questions