From 4aadf36c90d0003a9c184ac9bc15f1311b90dc96 Mon Sep 17 00:00:00 2001 From: Mayank Date: Fri, 13 Oct 2017 15:47:03 +0530 Subject: [PATCH] Product Repeat Isuue after filter on category listing page.Issue : #11139 --- .../Magento/Catalog/Block/Product/ProductList/Toolbar.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php index c7dd1bfab7947..46080ab5c3330 100644 --- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php +++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php @@ -193,7 +193,10 @@ public function setCollection($collection) } if ($this->getCurrentOrder()) { if (($this->getCurrentOrder()) == 'position') { - $this->_collection->addAttributeToSort($this->getCurrentOrder(), $this->getCurrentDirection())->addAttributeToSort('entity_id', $this->getCurrentDirection()); + $this->_collection->addAttributeToSort( + $this->getCurrentOrder(), + $this->getCurrentDirection() + )->addAttributeToSort('entity_id', $this->getCurrentDirection()); } else { $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection()); }