Commit bc6c8271f18a818b98d970802aeddefea668551f

Authored by Administrator
1 parent 3523d488

big commti

common/modules/product/models/ProductQuery.php deleted
1   -<?php
2   -
3   -namespace common\modules\product\models;
4   -
5   -/**
6   - * This is the ActiveQuery class for [[Product]].
7   - *
8   - * @see Product
9   - */
10   -class ProductQuery extends \yii\db\ActiveQuery
11   -{
12   - /*public function active()
13   - {
14   - return $this->andWhere('[[status]]=1');
15   - }*/
16   -
17   - /**
18   - * @inheritdoc
19   - * @return Product[]|array
20   - */
21   - public function all($db = null)
22   - {
23   - return parent::all($db);
24   - }
25   -
26   - /**
27   - * @inheritdoc
28   - * @return Product|array|null
29   - */
30   - public function one($db = null)
31   - {
32   - return parent::one($db);
33   - }
34   -
35   - /**
36   - * Select category by alias
37   - * @param $slug
38   - * @return $this
39   - */
40   - public function byAlias($alias)
41   - {
42   - $this->andFilterWhere(['alias' => $alias]);
43   - return $this;
44   - }
45   -}
common/modules/product/models/ProductVariantQuery.php deleted
1   -<?php
2   -
3   -namespace common\modules\product\models;
4   -
5   -/**
6   - * This is the ActiveQuery class for [[ProductVariant]].
7   - *
8   - * @see ProductVariant
9   - */
10   -class ProductVariantQuery extends \yii\db\ActiveQuery
11   -{
12   - /*public function active()
13   - {
14   - return $this->andWhere('[[status]]=1');
15   - }*/
16   -
17   - /**
18   - * @inheritdoc
19   - * @return ProductVariant[]|array
20   - */
21   - public function all($db = null)
22   - {
23   - return parent::all($db);
24   - }
25   -
26   - /**
27   - * @inheritdoc
28   - * @return ProductVariant|array|null
29   - */
30   - public function one($db = null)
31   - {
32   - return parent::one($db);
33   - }
34   -}
frontend/controllers/CatalogController.php
... ... @@ -125,8 +125,10 @@ class CatalogController extends \yii\web\Controller
125 125 */
126 126 $query = $productProvider->query;
127 127 $query->with([
  128 + 'images',
128 129 'events',
129 130 'variant',
  131 + 'variant.image',
130 132 'comments',
131 133 'averageRating',
132 134 ]);
... ...