Skip to content

Commit afb1581

Browse files
author
Prabhu Ram
committed
Removing additional calls to the db.
1 parent 17ed57e commit afb1581

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

app/code/Magento/Catalog/Controller/Product/Compare/Clear.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function execute()
3131

3232
try {
3333
$items->clear();
34-
$items->removeCompareList($this->_customerSession->getCustomerId());
3534
$this->messageManager->addSuccessMessage(__('You cleared the comparison list.'));
3635
$this->_objectManager->get(\Magento\Catalog\Helper\Product\Compare::class)->calculate();
3736
} catch (\Magento\Framework\Exception\LocalizedException $e) {

app/code/Magento/Catalog/Controller/Product/Compare/Remove.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ public function execute()
5050
$helper = $this->_objectManager->get(\Magento\Catalog\Helper\Product\Compare::class);
5151
if ($item->getId()) {
5252
$item->delete();
53-
/** @var Collection $items */
54-
$items = $this->_itemCollectionFactory->create();
55-
$items->removeCompareList($this->_customerSession->getCustomerId());
5653
$productName = $this->_objectManager->get(\Magento\Framework\Escaper::class)
5754
->escapeHtml($product->getName());
5855
$this->messageManager->addSuccessMessage(

0 commit comments

Comments
 (0)