Commit c12ecba29d144725d0b95900136b5cf3602475ef
1 parent
5765cb7c
big commti
Showing
3 changed files
with
3 additions
and
11 deletions
Show diff stats
common/config/main.php
| ... | ... | @@ -12,13 +12,6 @@ return [ |
| 12 | 12 | 'class' => 'yii\caching\MemCache', |
| 13 | 13 | 'keyPrefix' => 'linija_' |
| 14 | 14 | ], |
| 15 | - 'assetManager' => [ | |
| 16 | - 'bundles' => [ | |
| 17 | - 'yii\web\JqueryAsset' =>[ | |
| 18 | - 'jsOptions' => ['position' => \yii\web\View::POS_HEAD] | |
| 19 | - ] | |
| 20 | - ], | |
| 21 | - ], | |
| 22 | 15 | 'sms' => [ |
| 23 | 16 | 'class' => 'common\components\SmsSender', |
| 24 | 17 | ], | ... | ... |
common/modules/product/models/Product.php
common/modules/product/models/ProductSearch.php
| ... | ... | @@ -108,9 +108,8 @@ class ProductSearch extends Product |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | public static function findByAlias($alias) { |
| 111 | - /** @var ProductQuery $query */ | |
| 112 | - $query = Product::find(); | |
| 113 | - $query->byAlias($alias); | |
| 111 | + | |
| 112 | + $query = Product::find()->where(["alias"=>$alias]); | |
| 114 | 113 | if (($model = $query->one()) !== null) { |
| 115 | 114 | return $model; |
| 116 | 115 | } else { | ... | ... |