-
Notifications
You must be signed in to change notification settings - Fork 2
/
orderhooks.php
88 lines (69 loc) · 2.75 KB
/
orderhooks.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
class OrderHooks extends Module
{
public function __construct()
{
$this->name = 'orderhooks';
$this->version = '1.0.0';
$this->need_instance = 1;
parent::__construct();
$this->displayName = 'Order hooks';
}
public function install()
{
return parent::install() &&
$this->registerHook('displayBackOfficeOrderActions') &&
$this->registerHook('displayAdminOrderContentOrder') &&
$this->registerHook('displayAdminOrderTabOrder') &&
$this->registerHook('displayAdminOrderTabShip') &&
$this->registerHook('displayAdminOrderContentShip') &&
$this->registerHook('displayAdminOrderRight') &&
$this->registerHook('displayAdminOrderLeft') &&
$this->registerHook('displayAdminOrder')
;
}
public function hookDisplayBackOfficeOrderActions(array $params)
{
$this->context->smarty->assign([
'order_id' => $params['id_order'],
]);
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayBackOfficeOrderActions.tpl');
}
public function hookDisplayAdminOrder(array $params)
{
$this->context->smarty->assign([
'order_id' => $params['id_order'],
]);
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrder.tpl');
}
public function hookDisplayAdminOrderLeft(array $params)
{
$this->context->smarty->assign([
'order_id' => $params['id_order'],
]);
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrderLeft.tpl');
}
public function hookDisplayAdminOrderRight(array $params)
{
$this->context->smarty->assign([
'order_id' => $params['id_order'],
]);
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrderRight.tpl');
}
public function hookDisplayAdminOrderTabShip(array $params)
{
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrderTabShip.tpl');
}
public function hookDisplayAdminOrderContentShip(array $params)
{
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrderContentShip.tpl');
}
public function hookDisplayAdminOrderTabOrder(array $params)
{
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrderTabOrder.tpl');
}
public function hookDisplayAdminOrderContentOrder(array $params)
{
return $this->context->smarty->fetch($this->getLocalPath().'views/templates/displayAdminOrderContentOrder.tpl');
}
}