I'm new to prestashop module development and I can't seem to make it work. I followed a tutorial step by step but when I install the module, I always get this "Mymodule (class missing in /modules/Mymodule/test-module.php)".
I checked on the net and it seems this error happens when the php file isn't encoded in UTF-8 without BOM, but even doing this doesn't work.
Here is my code, hope someone finds what's the issue :
<?php
if (!defined('_PS_VERSION_'))
exit;
class CookiesPresta extends Module {
public function __construct() {
$this->name = 'CookiesPresta';
$this->tab = 'front_office_features';
$this->version = '1.0';
$this->author = 'me myself';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.5');
$this->dependencies = array();
parent::__construct();
$this->displayName = $this->l('Bandeau Cookies');
$this->description = $this->l('Créez et personnalisez votre bandeau d\'information sur les cookies');
$this->confirmUninstall = $this->l('Voulez vous désinstaller le module Bandeau Cookies');
if (!Configuration::get('cookiespresta'))
$this->warning = $this->l('No name provided');
}
public function install() {
if (!parent::install()
|| !$this->registerHook('displayHeader')
|| !$this->registerHook('displayFooter')
)
return false;
return true;
}
public function uninstall() {
if(parent::uninstall())
return false;
return true;
}
}
?>