lasf fixes
This commit is contained in:
parent
b1237b6b1d
commit
a2a6bfe3e2
|
|
@ -468,7 +468,6 @@ class ProductRepository extends WProductRepository
|
|||
}
|
||||
|
||||
public function getDiscountedProducts($categoryId = null){
|
||||
$count = core()->getConfigData('catalog.products.homepage.no_of_new_product_homepage');
|
||||
|
||||
$results = app(ProductFlatRepository::class)->scopeQuery(function ($query) use ($categoryId) {
|
||||
$channel = core()->getRequestedChannelCode();
|
||||
|
|
@ -479,6 +478,8 @@ class ProductRepository extends WProductRepository
|
|||
->where('product_flat.status', 1)
|
||||
->where('product_flat.visible_individually', 1)
|
||||
->whereNotNull('product_flat.special_price')
|
||||
->where('products.type','simple')
|
||||
->leftJoin('products', 'products.id', '=', 'product_flat.product_id')
|
||||
->where('product_flat.special_price','>',0)
|
||||
->where('product_flat.channel', $channel)
|
||||
->where('product_flat.locale', $locale);
|
||||
|
|
@ -488,7 +489,7 @@ class ProductRepository extends WProductRepository
|
|||
->whereIn('product_categories.category_id', explode(',', $categoryId));
|
||||
}
|
||||
return $query->inRandomOrder();
|
||||
})->paginate($count ? $count : 4);
|
||||
})->paginate(10);
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
|
@ -496,7 +497,6 @@ class ProductRepository extends WProductRepository
|
|||
public function getPopularProducts($categoryId = null)
|
||||
{
|
||||
|
||||
|
||||
$results = app(ProductFlatRepository::class)->scopeQuery(function ($query) use ($categoryId) {
|
||||
$channel = core()->getRequestedChannelCode();
|
||||
$locale = core()->getRequestedLocaleCode();
|
||||
|
|
|
|||
Loading…
Reference in New Issue