change visibility parameter in category loop

This commit is contained in:
Manuel Raynaud
2013-10-25 12:23:50 +02:00
parent 7cc73b7d4c
commit 8196349ceb

View File

@@ -128,8 +128,9 @@ class Category extends BaseI18nLoop
$search->filterById($exclude, Criteria::NOT_IN);
}
if ($this->getVisible() != BooleanOrBothType::ANY)
$search->filterByVisible($this->getVisible() ? 1 : 0);
$visible = $this->getVisible();
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
$product = $this->getProduct();