Issue #1239
This commit is contained in:
parent
9ba2357d7c
commit
508bf188ce
|
|
@ -2,11 +2,14 @@
|
|||
|
||||
@inject ('productFlatRepository', 'Webkul\Product\Repositories\ProductFlatRepository')
|
||||
|
||||
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
|
||||
|
||||
<?php
|
||||
$filterAttributes = [];
|
||||
$products = $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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue