diff --git a/common/components/Request.php b/common/components/Request.php index 98a8adf..5b43edb 100755 --- a/common/components/Request.php +++ b/common/components/Request.php @@ -1,41 +1,30 @@ web, "", parent::getBaseUrl()) . $this->adminUrl; - - } - - - - public function resolvePathInfo() - - { - - if ($this->getUrl() === $this->adminUrl) { - - return ""; - - } else { - - return parent::resolvePathInfo(); - + + public $web; + + public $adminUrl; + + /** + * @inheritdoc + */ + public function getBaseUrl() + { + return str_replace($this->web, "", parent::getBaseUrl()) . $this->adminUrl; + } + + /** + * @inheritdoc + */ + public function resolvePathInfo() + { + if($this->getUrl() === $this->adminUrl) { + return ""; + } else { + return parent::resolvePathInfo(); + } } - - } - -} \ No newline at end of file + } \ No newline at end of file diff --git a/common/modules/product/models/ProductSearch.php b/common/modules/product/models/ProductSearch.php index e486460..43b4484 100755 --- a/common/modules/product/models/ProductSearch.php +++ b/common/modules/product/models/ProductSearch.php @@ -141,6 +141,8 @@ ], ]); + $this->load($params); + if(isset( $this->is_top )) { $query->andWhere([ 'is_top' => (bool) $this->is_top, diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 127e5e2..a3c0e71 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -78,12 +78,13 @@ { $categories = Category::find() ->where([ 'depth' => 0 ]) - ->joinWith('lang', true, 'INNER JOIN') + ->orderBy('category_id') + ->joinWith('lang') ->all(); $purposes = TaxGroup::find() ->where([ 'tax_group.tax_group_id' => 5, - 'level' => 0, + 'level' => 0, ]) ->joinWith('options.lang') ->one(); @@ -93,7 +94,7 @@ 3, 4, ], - 'status' => 1, + 'status' => 1, ]) ->joinWith('lang', true, 'INNER JOIN') ->all(); @@ -241,7 +242,10 @@ public function actionPage($id) { - $model = Page::find()->where(['page.id' => $id])->joinWith('lang', true, 'INNER JOIN')->one(); + $model = Page::find() + ->where([ 'page.id' => $id ]) + ->joinWith('lang', true, 'INNER JOIN') + ->one(); if(empty( $model )) { throw new NotFoundHttpException(); } -- libgit2 0.21.4