我尝试在prestashop中安装模块时出错

时间:2015-01-05 12:06:49

标签: module prestashop

按照开发者手册进行prestashop我遇到了这个问题:

我的测试模块的代码是:

    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();
    }
}

但是,如果我尝试激活我的模块,我总会看到这个错误:

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

我尝试使用本地的prestashop和我在此文件夹中写入的权限。

我正在使用Prestashop版本1.6.0.9

1 个答案:

答案 0 :(得分:3)

您的模块名称设置不正确:

   $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