bebeboutik/modules/labelgenerate/labelgenerate.php

47 lines
1.1 KiB
PHP
Raw Normal View History

2016-02-22 12:33:51 +01:00
<?php
if(!defined('_PS_VERSION_')) {
exit;
}
class LabelGenerate extends Module {
public $_html = '';
function __construct() {
$this->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();
}
}