Jump to:

2088 Posts in 1007 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Editing the export order to csv functionality

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1295 Views
  • IDOLYZ
    Avatar
    Community Member
    40 Posts

    Editing the export order to csv functionality Link to this post

    Hi,

    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.

    Cheers,
    Ben

  • IDOLYZ
    Avatar
    Community Member
    40 Posts

    Re: Editing the export order to csv functionality Link to this post

    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

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: Editing the export order to csv functionality Link to this post

    Hi Ben,

    I've created a new ticket here:
    https://code.google.com/p/silverstripe-ecommerce/issues/detail?id=126

    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.

    regards,
    Jeremy

  • IDOLYZ
    Avatar
    Community Member
    40 Posts

    Re: Editing the export order to csv functionality Link to this post

    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.

    Cheers,
    Ben

    1295 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.