e0906f08
Alexey Boroda
-Fixing existing ...
|
1
|
<?php
|
6f14188b
Alexey Boroda
-Product card fixed
|
2
|
/**
|
7520dc0e
Alexey Boroda
-Grid with input ...
|
3
4
5
|
* @var Order $model
* @var View $this
* @var ActiveDataProvider $dataProvider
|
6f14188b
Alexey Boroda
-Product card fixed
|
6
7
8
|
*/
use artweb\artbox\ecommerce\models\Order;
|
7520dc0e
Alexey Boroda
-Grid with input ...
|
9
|
use yii\data\ActiveDataProvider;
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
10
|
use yii\helpers\Html;
|
6f14188b
Alexey Boroda
-Product card fixed
|
11
|
use yii\web\View;
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
12
|
|
7520dc0e
Alexey Boroda
-Grid with input ...
|
13
|
$this->title = 'Заказ #' . $model->id;
|
db3040d3
Alexey Boroda
-Order module alm...
|
14
15
16
17
|
$this->params[ 'breadcrumbs' ][] = [
'url' => yii\helpers\Url::to([ '/ecommerce/order/index' ]),
'label' => \Yii::t('app', 'Заказы'),
];
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
18
|
$this->params[ 'breadcrumbs' ][] = $this->title;
|
d57c8c00
Alexey Boroda
-Blocking in process
|
19
20
21
22
23
24
25
26
|
$js = '
$.ajax({
type: "POST",
url: "/admin/ecommerce/order/block-order",
data: {
id: ' . $model->id . '
},
|
99de237f
Alexey Boroda
-Order block core...
|
27
|
success: function(data) {
|
b0c7d586
Alexey Boroda
-Bykov fixes
|
28
29
30
31
|
var message = data.time;
if (data.user != "") {
message += " " + data.user;
}
|
3bb55546
Alexey Boroda
-Fixing bugs
|
32
|
$.notify({
|
b0c7d586
Alexey Boroda
-Bykov fixes
|
33
|
message: message
|
3bb55546
Alexey Boroda
-Fixing bugs
|
34
|
},{
|
99de237f
Alexey Boroda
-Order block core...
|
35
|
type: "info"
|
3bb55546
Alexey Boroda
-Fixing bugs
|
36
|
});
|
d57c8c00
Alexey Boroda
-Blocking in process
|
37
38
39
40
41
|
}
});';
$this->registerJs($js, View::POS_READY);
|
b0c7d586
Alexey Boroda
-Bykov fixes
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
$js = '
window.onbeforeunload = function(e) {
$.ajax({
type: "GET",
url: "/admin/ecommerce/order/exit-order",
data: {
id: ' . $model->id . ',
},
success: function() {
console.log("Exit order");
}
});
};
';
$this->registerJs($js, View::POS_READY);
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
59
|
?>
|
6f14188b
Alexey Boroda
-Product card fixed
|
60
|
<div class="order-update">
|
db3040d3
Alexey Boroda
-Order module alm...
|
61
|
<div class="container"><h1><?php echo Html::encode($this->title) ?></h1></div>
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
62
|
|
6f14188b
Alexey Boroda
-Product card fixed
|
63
64
|
<?= $this->render(
'_form',
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
65
|
[
|
7520dc0e
Alexey Boroda
-Grid with input ...
|
66
67
|
'model' => $model,
'dataProvider' => $dataProvider,
|
e0906f08
Alexey Boroda
-Fixing existing ...
|
68
69
|
]
) ?>
|
6f14188b
Alexey Boroda
-Product card fixed
|
70
|
</div>
|