Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Need to add products to wishlist programmatically
 
BrainWav
Jr. Member
 
Total Posts:  5
Joined:  2011-09-06
 

I’m working on importing data from an old platform to Magento (Community right now for testing, but we’ll be on Enterprise for launch).  I have a set of CSV files with users’ wishlist items, but I can’t figure out how to go about adding this to Magento’s wishlist.  I really just need to know how to get it setup to do it, I can figure out how to relate the data in my CSVs to Magento.

Something like Mage::getModel(’wishlist’), I guess.  I’m not sure where to even get started on this, and googling has turned up nothing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
TreInnova
Guru
 
Avatar
Total Posts:  465
Joined:  2009-02-20
Fano
 
BrainWav - 24 January 2013 08:01 AM

I’m working on importing data from an old platform to Magento (Community right now for testing, but we’ll be on Enterprise for launch).  I have a set of CSV files with users’ wishlist items, but I can’t figure out how to go about adding this to Magento’s wishlist.  I really just need to know how to get it setup to do it, I can figure out how to relate the data in my CSVs to Magento.

Something like Mage::getModel(’wishlist’), I guess.  I’m not sure where to even get started on this, and googling has turned up nothing.

Try to use Mage::getModel(’wishlist/wishlist’) .
Take a look here : app\code\core\Mage\Wishlist\Model\Wishlist.php
Regards,
Filippo.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BrainWav
Jr. Member
 
Total Posts:  5
Joined:  2011-09-06
 
TreInnova - 24 January 2013 01:39 PM

BrainWav - 24 January 2013 08:01 AM
I’m working on importing data from an old platform to Magento (Community right now for testing, but we’ll be on Enterprise for launch).  I have a set of CSV files with users’ wishlist items, but I can’t figure out how to go about adding this to Magento’s wishlist.  I really just need to know how to get it setup to do it, I can figure out how to relate the data in my CSVs to Magento.

Something like Mage::getModel(’wishlist’), I guess.  I’m not sure where to even get started on this, and googling has turned up nothing.

Try to use Mage::getModel(’wishlist/wishlist’) .
Take a look here : app\code\core\Mage\Wishlist\Model\Wishlist.php
Regards,
Filippo.

I think this has me on the right track.

 
Magento Community Magento Community
Magento Community
Magento Community
 
BrainWav
Jr. Member
 
Total Posts:  5
Joined:  2011-09-06
 

Ended up having to insert directly into the database.  I couldn’t figure out how to give Magento a buyRequest in the right format, so I had to just insert it.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top