Blame view

common/modules/product/widgets/views/submenu.php 2.68 KB
8df80521   Alexander Karnovsky   not fixed commite
1
  <div class="menu_item">
b519af22   Karnovsky A   Base-product func...
2
      <?= \yii\helpers\Html::a($rootCategory->name, ['catalog/category', 'alias' => $rootCategory->alias], ['class' => 'submenu_button '. $rootClass])?>
8df80521   Alexander Karnovsky   not fixed commite
3
4
5
6
7
8
9
      <div class="submenu">
          <ul class="categories">
              <li class="sub_cat"><span>Популярные категории</span>
                  <?php if(!empty($populary)) :?>
                      <div class="sub_cat_content">
                          <div class="content_items">
                              <?php foreach($populary as $_item) :?>
b519af22   Karnovsky A   Base-product func...
10
                                  <div class="content_item"><a href="<?= \yii\helpers\Url::to(['catalog/category', 'alias' => $_item->alias])?>">
b15fac82   Karnovsky A   No-photo for cate...
11
12
13
14
15
16
17
                                          <div valign="top" class="picture">
                                              <?php if (empty($_item->image)) :?>
                                              <img valign="top" src="/images/no_photo.png">
                                              <?php else :?>
                                              <img valign="top" src="<?= $_item->image?>">
                                              <?php endif?>
                                          </div>
8df80521   Alexander Karnovsky   not fixed commite
18
19
20
21
22
23
24
25
26
27
28
29
30
31
                                          <div class="title"><?= $_item->name?></div>
                                      </a></div>
                              <?php endforeach?>
                          </div>
                      </div>
                  <?php endif?>
              </li>
          <?php foreach($items as $item) :?>
              <li class="sub_cat">
                  <span><?= $item['item']->name?></span>
                  <?php if(!empty($item['children'])) :?>
                  <div class="sub_cat_content">
                      <div class="content_items">
                          <?php foreach($item['children'] as $_item) :?>
b519af22   Karnovsky A   Base-product func...
32
                          <div class="content_item"><a href="<?= \yii\helpers\Url::to(['/catalog/category', 'alias' => $_item['item']->alias])?>">
b15fac82   Karnovsky A   No-photo for cate...
33
34
35
36
37
38
39
                              <div valign="top" class="picture">
                                  <?php if (empty($_item['item']->image)) :?>
                                      <img valign="top" src="/images/no_photo.png">
                                  <?php else :?>
                                      <img valign="top" src="<?= $_item['item']->image?>" alt="<?= $_item['item']->name?>">
                                  <?php endif?>
                              </div>
8df80521   Alexander Karnovsky   not fixed commite
40
41
42
43
44
45
46
47
48
49
50
                              <div class="title"><?= $_item['item']->name?></div>
                          </a></div>
                          <?php endforeach?>
                      </div>
                  </div>
                  <?php endif?>
              </li>
          <?php endforeach?>
          </ul>
      </div>
  </div>