diff --git a/common/modules/product/CatalogUrlManager.php b/common/modules/product/CatalogUrlManager.php index bcfa0b3..d95a9e9 100755 --- a/common/modules/product/CatalogUrlManager.php +++ b/common/modules/product/CatalogUrlManager.php @@ -156,7 +156,7 @@ class CatalogUrlManager implements UrlRuleInterface { // $brand_alias = is_object($params['brand']) ? $params['brand']->alias : strtolower($params['brand']); // } // $url = 'brands/'. $brand_alias .'/'; - +// // $this->setFilterUrl($params, $url); // // if (!empty($params) && ($query = http_build_query($params)) !== '') { diff --git a/frontend/config/main.php b/frontend/config/main.php index 88a92f0..c1d19dd 100755 --- a/frontend/config/main.php +++ b/frontend/config/main.php @@ -136,7 +136,7 @@ return [ // 'products//-' => 'products/show', 'news/-' => 'news/show', 'brands' => 'catalog/brands', - 'brands/' => 'catalog/brand', + 'brands/' => 'catalog/brand', 'blog' => 'articles/index', 'blog/-' => 'articles/show', 'event' => 'event/index', diff --git a/frontend/controllers/BrendsController.php b/frontend/controllers/BrendsController.php deleted file mode 100755 index 6e6c94d..0000000 --- a/frontend/controllers/BrendsController.php +++ /dev/null @@ -1,47 +0,0 @@ -where(['translit'=>$_GET['translit']])->one()) - throw new HttpException(404, 'Данной странице не существует!'); - - $query = Products::find()->where('brend_id=:brend_id',[':brend_id' => $brend->id])->with(['catalog'])->innerJoinWith(['cost']); - $countQuery = clone $query; - $pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize'=>18]); - $pages->forcePageParam = false; - $pages->pageSizeParam = false; - $products = $query->offset($pages->offset) - ->limit($pages->limit) - ->all(); - - return $this->render('show', [ - 'brend'=>$brend, - 'products'=>$products, - 'pages'=>$pages, - ]); - } - - public function actionIndex() - { - - $brends = Brends::find()->orderBy('sort ASC')->all(); - - return $this->render('index', [ - 'brends'=>$brends, - ]); - } - -} \ No newline at end of file diff --git a/frontend/views/brends/index.php b/frontend/views/brends/index.php deleted file mode 100755 index 643cc33..0000000 --- a/frontend/views/brends/index.php +++ /dev/null @@ -1,40 +0,0 @@ -title = 'Бренды'; -$this->registerMetaTag(['name' => 'description', 'content' => 'Бренды']); -$this->registerMetaTag(['name' => 'keywords', 'content' => 'Бренды']); - -$this->params['breadcrumbs'][] = ['label'=>'Бренды','url'=>['/brends/index']]; -?> - - - - -
- -

Бренды

- -
    - -
  • - - -
    - name?> - - -
  • -
    -
- -
diff --git a/frontend/views/brends/show.php b/frontend/views/brends/show.php deleted file mode 100755 index d3ce6d5..0000000 --- a/frontend/views/brends/show.php +++ /dev/null @@ -1,51 +0,0 @@ -title = $brend->name; - $this->params['seo']['fields']['name'] = $brend->name; - $this->registerMetaTag (['name' => 'description', 'content' => $brend->name]); - $this->registerMetaTag (['name' => 'keywords', 'content' => $brend->name]); - $this->params['breadcrumbs'][] = ['label' => 'Бренды', 'url' => ['/brends/index']]; - $this->params['breadcrumbs'][] = ['label' => $brend->name]; - -?> - - - - -
-
-

name ?>

- -
- -
    - - -
  • - render ('/products/_product', ['item' => $item, 'num' => 3]) ?> -
  • - - -
-
-
- - $pages, - 'registerLinkTags' => true, - ]); ?> - - -
-
\ No newline at end of file -- libgit2 0.21.4