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?

  • It's fresh installation? – Sohel Rana Apr 2 '19 at 17:29
  • it's not fresh but I didn't change wishlist module – Smita Kagwade Apr 3 '19 at 7:23
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, privacy policy and cookie policy

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