lasf fixes

This commit is contained in:
merdan 2022-04-20 15:40:08 +05:00
parent b94cc841de
commit ead3d74ba5
1 changed files with 2 additions and 2 deletions

View File

@ -494,7 +494,7 @@ class ProductRepository extends WProductRepository
public function getPopularProducts($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();
@ -513,7 +513,7 @@ class ProductRepository extends WProductRepository
->whereIn('product_categories.category_id', explode(',', $categoryId));
}
return $query->orderBy('product_flat.favoritesCount','desc');
})->paginate($count ? $count : 4);
})->paginate(10);
return $results;
}