Working : Product : fix loop giving no elements
This commit is contained in:
@@ -175,11 +175,12 @@ class Product extends BaseI18nLoop
|
|||||||
|
|
||||||
if (!is_null($category) ||!is_null($categoryDefault)) {
|
if (!is_null($category) ||!is_null($categoryDefault)) {
|
||||||
|
|
||||||
|
$categories = array();
|
||||||
if (!is_null($category)) {
|
if (!is_null($category)) {
|
||||||
$categories = CategoryQuery::create()->filterById($category, Criteria::IN)->find();
|
$categories = array_merge($categories, CategoryQuery::create()->filterById($category, Criteria::IN)->find());
|
||||||
}
|
}
|
||||||
if (!is_null($categoryDefault)) {
|
if (!is_null($categoryDefault)) {
|
||||||
$categories = CategoryQuery::create()->filterById($categoryDefault, Criteria::IN)->find();
|
$categories = array_merge($categories, CategoryQuery::create()->filterById($categoryDefault, Criteria::IN)->find());
|
||||||
}
|
}
|
||||||
|
|
||||||
$depth = $this->getDepth();
|
$depth = $this->getDepth();
|
||||||
|
|||||||
Reference in New Issue
Block a user