Blame view

widgets/views/submenu.php 2.11 KB
2f25da09   Yarik   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  <?php

      /**

       * @var Category $rootCategory

       * @var string   $rootClass

       */

      use artweb\artbox\ecommerce\models\Category;

  

  ?>

  <div class="menu_item">

      <?= \yii\helpers\Html::a($rootCategory->lang->title, [

          'catalog/category',

          'category' => $rootCategory,

      ], [ 'class' => 'submenu_button ' . $rootClass ]) ?>

      <div class="submenu">

          <ul class="categories">

              <?php foreach($items as $item) : ?>

                  <li class="sub_cat">

                      <span><?= $item[ 'item' ]->title ?></span>

                      <?php if(!empty( $item[ 'children' ] )) : ?>

                          <div class="sub_cat_content">

                              <div class="content_items">

                                  <?php foreach($item[ 'children' ] as $_item) : ?>

                                      <div class="content_item"><a href="<?= \yii\helpers\Url::to([

                                              'catalog/category',

                                              'category' => $_item[ 'item' ],

                                          ]) ?>">

                                              <div class="picture">

                                                  <?php if(empty( $_item[ 'item' ]->image )) : ?>

                                                      <img src="/images/no_photo.png">

                                                  <?php else : ?>

8a7e6ecf   Yarik   Namespaces
31
                                                      <?= $_item[ 'item' ]->imageUrl ? \artweb\artbox\ecommerce\components\artboximage\ArtboxImageHelper::getImage($_item[ 'item' ]->imageUrl, 'mainmenu') : '' ?>

2f25da09   Yarik   first commit
32
33
34
35
36
37
38
39
40
41
42
43
44
                                                  <?php endif ?>

                                              </div>

                                              <div class="title"><?= $_item[ 'item' ]->title ?></div>

                                          </a></div>

                                  <?php endforeach ?>

                              </div>

                          </div>

                      <?php endif ?>

                  </li>

              <?php endforeach ?>

          </ul>

      </div>

  </div>