1

I was wondering how some am I not able to have more than 1 item in my wishlist. Whenever I add a new one, the old one gets replaced. I am on magento 1.9.1

1
  • This is not default wishlist behavior. You probably have some customization in place or a third party module that causes this. Commented Jan 6, 2015 at 13:05

2 Answers 2

1

I am operating a 1.9.1 Magento build and came across the same issue, I found this post solved my problem, I hope it solves yours.

Rather than editing the app/code/core/Mage/Wishlist/Model/Wishlist.php directly. It is better to override it by creating an exact copy in app/code/local/Mage/Wishlist/Model/Wishlist.php - then make your changes.

0

I had the same problem and the below solution solved it.

Please note that the fix proposed by Chris Rogers works but isn't an optimized solution.

In app/code/core/Mage/Wishlist/Model/Wishlist.php find:

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));

As it is said: this is a work around and not a full solution. The problem is that the visibility filter doesn’t seem to work properly – and so this fix just removes the filter. The following should be considered :

  1. Items added to the wishlist from any store will show regardless of which store the customer is in.
  2. If an item’s visibility is set to not visible and the item has already been added to the wishlist then it will still appear "

(got it from http://thesarfarazlaghari.com/magento-wishlist-shows-online-1-product/ )

I found another solution on the web, which does not require to code and moreover does not need to remove any functionality from magento:

Simply select your store products on catalog page, select ‘Update Attributes’ action and click on submit. Select Websites panel and check your website in ‘Add Product To Websites’ block. Reindex your data if necessary.

( https://stackoverflow.com/a/40244935 )

The last one worked for me too. I'm on Magento 1.9.3.8 by the way.

2
  • Please include all code here on Magento SE. If the page you link to gets removed, then your answers is no longer useful.
    – 7ochem
    Commented Apr 26, 2018 at 8:37
  • Done, I also added a cleaner solution !
    – A D
    Commented Apr 26, 2018 at 8:54

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.