Blame view

common/modules/product/widgets/views/product_smart.php 1.73 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
15
16
17
18
19
20
21
22
23
      <div class="boxitem">
          <div class="pixbox">
              <a href="<?= Url::to([
                  'catalog/product',
                  'product' => $product])
              ?>">
                  <?= \common\components\artboximage\ArtboxImageHelper::getImage($product->imageUrl, 'list')?>
              </a>
          </div>
          <a href="<?= Url::to([
              'catalog/product',
              'product' => $product])
          ?>" class="name"><?= $product->name ?>
          </a>
  
          <?php
  
          echo '<div class="cost-block">';
7aeecbdc   Виталий   Веталь
24
          echo '<p class="cost">';
dc2cd017   Karnovsky A   -
25
26
27
          // есть скидка
          if ($product->variant->price_old != 0 && $product->variant->price_old != $product->variant->price)
          {
7aeecbdc   Виталий   Веталь
28
              echo '<strike><span id=\'old_cost\'>'.$product->variant->price_old.'</span> грн.</strike>&nbsp;';
dc2cd017   Karnovsky A   -
29
30
          }
  
7aeecbdc   Виталий   Веталь
31
          echo $product->variant->price.' <span>грн.</span></p>';
dc2cd017   Karnovsky A   -
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  
          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
56
  </div>