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,13 +12,6 @@ return [ | ||
12 | 'class' => 'yii\caching\MemCache', | 12 | 'class' => 'yii\caching\MemCache', |
13 | 'keyPrefix' => 'linija_' | 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 | 'sms' => [ | 15 | 'sms' => [ |
23 | 'class' => 'common\components\SmsSender', | 16 | 'class' => 'common\components\SmsSender', |
24 | ], | 17 | ], |
common/modules/product/models/Product.php
@@ -181,7 +181,7 @@ class Product extends \yii\db\ActiveRecord | @@ -181,7 +181,7 @@ class Product extends \yii\db\ActiveRecord | ||
181 | { | 181 | { |
182 | return $this->hasMany(ProductVariant::className(), ['product_id' => 'product_id']); | 182 | return $this->hasMany(ProductVariant::className(), ['product_id' => 'product_id']); |
183 | } | 183 | } |
184 | - | 184 | + |
185 | /** | 185 | /** |
186 | * @return \yii\db\ActiveQuery | 186 | * @return \yii\db\ActiveQuery |
187 | */ | 187 | */ |
common/modules/product/models/ProductSearch.php
@@ -108,9 +108,8 @@ class ProductSearch extends Product | @@ -108,9 +108,8 @@ class ProductSearch extends Product | ||
108 | } | 108 | } |
109 | 109 | ||
110 | public static function findByAlias($alias) { | 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 | if (($model = $query->one()) !== null) { | 113 | if (($model = $query->one()) !== null) { |
115 | return $model; | 114 | return $model; |
116 | } else { | 115 | } else { |