Import Orders
Composer kowal/module-importorders · Version 1.0.29
Product page
Description
Copy order data from an external Magento 2 database into the store where the import runs. The starting point is the internal order ID.
For whom
For administrators migrating order history between compatible Magento installations.
Features
- Import a single order or a range starting at a given ID.
- Copy items, addresses, payments and supported invoice records.
- Handle guest orders and linked customer records.
Installation
From the Magento root, with Composer access to the Kowal package, run
composer require kowal/module-importorders
bin/magento module:enable Kowal_ImportOrders
bin/magento setup:upgrade
bin/magento cache:clean
Configuration
- On the destination store, open Stores → Configuration → Kowal → kowal_import_orders. Under db_connection, enter the source database host, database name and read-only credentials.
- Check Table Prefix. The importer uses the configured prefix for both reads and writes. Compare schemas, store and customer identifiers and check for key collisions.
- On a restorable copy of the destination database, select one source
entity_id. Use--singlefor the first run.
Requirements / notes
The importer inserts original IDs directly into tables. A failure can leave partial records. Check the command output and Magento log even when the exit code is zero. Restore the test copy before retrying a failed import.
FAQ
What happens if I omit --single?
The importer selects every order with an entity_id greater than or equal to the value supplied. The order number shown to the customer is a separate field called increment_id.
Verify the installation
bin/magento module:status Kowal_ImportOrders
On the test copy, run bin/magento kowal_importorders:importorders 123 --single, replacing 123 with the chosen entity_id. Open the imported order and compare its items, addresses, totals and customer association with the source.