在Prestashop的模块列表中找不到模块

时间:2014-12-18 13:34:41

标签: php prestashop prestashop-1.5 prestashop-1.6

我正在尝试创建一个模块,但mymodule没有显示在模块列表中,我做了一些以下事情。

1。)在prestashop根目录的modules目录中有mymodcomments / mymodcomments.php。  这里的代码是

<?php

class MyModComments extends Module
{
    public function __construct()
    {
        $this->name = 'mymodcomments';
        $this->tab = 'front_office_features';
        $this->version = '0.1';
        $this->author = 'coold';
        $this->bootstrap = true;
        parent::__construct();
        $this->displayName = $this->l('My Module of product comments');
        $this->description = $this->l('With this module, your customers will be able to grade and comments your products.');
    }
}

?>

我清楚地理解了这段代码,但在后台的模块列表中看不到我的模块。

我的另一个问题是: 我正在使用Windows,使用prestashop时是否有任何文件权限?

1 个答案:

答案 0 :(得分:0)

当模块类和模块名称使用不同的大写或小写时,有时会出现问题。

尝试定义:

class mymodcomments extends Module
{
    public function __construct()
    {
        $this->name = 'mymodcomments';
        $this->tab = 'front_office_features';
        $this->version = '0.1';
        $this->author = 'coold';
        $this->bootstrap = true;
        parent::__construct();
        $this->displayName = $this->l('My Module of product comments');
        $this->description = $this->l('With this module, ....');
    }
}

它不优雅但可以做到这一点。

关于大写字母问题,prestashop上没有报道。 95%的安装工作正常但由于未知原因,一些prestashop安装可能会因这些差异而面临问题。

此致

相关问题