free
web stats

Fill the form & Get Installation Support

Connect With Us





captcha

Connect With Us





captcha

How to export each order into csv file when it will be placed?

This functionality will be done by and event observer. And Event is “checkout_onepage_controller_success_action”.

In this event you can get the current order data and you will be able to export this data in to csv.

Step 1: For add the event you have to make a events.xml in your module and paste the below code into it.

Step 2: Now you have to create a Orderexport.php file in Observer folder and place the below code into it.

That’s it.

Note- I have use the field and data as per my requirements. You will change this as per your requirements.

Was this article helpful?
YesNo
Fill the below form if you have any Magento programming need.




captcha