Whit this module you can export the orders registered in Magento 2.
The export create
- one csv file for every order containing order detail
- one csv file containing all order
By default the module saving csv files in var/
magento's directory.
There are two way to generate the exports
- from CLI
- from crontab
In the Magento 2 CLI there is the command
bin/magento order:export
with this options
- the type of export,
d
detailed orl
list;- detailed generate one csv file for list of orders and one file for each order with order detail
- list generate only one file with the list of orders
- the order status used for filtering orders collection
start
andend
date for filtering orders collection; this two dates are relatives to created_at field
Example.
bin/magento order:export l all 2020-01-01 2020-12-31
By default the module set a cron job to runnig every day at 00:01 hours in detailed mode The job get all orders created on the current day
You can install this module via Composer or manual setup. To install it with composer you can insert this rows in your magento's composer.json
"require": {
"ws/orderexport": "1.0.*"
},
"repositories": {
"m2_orderexport":{
"type": "git",
"url": "[email protected]:wallaceer/m2_orderexport.git"
}
}
After edited composer.json
- launch composer update
- verify the module status with
bin/magento module:status | grep Ws_Orderexport
- enable the module, if necessary, with
bin/magento module:enable Ws_Orderexport
- run bin/magento setup:upgrade
For a manual installation:
- copy the module in your magento
app/code
- run
bin/magento setup:upgrade
- verify the module status with
bin/magento module:status | grep Ws_Orderexport
In every case remember to launch the command bin/magento setup:upgrade
for cleaning the cache
This module was developed with Magento 2.3.4 CE