Magento 2 Export Import Orders Extension

Export Import Orders

Introduction

The extension allows to export and import customers and guest orders including all order data as well as product, customer-related data.

Installation

The extension has 2 separate ways of installation, via Composer or by copying the code.

Please follow this Installation Guide to install the extension.

Export and Import Orders

Configuration Settings

To access the configuration settings for this extension, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ Export/Import Orders.

The module’s configuration contains two sections: History and Clear.

History

In the History section the following settings are available :

Log all Orders Export History -  set to "Yes", to log all order export history in the admin panel, all history will appear under SYSTEM → Export/Import Orders by Ulmod → Export Order History. If you do not want to log all order export history, just set this field to "No"

Log all Orders Import History -  set to "Yes", to log all order import history in the admin panel, all history will appear under SYSTEM → Export/Import Orders by Ulmod → Import Order History. If you do not want to log all order import history, just set this field to "No"

Clear

In the Clear Orders Export After X Days -  field, enter the number of days to automatically clear orders export history. Eg. 30. If you do not want to clear export orders history automatically, set this to 0.

In the Clear Orders Import After X Days -  field, enter the number of days to automatically clear orders import history. Eg. 30. If you do not want to clear importt orders history automatically, set this to 0.

Export Orders

The extension allows store administrator to export orders in the admin panel. To export orders, please go to SYSTEM ⟶ Data Transfer by Ulmod ⟶ Export/Import Orders by Ulmod ⟶ Export Orders.

Export Order

In the From/To Date set a time interval to export the orders.

In the Field Separator enters a separator value for each field. The default value is a comma (,)

In the Field Enclosure enters an enclose value for each field. The default value is (")

Click the Export Orders button to export orders. The orders will be exported to a CSV file. eg. export_orders.csv

Note: A comma (,) is the default separator in a CSV file. To use a different character, make sure that the data in the CSV file matches the character that you define

Import Orders

To import orders, please go to SYSTEM ⟶ Data Transfer by Ulmod ⟶ Export/Import Orders by Ulmod ⟶ Import Orders.

Set Create Invoice(s) field to "Yes" to create invoices during the import

Set Create Shipment(s) field to "Yes" to create shipments during the import

Set Create Credit Meno(s) field to "Yes" to create credit menos during the import

In the Field, Separator enters a separator value for each field. The default value is a comma (,)

In the Field Enclosure enters an enclose value for each field. The default value is (")

In the Allowed Errors limit field, specify the number of errors to stop the import process

In the Select CSV File to Import field, tap choose the file to select the CSV file to import. Note: You can import the exported CSV file directly into Magento backend without any additional modification. However if this fail, please check our sample import file to prepare your CSV import file

Click the Import Orders button to import orders. The orders will be imported

Import Order Note:

  • Please edit the CSV file to import on google docs or similar tools. If you edit on google docs, make sure to download as CSV (File ⟶ Download as ⟶ Comma-separated values(.csv, current sheet))
  • You can import the exported CSV file directly into Magento backend without any additional modification, or check our  order import sample file
  • In your CSV file if these fields: entity_id and incremented_id are empty or contain an order number already in use by another order (eg. 0000005 or custom order number ORD-18-12-19-0000005), a new order number will be created/used as an increment from last order number. Example: if last incremented order was: 0000005, a new order number will be 0000006
  • To import a custom order number: make sure to specify your custom order number at both entity_id and incremented_id fields.

Command Line(CLI)

CLI Export/Import

List all commands :

php bin/magento

There you will see all available order export/import command under ulmod section

CLI Export

To list all available CLI export options:

    • Run this command ;
php bin/magento ulmod:order:export --help

To Export order to a CSV file:

    • Run the export command, replace the --from/--to date value with your desired date as well as the --filename value ;
bin/magento ulmod:order:export --directory=var/ulmod_orderexport/ --filename=export-orders-yyyy-mm-dd.csv  --from=2018-01-01 --to=2019-05-13 --delimiter=',' --enclosure='"'

Note: please always use this directory: var/ulmod_orderexport/ while exporting from CLI (command line)

CLI Import

To list all available CLI single CSV import options:

    • Run this command ;
php bin/magento ulmod:order:import-single --help

To Import a single CSV file:

    • Upload the CSV file to magento directory;
    • Run the import command ;
php bin/magento ulmod:order:import-single --filename=var/ulmod_orderimport/import-order-yyyy-mm-dd.csv  --create-invoices=1 --create-shipments=1 --create-credit-memos=1 --delimiter=',' --enclosure='"' 

To list all available CLI multiple/bulk CSV import options:

    • Run this command ;
php bin/magento ulmod:order:import-multi --help

To Import multiple CSV files (Bulk/Batch import):

    • Create a import directory. Example : var/ulmod_orderimport;
    • Upload all CSV files into the import directory( var/ulmod_orderimport);
    • Run the following command to import all CSV files on the directory;
php bin/magento ulmod:order:import-multi --dir=var/ulmod_orderimport

Export Orders History

To access the order export history, please go to SYSTEM ⟶ Data Transfer by Ulmod ⟶ Export/Import Orders by Ulmod ⟶ Export Orders History. A convenient grid displays the history/log of each order exported including all details: export date, export type, admin username, file name, file path, file size, execution time, status and message

  • You choose the column to show or hide on the grid and filters log by: export date, admin username, file name, file path, file size, execution time, status and message
  • To delete/clear all export history manually, please hit the ‘Clear Export Log’ button, all history will be deleted
  • To download the exported file, please click the Download link at the "Exported file" column, the exported file will be downloaded. If you attempt to download a file that does not exist on the server, you will be redirected to the same page.

Note: both exports performed from backend and command line (CLI) are logged/available in the history

Import Orders History

To access the order import history, please go to SYSTEM ⟶ Data Transfer by Ulmod ⟶ Export/Import Orders by Ulmod ⟶ Import Orders History. A convenient grid displays the history/log of each order imported including all details: import date, admin username, file name, file path, file size, execution time, status and message

  • You choose the column to show or hide on the grid and filters log by import date, import type, admin username, file name, file path, file size, execution time, status and message
  • To delete/clear all import history manually, please hit the ‘Clear Import Log’ button, all history will be deleted
  • To download the exported file, please click the Download link at the "Imported file" column, the imported file will be downloaded.If you attempt to download a file that does not exist on the server, you will be redirected to the same page.

Note: both imports performed from backend and command line (CLI) are logged/available in the history

Sample Downloads

Sample Downloads

Click to download samples :

 Download Sample Import Export Orders File

Extension Support

Need Help?

Ulmod Support team is always ready to assist you, no matter which part of the world you are in. If something does happen and you think you might be experiencing an issue or bug, please contact us via [email protected] or submit a ticket from our Helpdesk Ticket and we will help you out.

Got Questions?

Should you have any questions or feature suggestions, please Contact Us. Your feedback is welcome!

Extension Product Page