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

Automatic product update (import from multiple systems)
 
Danker
Jr. Member
 
Total Posts:  29
Joined:  2008-05-17
 

I am not sure that this is right forum, but here I go:
I have another system which gives me XML file which has product information. I would like to extract data from it and insert (or update existing) that data into magento system. I was thinking about writing a data parser and then use internal mangento API to insert it. So the question is: How should I insert external data into magento system? Where I can find those API methods which insert or add products? Or maybe there is some other way to do that?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Did you look at dataflow? From the sound of your requirements, I would think that this could be accomplished. If you already have the xml feed, you could create a dataflow xml import with fields mapped to your xml file. Once setup, I would also think that you should be able to manage it via a cron job to automate the process a bit.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danker
Jr. Member
 
Total Posts:  29
Joined:  2008-05-17
 

Now I took a look… It sounds quite good. I could convert that XML into CSV and then map columns to specfic values… But could this update data instead of creating new? How should I access those cron jobs?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Dataflow should update old products and create new products provided that they have a unique sku. Also, dataflow can handle csv and xml, so there should be no need to convert. As for cron, provided you are on a *nix system, do a google search for “cron jobs” and you should be on your way to setting that up.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danker
Jr. Member
 
Total Posts:  29
Joined:  2008-05-17
 

I know about cron on unix. I was thinking that there is some integrated cron management in magento.

How I can import XML? Only thing I can see is MS Excel XML which I think isn’t same as specific format xml…

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Sorry...you’re right. The dataflow xml is ms excel based. Like you said, it’d probably be best then to convert to csv and map fields. As for cron integrated in magento, I don’t think that there’s an out of the box solution. I could be wrong though and please someone correct me if I am.  I know that in the admin menu under system-> configuration-> system there are settings for cron, but I’m not sure what they control.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Danker
Jr. Member
 
Total Posts:  29
Joined:  2008-05-17
 

So I though again about my problem and I have new questions....

With earlier mentioned dataflow I can import and update products. But I want to update products from multiple source and there will be same products among them. I would like to select from witch source to update according special rules (eg. like insert product from that source witch has lowest price). Is it possible to do with dataflow? I doubt that it is possible with dataflow....

I am considering writing my own product import module for magento. What parts of code I should take as reference? I already tried to look for that code that is responsible for inserting (updating) products into system but my search results are quite dull. Maybe someone could explain how product insertion in admin area and in dataflow way works?

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