diff --git a/models/Order.php b/models/Order.php index 3ed154f..8a27ba0 100755 --- a/models/Order.php +++ b/models/Order.php @@ -2,6 +2,7 @@ namespace artweb\artbox\ecommerce\models; use artweb\artbox\models\Customer; + use common\behaviors\DefaultLabelBehavior; use common\models\User; use Yii; use yii\behaviors\TimestampBehavior; @@ -94,6 +95,9 @@ [ 'class' => TimestampBehavior::className(), ], + [ + 'class' => DefaultLabelBehavior::className(), + ], ]; } @@ -294,13 +298,12 @@ public function isBlocked() { - if ($this->edit_id === 0 ) { - return false; + if ($this->edit_id === 0) { + return false; } else { - if ( $this->edit_time + 7200 > time()) { + if ($this->edit_time + 7200 > time()) { return true; - } - else { + } else { return false; } } diff --git a/views/order/update.php b/views/order/update.php index 4f59f94..a1dcb80 100755 --- a/views/order/update.php +++ b/views/order/update.php @@ -25,7 +25,11 @@ $.ajax({ id: ' . $model->id . ' }, success: function() { - console.log("Ura"); + $.notify({ + message: \'Hello World\' + },{ + type: \'danger\' + }); } });'; -- libgit2 0.21.4