diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php index 0e736d7dc..0858f51d8 100755 --- a/packages/Webkul/Product/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php @@ -198,7 +198,8 @@ class ProductRepository extends Repository } if($params['brand']){ - $qb->whereIn('product_flat.brand_id',explode(',',$params['brand'])); + $qb->leftJoin('products', 'products.id','=','product_flat.product_id') + ->whereIn('products.brand_id',explode(',',$params['brand'])); } if (! core()->getConfigData('catalog.products.homepage.out_of_stock_items')) {