Merge pull request #2522 from rahulshukla-webkul/development
filter issue in category
This commit is contained in:
commit
42e4d88ff0
|
|
@ -73,7 +73,7 @@ class ProductFlatRepository extends Repository
|
|||
public function getFilterableAttributes($category, $products) {
|
||||
$filterAttributes = [];
|
||||
|
||||
if (count($category->filterableAttributes) > 0 && count($products)) {
|
||||
if (count($category->filterableAttributes) > 0 ) {
|
||||
$filterAttributes = $category->filterableAttributes;
|
||||
} else {
|
||||
$categoryProductAttributes = $this->getCategoryProductAttribute($category->id);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
$products = $productRepository->getAll($category->id);
|
||||
|
||||
$filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (! count($filterAttributes) > 0) {
|
||||
$filterAttributes = $attributeRepository->getFilterAttributes();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@
|
|||
$products = $productRepository->getAll($category->id);
|
||||
|
||||
$filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (! count($filterAttributes) > 0) {
|
||||
$filterAttributes = $attributeRepository->getFilterAttributes();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue