diff --git a/common/models/Event.php b/common/models/Event.php index 11a12f7..9b052e5 100755 --- a/common/models/Event.php +++ b/common/models/Event.php @@ -145,7 +145,7 @@ class Event extends \yii\db\ActiveRecord } public static function getSaleEvents(){ - return ArrayHelper::toArray(self::find()->select('percent')->distinct('percent')->where('sale=true AND percent IS NOT NULL')->all()); + return ArrayHelper::toArray(self::find()->select('percent')->distinct('percent')->where('sale=true AND percent IS NOT NULL')->orderBy('percent')->all()); } diff --git a/common/modules/product/CatalogUrlManager.php b/common/modules/product/CatalogUrlManager.php index a396d97..fcfbdfe 100755 --- a/common/modules/product/CatalogUrlManager.php +++ b/common/modules/product/CatalogUrlManager.php @@ -168,7 +168,12 @@ class CatalogUrlManager implements UrlRuleInterface { // Filter if (strpos($paths[2], 'filters:') === 0) { - $this->parseFilter($paths[2], $params); + if(!isset($paths[3])){ + $this->parseFilter($paths[2], $params); + } else { + throw new HttpException(404 ,'Page not found'); + } + } else { -- libgit2 0.21.4