Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Graham Kite
PLUS
Graham Kite
Courses Plus Student 8,123 Points

expoerting shopping cart data to csv

I have a client that is wanting advice on a point of sales system that needs to use a csv file to get data. This means I would need to export data to a scv file and find some way of doing it daily. Any thought on how to do this?

5 Answers

Matt Campbell
Matt Campbell
9,767 Points

What ecommerce plugin are you using? WordPress Backup allows for custom post type backup to CSV I'm sure, so would work with most ecommerce plugins I imagine.

Graham Kite
PLUS
Graham Kite
Courses Plus Student 8,123 Points

I have looked at woocart, but have heard it leaves a lot of stuff in the database as does all woo themes and also has unique loops. But it does work well and is widely supported.

The other plugin I am looking at is the new iThemes exchange plugin. I like it and it works with cpt and core wordpress, but from my experience the support is non existent for real work. Unless it is very simple.

So it means I have to work everything out without their support and my coding abilities are not great yet, so that makes it painfully slow and time consuming.

Does wordpress backup allow only certain fields to export or the whole db?

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

WordPress backup backs up everything, and I think that WooCommerce is your best bet

Graham Kite
PLUS
Graham Kite
Courses Plus Student 8,123 Points

I like woocommesre but I have heard woo leave a big mess in the database if it is ever uninstalled, and also the addon's are fairly expensive.

I have the new ithemes exchange plugin which works well and has a seamless stripe integration. It also gives a conditional on the gateway to say if transaction completed then show:

That being the case all I really need to do is figure out how to get custom field out of the database and into a hidden xml form.

There api has a submission url, and needs to be in an Xml format. I can add custom fields, so what i need to do is figure out how to get those field exported into and xml file which, I am thinking I should be able to use a hidden form to submit. Does that sound feasible< and any thoughts/advice on the best way to set up the xml file/export?

In all of those cases since stripe returns a completed transaction, it should not matter so much if it is woocommerse, exchange, or cpt and custom fields.

This sounds feasible to me. Any thoughts?

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I would just create a simple plugin that runs a custom DB Query that you write to pull exactly what you need.

Check out this: http://codex.wordpress.org/Class_Reference/wpdb and maybe something like this: http://www.phpeveryday.com/articles/PHP-XML-Creating-XML-Document-P413.html