Commit 3bb55546a01a9c31fb4eb2c69ceb47b58ebecc58
1 parent
b186d3bf
-Fixing bugs
Showing
2 changed files
with
13 additions
and
6 deletions
Show diff stats
models/Order.php
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | namespace artweb\artbox\ecommerce\models; |
3 | 3 | |
4 | 4 | use artweb\artbox\models\Customer; |
5 | + use common\behaviors\DefaultLabelBehavior; | |
5 | 6 | use common\models\User; |
6 | 7 | use Yii; |
7 | 8 | use yii\behaviors\TimestampBehavior; |
... | ... | @@ -94,6 +95,9 @@ |
94 | 95 | [ |
95 | 96 | 'class' => TimestampBehavior::className(), |
96 | 97 | ], |
98 | + [ | |
99 | + 'class' => DefaultLabelBehavior::className(), | |
100 | + ], | |
97 | 101 | ]; |
98 | 102 | } |
99 | 103 | |
... | ... | @@ -294,13 +298,12 @@ |
294 | 298 | |
295 | 299 | public function isBlocked() |
296 | 300 | { |
297 | - if ($this->edit_id === 0 ) { | |
298 | - return false; | |
301 | + if ($this->edit_id === 0) { | |
302 | + return false; | |
299 | 303 | } else { |
300 | - if ( $this->edit_time + 7200 > time()) { | |
304 | + if ($this->edit_time + 7200 > time()) { | |
301 | 305 | return true; |
302 | - } | |
303 | - else { | |
306 | + } else { | |
304 | 307 | return false; |
305 | 308 | } |
306 | 309 | } | ... | ... |
views/order/update.php