Blame view

frontend/views/order/index.php 1.96 KB
8072159c   Alex Savenko   create proj
1
2
3
4
5
6
7
8
9
10
11
  <?php
  
  use frontend\widgets\Seo;
  use yii\helpers\Html;
  use yii\helpers\Url;
  use common\models\Basket;
  use common\modules\product\models\ProductVariant;
  use yii\web\View;
  $this->title = "Корзина";
  $this->params[ 'seo' ][ Seo::H1] =  $this->title ;
  $this->params[ 'seo' ][ Seo::TITLE] = $this->title;
993186ae   Alex Savenko   remarketing
12
  
8072159c   Alex Savenko   create proj
13
14
15
16
17
  /**
   * @var View             $this
   * @var ProductVariant[] $models
   * @var Basket           $basket
   */
8077c808   Alex Savenko   remarketing
18
  $this->params['remarketing']['type'] = 'conversion';
9ffc1f1c   Alex Savenko   remarketing
19
20
  if (count($models) > 1) {
      foreach ($models as $model) {
468bbe6e   Alex Savenko   remarketing
21
          $this->params['remarketing']['id'][] = $model->product_variant_id;
9ffc1f1c   Alex Savenko   remarketing
22
23
          $this->params['remarketing']['price'][] = $model->price;
      }
a9a77ea3   Alex Savenko   remarketing
24
  } elseif(!empty($models)) {
468bbe6e   Alex Savenko   remarketing
25
      $this->params['remarketing']['id'] = $models[0]->product_variant_id;
f5db1e88   Alex Savenko   remarketing
26
      $this->params['remarketing']['price'] = $models[0]->price;
a9a77ea3   Alex Savenko   remarketing
27
28
29
  } else {
      $this->params['remarketing']['id'] = '';
      $this->params['remarketing']['price'] = '';
9ffc1f1c   Alex Savenko   remarketing
30
31
  }
  
8072159c   Alex Savenko   create proj
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  ?>
  <?php if ($flash = Yii::$app->session->getFlash ('success')): ?>
      <div class="alert-success"><?= $flash ?></div>
  <?php endif; ?>
  <?php if ($flash = Yii::$app->session->getFlash ('error')): ?>
      <div class="alert-error"><?= $flash ?></div>
  <?php endif; ?>
  <div class="container">
  
      <h1>Корзина</h1>
  
  </div>
  <div class="block-100">
  
      <div class="container">
  
          <div class="block-25">
              <div class="catalogueLeft orderLeftPanel">
  
  
                  <div class="columnLeftInfo">
                      <!-- del_columnLeftInfo -->
  
                      <!-- del_columnLeftInfo_end -->
                  </div>
  
  
              </div>
          </div>
  
          <div class="block-75">
  
              <div class="ordering_tbl">
  
  
                      <div id="ordersFrom"  class="orderBox">
  
                          <?= $this->render('_order_form',[
                              'models'=>$models,
                              'basket'=>$basket
                          ])?>
  
                      </div>
  
              </div>
  
          </div>
      </div>
  </div>