Blame view

frontend/views/catalog/view.php 2.29 KB
b89bd6a3   Alexey Boroda   26.09.16 filters ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  <?php
  /**
   * @var Product $product
   * @var ProductVariant $variant
   * @var View $this
   * @var ProductVariant[] $variants
   */
  use common\components\artboximage\ArtboxImageHelper;
  use common\modules\product\models\Product;
  use common\modules\product\models\ProductVariant;
  use yii\helpers\Html;
  use yii\helpers\Url;
  use yii\web\View;
  use yii\widgets\Pjax;
  
4556b430   Alexey Boroda   Changes:
16
  $this->title = $product->name;
b89bd6a3   Alexey Boroda   26.09.16 filters ...
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
  $this->params['breadcrumbs'][] = [
      'label' => $product->category->parent->parent->name,
      'url' => Url::to([
          'category/index',
          'id' => $product->category->parent->parent->category_id,
      ]),
  ];
  $this->params['breadcrumbs'][] = [
      'label' => $product->category->parent->name,
      'url' => Url::to([
          'category/brand',
          'id' => $product->category->parent->category_id,
      ]),
  ];
  $this->params['breadcrumbs'][] = [
      'label' => $product->category->name,
      'url' => Url::to([
          'category/collection',
          'id' => $product->category->category_id,
      ]),
  ];
  $this->params['breadcrumbs'][] = $this->title;
  
  ?>
  
  <?php Pjax::begin([
      'id' => 'pjax-reload',
      'timeout' => 5000,
  ]); ?>
  <div class="col-md-12">
      <div class="col-md-8 col-sm-12">
          <div class="pic">
              <?php
              echo ArtboxImageHelper::getImage($variant->getImageUrl(), 'product_main');
              ?>
          </div>
      </div>
      <div class="col-lg-3 col-md-4 col-sm-12 mat-opt-list">
          <div class="name1"><?php echo $product->name; ?></div>
          <div class="name2"><?php echo $product->category->name; ?></div>
          <div class="name3"><?php echo $product->category->parent->name; ?></div>
  
          <ul>
              <li><span>Артикул:</span> <?php echo $variant->sku; ?></li>
              <li><span>Размер:</span> 384 x 300 см</li>
              <li><span>Состав:</span> 100% шелк</li>
          </ul>
      </div>
  </div>
  <div class="col-md-12 mat_pics">
      <?php
      foreach ($variants as $oneVariant) {
          ?>
      <div class="col-md-2 col-sm-3 col-xs-4 mat_pic">
          <?php
          echo Html::a(ArtboxImageHelper::getImage($oneVariant->getImageUrl(), 'product_variant_main'), [
4556b430   Alexey Boroda   Changes:
73
74
75
              'catalog/product',
              'product' => $product->alias,
              'variant' => $oneVariant->sku,
b89bd6a3   Alexey Boroda   26.09.16 filters ...
76
77
78
79
80
81
          ]);
          ?>
      </div>
      <?php } ?>
  </div>
  <?php Pjax::end(); ?>