Commit 2d913ccb2339ec5f1175dfde9a45e0900d53ef9a
1 parent
894d945a
-Product log fixes
Showing
2 changed files
with
10 additions
and
30 deletions
Show diff stats
components/OrderProductLogger.php
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | $log->order_id = $params['order_id']; |
| 44 | 44 | $log->data = Json::encode($data); |
| 45 | 45 | |
| 46 | - if (\Yii::$app->user instanceof User) { | |
| 46 | + if (\Yii::$app->user->identity instanceof User) { | |
| 47 | 47 | $log->user_id = (integer) \Yii::$app->user->identity->id; |
| 48 | 48 | } else { |
| 49 | 49 | $log->user_id = NULL; | ... | ... |
views/order/_log_product_item.php
| ... | ... | @@ -12,17 +12,11 @@ |
| 12 | 12 | use yii\helpers\Url; |
| 13 | 13 | |
| 14 | 14 | ?> |
| 15 | -<div class="box box-success"> | |
| 15 | +<div class="box box-success collapsed-box"> | |
| 16 | 16 | <div class="box-header with-border"> |
| 17 | - <h3 class="box-title">История товара <a href="<?= Url::to( | |
| 18 | - [ | |
| 19 | - '/ecommerce/variant/view', | |
| 20 | - 'product_id' => $model->productVariant->product->id, | |
| 21 | - 'id' => $model->productVariant->id, | |
| 22 | - ] | |
| 23 | - ) ?>" target="_blank" class="text-green"><?php echo $model->sku; ?></a></h3> | |
| 17 | + <h3 class="box-title">История товара <span class="text-green"><?php echo $model->sku; ?></span></h3> | |
| 24 | 18 | <div class="box-tools pull-right"> |
| 25 | - <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> | |
| 19 | + <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i> | |
| 26 | 20 | </button> |
| 27 | 21 | </div> |
| 28 | 22 | </div> |
| ... | ... | @@ -37,7 +31,8 @@ |
| 37 | 31 | echo Html::img( |
| 38 | 32 | $model->productVariant->imageUrl, |
| 39 | 33 | [ |
| 40 | - 'class' => 'img-thumbnail', | |
| 34 | + 'class' => 'img-thumbnail img-center', | |
| 35 | + 'width' => '50%', | |
| 41 | 36 | ] |
| 42 | 37 | ); |
| 43 | 38 | } |
| ... | ... | @@ -56,33 +51,18 @@ |
| 56 | 51 | </div> |
| 57 | 52 | <div class="box-footer no-padding"> |
| 58 | 53 | <ul class="nav nav-stacked"> |
| 59 | - <li><a target="_blank" href="<?= Url::to( | |
| 60 | - [ | |
| 61 | - '/ecommerce/manage/view', | |
| 62 | - 'id' => $model->productVariant->product->id, | |
| 63 | - ] | |
| 64 | - ) ?>">Название: <span class="text-orange pull-right"><?php echo StringHelper::truncate( | |
| 54 | + <li><a href="#" class="no-click">Название: <span class="text-orange pull-right"><?php echo StringHelper::truncate( | |
| 65 | 55 | $model->productVariant->product->lang->title, |
| 66 | 56 | 35, |
| 67 | 57 | '...' |
| 68 | 58 | ); ?></span></a></li> |
| 69 | - <li><a target="_blank" href="<?= Url::to( | |
| 70 | - [ | |
| 71 | - '/ecommerce/category/view', | |
| 72 | - 'id' => $model->productVariant->category->id, | |
| 73 | - ] | |
| 74 | - ) ?>">Категория: | |
| 59 | + <li><a href="#" class="no-click">Категория: | |
| 75 | 60 | <span class="pull-right text-orange"><?php echo $model->productVariant->category->lang->title; ?></span></a> |
| 76 | 61 | </li> |
| 77 | - <li><a target="_blank" href="<?= Url::to( | |
| 78 | - [ | |
| 79 | - '/ecommerce/brand/view', | |
| 80 | - 'id' => $model->productVariant->product->brand->id, | |
| 81 | - ] | |
| 82 | - ) ?>">Брэнд: | |
| 62 | + <li><a href="#" class="no-click">Брэнд: | |
| 83 | 63 | <span class="pull-right text-orange"><?php echo $model->productVariant->product->brand->lang->title; ?></span></a> |
| 84 | 64 | </li> |
| 85 | - <li><a target="_blank" href="#">Метки: | |
| 65 | + <li><a href="#" class="no-click">Метки: | |
| 86 | 66 | <?php |
| 87 | 67 | if ($model->productVariant->product->is_discount) { |
| 88 | 68 | echo Html::tag( | ... | ... |