/** * Adding item to wishlist * * @param Mage_Wishlist_Model_Item $item * @return Mage_Wishlist_Model_Wishlist */ public function addItem(Mage_Wishlist_Model_Item $item) { $item->setWishlist($this); if (!$item->getId()) { $this->getItemCollection()->addItem($item); Mage::dispatchEvent('wishlist_add_item', array('item' => $item)); } return $this; }