Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my wish list limited to one item?

Tags:

magento

Im using magento 1.9 and im having an issue with the wishlist, for some reason it will only let me have one item in my wishlist and when I goto add another item to the wishlist it replaces the item that was already in my wishlist, there is nothing in the configuration to limit the wishlist item im just a bit confused at why it would be doing this, any ideas ?

like image 733
MrJoshFisher Avatar asked Dec 05 '14 13:12

MrJoshFisher


3 Answers

Right!!, after hunting the web to try and find a solution I have found a solution, you have to edit the file 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));

this worked for me and im using magento 1.9.0.1

the source for this fix is here: http://www.magentocommerce.com/boards/viewthread/291225/

like image 92
MrJoshFisher Avatar answered Oct 28 '22 00:10

MrJoshFisher


This is an out of the box feature, you do not need to edit any core code to fix this. Correction: You don’t have to edit any code

I had the same issue and found it was from an improper import of products and that website availability was incorrectly set.

It seems that Magento added a website filter on the wishlist collection to prevent items not available in a website from appearing in a customer's wishlist. It also seems that items may not have a website value => which prevents wish list items from appearing (or just 1 item, the last one added).

How to fix it : 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.

You can now add your products to your wishlist and see all of them in your wishlist. This is the proper solution and does not remove functionality from your Magento webstore.

like image 39
Rob Avatar answered Oct 28 '22 01:10

Rob


Simply reindex everything in: System > Index management

like image 40
Jordi Avatar answered Oct 28 '22 01:10

Jordi