Skip to content

Commit 4aadf36

Browse files
author
Mayank
committed
Product Repeat Isuue after filter on category listing page.Issue : #11139
1 parent 1e105b3 commit 4aadf36

File tree

1 file changed

+4
-1
lines changed
  • app/code/Magento/Catalog/Block/Product/ProductList

1 file changed

+4
-1
lines changed

app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ public function setCollection($collection)
193193
}
194194
if ($this->getCurrentOrder()) {
195195
if (($this->getCurrentOrder()) == 'position') {
196-
$this->_collection->addAttributeToSort($this->getCurrentOrder(), $this->getCurrentDirection())->addAttributeToSort('entity_id', $this->getCurrentDirection());
196+
$this->_collection->addAttributeToSort(
197+
$this->getCurrentOrder(),
198+
$this->getCurrentDirection()
199+
)->addAttributeToSort('entity_id', $this->getCurrentDirection());
197200
} else {
198201
$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
199202
}

0 commit comments

Comments
 (0)