Commit a509da1c27fdf2e9dc12f2f6c7694db3a74635bb

Authored by Yarik
1 parent fc66ded4

Artbox epic performance fix

common/config/main.php
1 1 <?php
2 2 use artbox\catalog\helpers\FilterHelper;
  3 + use artbox\core\components\AliasCache;
3 4 use artbox\core\components\SeoComponent;
4 5  
5 6 return [
... ... @@ -75,5 +76,8 @@
75 76 'useFilename' => true,
76 77 'absoluteUrl' => false,
77 78 ],
  79 + 'aliasCache' => [
  80 + 'class' => AliasCache::className(),
  81 + ],
78 82 ],
79 83 ];
... ...
common/config/settings.php
... ... @@ -19,7 +19,7 @@
19 19 'google' => 'https://plus.google.com/+ArtwebUaAgency',
20 20 'twitter' => 'https://twitter.com/ArtWeb_ua',
21 21 'name' => 'Artweb',
22   - 'logo' => '11',
  22 + 'logo' => '',
23 23 'about' => 'Строим бизнес в онлайне',
24 24 'analytics_key' => '119240817',
25 25 'robots' => 'User-agent: Google
... ...
frontend/controllers/CategoryController.php
... ... @@ -93,14 +93,14 @@
93 93 */
94 94 $model = Category::findWithFilters($id)
95 95 ->with('lang.alias')
96   - ->with('categories.lang')
  96 + ->with('categories.lang.alias')
97 97 ->with(
98 98 [
99 99 'parent' => function ($query) {
100 100 /**
101 101 * @var ActiveQuery $query
102 102 */
103   - $query->with('lang', 'categories.lang');
  103 + $query->with('lang.alias', 'categories.lang.alias');
104 104 },
105 105 ]
106 106 )
... ...
frontend/views/category/view.php
... ... @@ -372,4 +372,4 @@ _________________________________________________________ --&gt;
372 372 </div>
373 373 <!-- /.container -->
374 374 </div>
375 375 -<!-- /#content -->
  376 +<!-- /#content -->
376 377 \ No newline at end of file
... ...
frontend/views/layouts/_category_menu.php
... ... @@ -8,7 +8,7 @@
8 8 * @var bool $isHome
9 9 */
10 10 $categories = Category::find()
11   - ->with('categories.lang', 'lang')
  11 + ->with('categories.lang.alias', 'lang.alias')
12 12 ->where([ 'level' => 0 ])
13 13 ->all();
14 14 ?>
... ...