diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php index e15147b98..300f033db 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/list/layered-navigation.blade.php @@ -2,11 +2,14 @@ @inject ('productFlatRepository', 'Webkul\Product\Repositories\ProductFlatRepository') +@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository') + getAll($category->id); if (isset($category)) { - if (count($category->filterableAttributes) > 0) { + if (count($category->filterableAttributes) > 0 && count($products)) { $filterAttributes = $category->filterableAttributes; } else { $categoryProductAttributes = $productFlatRepository->getCategoryProductAttribute($category->id);