0

In my Magento store when I add a product into wishlist it will replace the old product and add a new one. I don't know why this is happening.

I have checked all core files in my project.

can anyone know the solution for this?

2
  • It's fresh installation?
    – Sohel Rana
    Apr 2, 2019 at 17:29
  • it's not fresh but I didn't change wishlist module Apr 3, 2019 at 7:23

1 Answer 1

0

I have found a solution, you have to override the file

app/code/core/Mage/Wishlist/Model/Wishlist.php

find function: public function getItemCollection()

and change

$this->_itemCollection =  Mage::getResourceModel('wishlist/item_collection')
                ->addWishlistFilter($this)
                ->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly))
                ->setVisibilityFilter();

to

$this->_itemCollection =  Mage::getResourceModel('wishlist/item_collection')
                ->addWishlistFilter($this)
                ->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly));

this worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.