Blame view

frontend/views/catalog/view.php 2.33 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
  $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,
  ]); ?>
bec7a98b   Eugeny Galkovskiy   123
46
  <div class="col-md-12 product">
b89bd6a3   Alexey Boroda   26.09.16 filters ...
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
      <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>
209ca557   Eugeny Galkovskiy   123
65
      <div style="clear:both;"></div>
b89bd6a3   Alexey Boroda   26.09.16 filters ...
66
67
68
69
70
71
72
73
  </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:
74
75
76
              'catalog/product',
              'product' => $product->alias,
              'variant' => $oneVariant->sku,
b89bd6a3   Alexey Boroda   26.09.16 filters ...
77
78
79
80
81
82
          ]);
          ?>
      </div>
      <?php } ?>
  </div>
  <?php Pjax::end(); ?>