-
Notifications
You must be signed in to change notification settings - Fork 0
/
addFieldBO.php
50 lines (41 loc) · 1.44 KB
/
addFieldBO.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
class addFieldBO extends Module
{
public function __construct()
{
$this->name = 'addFieldBO';
$this->tab = 'administration';
$this->version = '1.0';
$this->author = 'Steven Hermitte';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.6');
// $this->dependencies = array('blockcart');
parent::__construct();
$this->displayName = $this->l('Add Field For Back Office');
$this->description = $this->l('This module add field for your customer in your Back Office');
$this->confirmUninstall = $this->l('Are you sure you want to uninstall this module ?');
}
public function install()
{
//Execute sql
include(dirname(__FILE__) . '/sql/datasql.php');
foreach ($sql as $s)
if (!Db::getInstance()->execute($s))
return false;
//Install Module
return parent::install() &&
$this->registerHook('displayAdminCustomer') &&
Configuration::updateValue('ADDFIELDBO_CONF', 'ok');
}
public function uninstall()
{
//Uninstall SQL
include(dirname(__FILE__) . '/sql/uninstall.php');
foreach ($sql as $s)
if (!Db::getInstance()->execute($s))
return false;
//Uninstall Module
return parent::uninstall() && Configuration::deleteByName('ADDFIELDBO_CONF');
}
}
?>