Commit e8e6b858ca1721ffd06cdb9d0add86a8d4cb345f

Authored by Administrator
1 parent 17cc59ed

20.07.16

common/modules/product/helpers/ProductHelper.php
@@ -99,7 +99,7 @@ class ProductHelper extends Object { @@ -99,7 +99,7 @@ class ProductHelper extends Object {
99 $data = ['akciya' => true]; 99 $data = ['akciya' => true];
100 break; 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 public static function getSimilarProducts($product, $count = 10) { 105 public static function getSimilarProducts($product, $count = 10) {
common/modules/product/widgets/specialProducts.php
@@ -10,7 +10,7 @@ use Yii; @@ -10,7 +10,7 @@ use Yii;
10 class specialProducts extends Widget { 10 class specialProducts extends Widget {
11 public $type = 'top'; 11 public $type = 'top';
12 12
13 - public $count = 4; 13 + public $count = 8;
14 14
15 public $sort = 'default'; 15 public $sort = 'default';
16 16