在Prestashop中获取模块版本

时间:2018-09-11 09:58:54

标签: prestashop

我的Prestashop中安装了一个模块,我想获取其版本

如何在我的代码中执行此操作?

enter image description here

例如,我想获取“ v5.0.1”

感谢您的帮助!

2 个答案:

答案 0 :(得分:2)

$module = Module::getInstanceByName('bienvenue');
$version = $module->version;

答案 1 :(得分:1)

版本是在模块文件中这样设置的:

public function __construct()
{
    $this->name = 'bienvenue';
    $this->version = '5.0.1';

    parent::__construct();

    /* Else code... */
}
相关问题