Froogle Export 1.0.0 WordPress Plugin Available for Download
10/11/09
Part of implementing the artforclick website, I needed to export the products listed on the site in order to have them imported in Froogle. I tried initially using the simple RSS component of WordPress, but as you might know, Google is using a rather changed format of the XML so trying to simply import the RSS feed exported from WordPress didn’t work.
I could of course do a database export (either through WordPress or straight from MySQL) and then handcraft it to match the required XML but that would have turned out to be labourious as with Froogle you do need to refresh your products every month — and I really didn’t fancy hand-editing an XML file once a month! So I decided to write a simple WordPress plugin that simply exports the data in the required format — and here it is “Froogle Export”!
The way it works is very simple — once installed, it adds a “Froogle Export” button under your “Settings” menu in the admin interface (ok, ok, really, that should have been under “Tools” — perhaps in version 1.1!) which when clicked opens up a page with just one button : “Export”. On clicking this, the plugin iterates through all the posts (so pages, comments etc are ignored!) and creates an <item> entry for each one in the saved XML file. While the Froogle XML data feed format is quite exhaustive, for now, the plugin only exports the following:
- <title> — set to the post title
- <link> — set to the post permalink
- <description> — set to a trimmed down version of the post contents itself
- <id> — set to the post id
- <price> — this is assume to be by default £3, however, one can add a post meta labelled “froogle_price” and set the price per each post individually
- <condition> — this will always be set to “new” (again, this is the case with artforclick.com)
- <image_link> — this will contain the link to the first image inserted in the post
On top of this, one can decide not to include a post in the export by simply adding a post meta labelled “froogle_exclude” to a post.
The above scenario is probably not a generic one for sites which use WordPress to implement an online store, however, it can be adapted easily (I hope!). With artforclick.com, each product is a post and as such has a title, a description (which contains sometimes the price as well — however, this is stripped off at time of export!) and a couple of pictures of the product itself. Also, all of their products have the same price £3.00 — hence the hardcoded value in the php file at the moment. Therefore simply exporting all of the posts using the structure above provides an export of all of their products, ready to be imported into Froogle.
Other sites might need slight modified versions of the plugin — which is why we have created a forum thread for this plugin in order to discuss issues with the plugin itself and listen to what others have to say about it.
You can check out the sources for the plugin from SVN: https://forge.3bsoft.net/froogle_export/ or you can download the plugin here: Froogle Export - Froogle Export Wordpress plugin -- allows exporting your posts (products) in Froogle XML format




