Skip to content

Commit 4c07379

Browse files
author
Oleksandr Iegorov
committed
MC-42811: Missing Bundled Products on Category Pages
1 parent 9a6ad60 commit 4c07379

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/code/Magento/Elasticsearch/Model/Indexer/IndexerHandler.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,13 @@ private function updateCacheContext(array $docs) : void
145145
{
146146
$categoryIds = [];
147147
foreach ($docs as $document) {
148-
if (!empty($document['category_ids']) && is_array($document['category_ids'])) {
149-
foreach ($document['category_ids'] as $id) {
150-
$categoryIds[] = $id;
148+
if (!empty($document['category_ids'])) {
149+
if (is_array($document['category_ids'])) {
150+
foreach ($document['category_ids'] as $id) {
151+
$categoryIds[] = $id;
152+
}
153+
} else {
154+
$categoryIds[] = $document['category_ids'];
151155
}
152156
}
153157
}

0 commit comments

Comments
 (0)