Commit c12ecba29d144725d0b95900136b5cf3602475ef

Authored by Administrator
1 parent 5765cb7c

big commti

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
... ... @@ -181,7 +181,7 @@ class Product extends \yii\db\ActiveRecord
181 181 {
182 182 return $this->hasMany(ProductVariant::className(), ['product_id' => 'product_id']);
183 183 }
184   -
  184 +
185 185 /**
186 186 * @return \yii\db\ActiveQuery
187 187 */
... ...
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 {
... ...