name = 'labelgenerate'; $this->tab = 'administration'; $this->version = '1.0'; $this->author = 'Antadis'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Label Generate'); $this->description = $this->l('Allows to generate label for products without EAN codes'); } function install() { # Add admin tabs $tabs_i18n = array( 'fr' => 'Génération Étiquette', 'en' => 'Label Generate', ); $t = new Tab(); $t->id_parent = (int) Tab::getIdFromClassName('AdminCatalog'); $st->position = (int) Tab::getNewLastPosition($st->id_parent); $t->active = TRUE; $t->module = 'labelgenerate'; $t->class_name = 'AdminLabelGenerate'; foreach(Language::getLanguages() as $lang) { if(isset($tabs_i18n[$lang['iso_code']])) { $t->name[$lang['id_lang']] = $tabs_i18n[$lang['iso_code']]; } else { $t->name[$lang['id_lang']] = $tabs_i18n['en']; } } $t->save(); return parent::install(); } }