We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b47cb1f commit 2b06a48Copy full SHA for 2b06a48
app/code/Magento/Catalog/Block/Product/ListProduct.php
@@ -84,7 +84,7 @@ public function __construct(
84
}
85
86
/**
87
- * Retrieve loaded category collection
+ * Retrieve loaded product collection
88
*
89
* The goal of this method is to choose whether the existing collection should be returned
90
* or a new one should be initialized.
@@ -357,7 +357,7 @@ private function initializeProductCollection()
357
// if the product is associated with any category
358
if ($categories->count()) {
359
// show products from this category
360
- $this->setCategoryId(current($categories->getIterator()));
+ $this->setCategoryId(current($categories->getIterator())->getId());
361
362
363
0 commit comments