name = 'sampledatainstall'; $this->tab = 'export'; $this->version = '1.1.2'; $this->author = 'Zemez'; $this->need_instance = 0; /** * Set $this->bootstrap to true if your module is compliant with bootstrap (PrestaShop 1.6) */ $this->bootstrap = true; parent::__construct(); $this->displayName = $this->trans('Sample Data Install'); $this->description = $this->l('Module for creating and installation of a sample data'); $this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_); $this->module_path = $this->local_path; $this->tabManager = new SampledatainstallTabManager(); } public function install() { return $this->tabManager->installTabs() && parent::install() && $this->registerHook('displayBackOfficeHeader'); } public function uninstall() { return parent::uninstall() && $this->tabManager->removeTab(); } public function getContent() {} public function sendPath() { return $this->local_path; } public function getWebPath() { return $this->_path; } public static function cmp($a, $b) { return strcmp($a['id_attribute_group'], $b['id_attribute_group']); } public function hookBackOfficeHeader() { if (Tools::getValue('module_name') == $this->name) { $this->context->controller->addJS($this->_path.'views/js/back.js'); $this->context->controller->addCSS($this->_path.'views/css/back.css'); } } }