Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Editing the export order to csv functionality

Go to End

4 Posts   1597 Views


Community Member, 40 Posts

23 March 2011 at 9:05pm

Edited: 23/03/2011 9:09pm


I am building a website that requires orders to be exported into a csv file.

Has anyone modified this function to include the full order? If so, what are the files used?

I need to grab certain fields and export in a set structure for importing into an accounting program.

Any help would be much appreciated.



Community Member, 40 Posts

24 March 2011 at 3:37pm

I have found where the array of fields is called. It's on ecommerce/code/model/Order.php around ln 147:
public static $summary_fields = array(
'ID' => 'Order No',
'Created' => 'Created'

Add the extra fields you want in there...

Only problem I have now is getting the order items to appear on the summary list when searching for orders. Does anyone know how to do this?

Thanks, Ben


Forum Moderator, 238 Posts

28 March 2011 at 9:11am

Hi Ben,

I've created a new ticket here:

In the mean time, you could create a custom function that outputs the order items as a string, and then include that in the summary fields.



Community Member, 40 Posts

28 March 2011 at 1:38pm

Hi Jeremy,

Thanks for your reply and creating the ticket.

I have written a script that queries the database separately from the export function... basically creating my own export functionality.

It's not ideal, but works, so am happy.