Blame view

frontend/views/account/order.php 5.09 KB
fa8dafba   Alexey Boroda   -User's password ...
1
2
3
4
  <?php
      
      use artbox\core\helpers\ImageHelper;
      use artbox\order\models\Order;
9537a122   Alexey Boroda   -Some bug fixes
5
      use yii\helpers\Url;
fa8dafba   Alexey Boroda   -User's password ...
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
      use yii\web\View;
      
      /**
       * @var View  $this
       * @var Order $order
       */
      
      $this->params[ 'breadcrumbs' ][] = [
          'label' => \Yii::t('app', 'Заказы'),
          'url'   => [
              'account/index',
          ],
      ];
      $this->params[ 'breadcrumbs' ][] = \Yii::t('app', 'Заказ') . ' № ' . $order->id;
  
  ?>
  
  <div id="content">
    <div class="container">
      
      <div class="row">
        
        <!-- *** LEFT COLUMN ***
  _________________________________________________________ -->
        
        <div class="col-md-9 clearfix" id="customer-order">
          
46c5cef5   Eugeny Galkovskiy   Переводы
33
          <p class="lead">Заказ №<?= $order->id ?> был перемещён на <strong><?= date(
fa8dafba   Alexey Boroda   -User's password ...
34
35
36
37
                      'd.m.Y',
                      $order->created_at
                  ) ?></strong><?php
                  if (!empty($order->label)) {
46c5cef5   Eugeny Galkovskiy   Переводы
38
                      ?> и в данный момент
fa8dafba   Alexey Boroda   -User's password ...
39
                    <strong><?= $order->label->lang->title ?></strong>.<?php } ?></p>
46c5cef5   Eugeny Galkovskiy   Переводы
40
          <p class="lead text-muted">Если у вас есть вопросы, пожалуйста,
9537a122   Alexey Boroda   -Some bug fixes
41
42
            <a target="_blank" href="<?= Url::to(
                [ 'site/contact' ]
46c5cef5   Eugeny Galkovskiy   Переводы
43
            ) ?>">напишите нам</a>.</p>
fa8dafba   Alexey Boroda   -User's password ...
44
45
46
47
48
49
          
          <div class="box">
            <div class="table-responsive">
              <table class="table">
                <thead>
                  <tr>
46c5cef5   Eugeny Galkovskiy   Переводы
50
51
52
53
                    <th colspan="2">Товар</th>
                    <th>Количество</th>
                    <th>Цена за единицу</th>
                    <th>Всего</th>
fa8dafba   Alexey Boroda   -User's password ...
54
55
56
57
58
59
60
61
62
63
                  </tr>
                </thead>
                <tbody>
                    <?php
                        $total = 0;
                        foreach ($order->orderProducts as $product) {
                            $total += $product->price * $product->count;
                            ?>
                          <tr>
                            <td>
9537a122   Alexey Boroda   -Some bug fixes
64
65
66
67
68
69
                              <a target="_blank" href="<?= Url::to(
                                  [
                                      'product/view',
                                      'id' => $product->variant->product->id,
                                  ]
                              ) ?>">
fa8dafba   Alexey Boroda   -User's password ...
70
71
72
73
74
75
76
77
78
79
80
81
                                  <?= ImageHelper::set(
                                      $product->variant ? $product->variant->product->image->getPath(
                                      ) : '@frontend/web/img/no-image.png'
                                  )
                                                 ->cropResize(50, 50)
                                                 ->renderImage(
                                                     [
                                                         'alt' => $product->variant->product->lang->title,
                                                     ]
                                                 ) ?>
                              </a>
                            </td>
9537a122   Alexey Boroda   -Some bug fixes
82
83
84
85
86
87
                            <td><a target="_blank" href="<?= Url::to(
                                    [
                                        'product/view',
                                        'id' => $product->variant->product->id,
                                    ]
                                ) ?>"><?= $product->variant->product->lang->title ?></a>
fa8dafba   Alexey Boroda   -User's password ...
88
89
90
91
92
93
94
95
96
                            </td>
                            <td><?= $product->count ?></td>
                            <td><?= $product->price ?></td>
                            <td><?= $product->count * $product->price ?></td>
                          </tr>
                        <?php } ?>
                </tbody>
                <tfoot>
                  <tr>
46c5cef5   Eugeny Galkovskiy   Переводы
97
                    <th colspan="4" class="text-right">Всего</th>
fa8dafba   Alexey Boroda   -User's password ...
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
                    <th><?= $total ?></th>
                  </tr>
                </tfoot>
              </table>
            
            </div>
            <!-- /.table-responsive -->
            
            <div class="row addresses">
              <div class="col-sm-6 col-sm-offset-6">
                <h3 class="text-uppercase"><?= \Yii::t('app', 'Информация') ?></h3>
                <p><?= $order->name ?>
                  <br><?= $order->phone ?>
                  <br><?= $order->city ?>
                  <br><?= $order->address ?>
                  <br><?= $order->payment->lang->title ?>
                  <br><?= $order->delivery->lang->title ?></p>
              </div>
            </div>
            <!-- /.addresses -->
          
          </div>
          <!-- /.box -->
        
        </div>
        <!-- /.col-md-9 -->
        
        <!-- *** LEFT COLUMN END *** -->
        
        <!-- *** RIGHT COLUMN ***
  _________________________________________________________ -->
        
        <div class="col-md-3">
          <!-- *** CUSTOMER MENU ***
  _________________________________________________________ -->
            <?= $this->render('_menu') ?>
          <!-- /.col-md-3 -->
          
          <!-- *** CUSTOMER MENU END *** -->
        </div>
        
        <!-- *** RIGHT COLUMN END *** -->
      
      </div>
      <!-- /.row -->
    
    
    </div>
    <!-- /.container -->
  </div>
  <!-- /#content -->