Order csv export in wrong order

  • Posts: 72
  • Thank you received: 0
11 years 8 months ago #92937

hi,

i've been using the 'export' button to export all 'confirmed' orders every few days to a csv and then open in excel.

when i tried to do this today, some of the new orders (from the last few days) appeared above my old orders and some appeared below my old orders. i expected them to be in order (either by date or user id or something else..?)

i tried to think what had changed in the last few days and a few days ago i unpublished 2 products from the site and added 1 new one. could this be something to do with the orders appearing in the wrong order in the csv file?

has anyone seen this before?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #93043

Hi,

To order by order date, you can edit the view "order / export" in the backend template and apply a sort on the var "$this->orders".
You can use PHP sort functions in php.net/ , you will maybe have to transform the object into an array, sort the array and transform it back to an object.

You can sort on the "order_created" or "order_modified" or "order_id".

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum