Blame view

common/modules/product/widgets/views/product_smart.php 2.33 KB
dc2cd017   Karnovsky A   -
1
2
3
4
  <?php
  /** @var \common\modules\product\models\Product $product */
  use yii\helpers\Url;
  ?>
a2ea902f   Administrator   image size
5
  <div class="item">
dc2cd017   Karnovsky A   -
6
7
8
9
10
11
12
13
14
      <div class="boxitem">
          <div class="pixbox">
              <a href="<?= Url::to([
                  'catalog/product',
                  'product' => $product])
              ?>">
                  <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'list')?>
              </a>
          </div>
ca5d1992   Виталий   Веталь
15
16
17
18
19
20
21
22
23
24
25
26
27
          <?php if(!empty($product->is_top) || !empty($product->is_new) || !empty($product->akciya)) :?>
              <ul class="product-special">
                  <?php if(!empty($product->is_top)) :?>
                      <li class="top"><div>top</div></li>
                  <?php endif?>
                  <?php if(!empty($product->is_new)) :?>
                      <li class="new"><div>new</div></li>
                  <?php endif?>
                  <?php if(!empty($product->akciya)) :?>
                      <li class="promo"><div>promo</div></li>
                  <?php endif?>
              </ul>
          <?php endif?>
dc2cd017   Karnovsky A   -
28
29
30
31
32
33
34
35
36
          <a href="<?= Url::to([
              'catalog/product',
              'product' => $product])
          ?>" class="name"><?= $product->name ?>
          </a>
  
          <?php
  
          echo '<div class="cost-block">';
7aeecbdc   Виталий   Веталь
37
          echo '<p class="cost">';
dc2cd017   Karnovsky A   -
38
39
40
          // есть скидка
          if ($product->variant->price_old != 0 && $product->variant->price_old != $product->variant->price)
          {
7aeecbdc   Виталий   Веталь
41
              echo '<strike><span id=\'old_cost\'>'.$product->variant->price_old.'</span> грн.</strike>&nbsp;';
dc2cd017   Karnovsky A   -
42
43
          }
  
7aeecbdc   Виталий   Веталь
44
          echo $product->variant->price.' <span>грн.</span></p>';
dc2cd017   Karnovsky A   -
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  
          echo '</div>';
  
          ?>
      </div>
      <a href="<?= Url::to([
          'catalog/product',
          'product' => $product])
      ?>" class="link_buy">Купить</a>
  
      <div class="mycarousel">
          <ul class="jcarousel jcarousel-skin-tango">
              <?php foreach ($product->variants as $variant) : ?>
              <li>
                  <a href="<?= Url::to([
                      'catalog/product',
                      'product' => $product,
                      '#' => 'm' . $variant->product_variant_id]) ?>">
                      <?= \common\components\artboximage\ArtboxImageHelper::getImage($variant->imageUrl, 'product_variant')?>
                  </a>
              </li>
              <?php endforeach; ?>
          </ul>
      </div>
a2ea902f   Administrator   image size
69
  </div>