1

I've found this post and i'm interested to have the same for Opencart:

Magento: Automatically create CSV File for each order placed

The question is, is there a possibility to insert a code, that takes the order in the last step (confirm) and puts the data in a csv file on the same server?

Actually the order will be sent via email. This should stay but additionally the order should be saved in a csv file.

Thanks

Community
  • 1
  • 1
27eleven
  • 73
  • 10

1 Answers1

2

Short answer, yes it is possible.

You can use vqmod or ocmod to insert your code in end of order creating function

Here are some links to get you started, sorry I am on phone

Vqmod - https://github.com/vqmod/vqmod/wiki

Ocmod - https://github.com/opencart/opencart/wiki/Modification-System

CSV in PHP fast - Export to CSV via PHP

How to make CSV in PHP - http://code.stephenmorley.org/php/creating-downloadable-csv-files/

Community
  • 1
  • 1
Ripper
  • 1,132
  • 13
  • 26
  • 1
    Thank you very much for your answer. I've identified the query ($order_query) and now i need to put a specific array of this query (i.ex. 'invoice_no', 'customer_id' and 'order_id') in a csv file with variable name (date + 'invoice_no') on the local server. I'll try it today with ths documentation. – 27eleven Jan 15 '17 at 13:58