Jump to content

Data feeds - xml to csv


Recommended Posts

Good morning,

 

PS 1.5.1.3

 

Does anyone have an idea how I can convert an XML data feed to a CSV so that I can import into my back office.

 

If anyone has done this or knows of a way I would be extremely grateful

 

Paul

Link to comment
Share on other sites

Depends on how the current xml feed is created. I think you can open it up in excel? Again depends on type, failing that you can always import it into a database then export it back out as a csv

 

if you want a fresh template use the attached to do by hand.

prestashop_product_feed_TEMPLATE.zip

Edited by cocothecat (see edit history)
Link to comment
Share on other sites

Good morning,

 

Thank you for the reply, I received the file via email and Open Office opened it and at the top of the file it says this:

 

This XML file does not appear to have any style information associated with it. The document tree is shown below.

 

<root>

 

 

<item>

<sku>13897</sku>

<weight>0.0680</weight>

<price>6.9900</price>

 

 

<url>

</url>

 

 

<name>

60ml The Third Generation E-liquid Smoke Oil for Electronic Cigarette - Camel Flavor

</name>

 

 

<category>

<parent_id>207</parent_id>

<parent_name>Gadgets</parent_name>

<category_id>1058</category_id>

<category_name>Electronic Cigarette</category_name>

</category>

 

 

<media>

 

 

<images>

</images>

 

 

<images>

</images>

</media>

 

 

<short_description>

 

 

<![CDATA[

<p><span style="font-size: small;"><span style="font-family: Arial;">This item is the third generation smoke oil which fits for all types of electronic cigarettes. It contains no nicotine and no harmful to healthy.</span></span></p>

]]>

</short_description>

 

 

<description>

 

 

<![CDATA[

<p><span style="font-size: small;"><span style="font-family: Arial;">Feature:<br /> * Third generation liquid smoke oil for electronic cigarette<br /> * Fits for all types of electronic cigarette<br /> * No nicotine, no harmful to healthy<br /> * Used to refill empty or used e-cigarette refill cartridges<br /> * With highly concentrate flavor, mellow aroma and long-lasting flavor<br /> * Capacity: 60 ml<br /> * Flavor: </span><font face="Arial">Camel</font></span></p> <p><span style="font-size: small;"><span style="font-family: Arial;">Package included:<br /> 1* Smoke oil</span></span></p>

]]>

 

This is how the file looks, any help will be appreciated

 

Paul

Link to comment
Share on other sites

Hmm I would import that into a blank database and then re-export it out. If you get stuck give me a shout via PM and I can find 5-10min to maybe do it for you.

 

Do you need to import and update regular or is this a once off product import? If its regular it might be better having a script / api written that picks up the xml and imports directly into PS from the distributors data feed

Edited by cocothecat (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...