Commit e8e6b858ca1721ffd06cdb9d0add86a8d4cb345f
1 parent
17cc59ed
20.07.16
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
common/modules/product/helpers/ProductHelper.php
... | ... | @@ -99,7 +99,7 @@ class ProductHelper extends Object { |
99 | 99 | $data = ['akciya' => true]; |
100 | 100 | break; |
101 | 101 | } |
102 | - return Product::find()->joinWith('variants')->where($data)->andWhere(['!=', ProductVariant::tableName() .'.stock', 0])/*->orderBy($sort)*/->all(); | |
102 | + return Product::find()->joinWith('variants')->where($data)->andWhere(['!=', ProductVariant::tableName() .'.stock', 0])->limit($count)/*->orderBy($sort)*/->all(); | |
103 | 103 | } |
104 | 104 | |
105 | 105 | public static function getSimilarProducts($product, $count = 10) { | ... | ... |
common/modules/product/widgets/specialProducts.php