Merge pull request #2522 from rahulshukla-webkul/development

filter issue in category
This commit is contained in:
Jitendra Singh 2020-02-20 16:43:42 +05:30 committed by GitHub
commit 42e4d88ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -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);

View File

@ -11,7 +11,9 @@
$products = $productRepository->getAll($category->id);
$filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products);
} else {
}
if (! count($filterAttributes) > 0) {
$filterAttributes = $attributeRepository->getFilterAttributes();
}

View File

@ -9,7 +9,9 @@
$products = $productRepository->getAll($category->id);
$filterAttributes = $productFlatRepository->getFilterableAttributes($category, $products);
} else {
}
if (! count($filterAttributes) > 0) {
$filterAttributes = $attributeRepository->getFilterAttributes();
}