Skip to content

Commit

Permalink
ENGCOM-7144: #26708 Fix: ORDER BY has two similar conditions in the S…
Browse files Browse the repository at this point in the history
…QL query #27263

 - Merge Pull Request #27263 from vasilii-b/magento2:26708-order-by-sql-select-duplicated
 - Merged commits:
   1. 1e1ebd3
   2. df35dda
   3. b816334
   4. a61d92a
  • Loading branch information
magento-engcom-team committed Mar 19, 2020
2 parents bf03292 + a61d92a commit ac524c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/Block/Product/ListProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ public function getIdentities()
}

foreach ($this->_getProductCollection() as $item) {
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
$identities = array_merge($identities, $item->getIdentities());
}

Expand Down Expand Up @@ -475,8 +476,6 @@ private function initializeProductCollection()
$layer->setCurrentCategory($origCategory);
}

$this->addToolbarBlock($collection);

$this->_eventManager->dispatch(
'catalog_block_product_list_collection',
['collection' => $collection]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ public function testGetIdentities()
->method('getProductCollection')
->will($this->returnValue($this->prodCollectionMock));

$this->layoutMock->expects($this->once())
->method('getBlock')
->will($this->returnValue($this->toolbarMock));

$this->assertEquals(
[$categoryTag, $productTag],
$this->block->getIdentities()
Expand Down

0 comments on commit ac524c4

Please sign in to comment.