PHPackages                             dominicwatts/orderhistory - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dominicwatts/orderhistory

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

dominicwatts/orderhistory
=========================

Easily migrate magento 1 orders to magento 2 and show orders in self contained area in customer account. Offer reorder functionality where possible.

1.0.2(6y ago)21.3k↓90%[2 issues](https://github.com/DominicWatts/OrderHistory/issues)proprietaryPHPPHP &gt;=5.6.0

Since Feb 26Pushed 5y ago2 watchersCompare

[ Source](https://github.com/DominicWatts/OrderHistory)[ Packagist](https://packagist.org/packages/dominicwatts/orderhistory)[ RSS](/packages/dominicwatts-orderhistory/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

Magento 1 Order History Migration to Magento 2
==============================================

[](#magento-1-order-history-migration-to-magento-2)

[![phpcs](https://github.com/DominicWatts/OrderHistory/workflows/phpcs/badge.svg)](https://github.com/DominicWatts/OrderHistory/workflows/phpcs/badge.svg)

[![PHPCompatibility](https://github.com/DominicWatts/OrderHistory/workflows/PHPCompatibility/badge.svg)](https://github.com/DominicWatts/OrderHistory/workflows/PHPCompatibility/badge.svg)

[![PHPStan](https://github.com/DominicWatts/OrderHistory/workflows/PHPStan/badge.svg)](https://github.com/DominicWatts/OrderHistory/workflows/PHPStan/badge.svg)

Easily migrate magento 1 orders to magento 2 and show orders in self contained area in customer account. Offer reorder functionality where possible.

Install
-------

[](#install)

### Step 1 - On magento 1 store create archive orders tables from sales data

[](#step-1---on-magento-1-store-create-archive-orders-tables-from-sales-data)

```
CREATE TABLE m1_sales_flat_order LIKE sales_flat_order;
INSERT INTO m1_sales_flat_order SELECT * FROM sales_flat_order;

CREATE TABLE m1_sales_flat_order_address LIKE sales_flat_order_address;
INSERT INTO m1_sales_flat_order_address SELECT * FROM sales_flat_order_address;

CREATE TABLE m1_sales_flat_order_item LIKE sales_flat_order_item;
INSERT INTO m1_sales_flat_order_item SELECT * FROM sales_flat_order_item;

```

Included sample sql data in repo (`./supplied/magento.sql`) based on magento 1 sample data

[![Screenshot](https://camo.githubusercontent.com/4782092137485ba5965cc57cd9541fe9131feb6b6e0bc7112390b178847f67d2/68747470733a2f2f692e736e6970626f6172642e696f2f7962697458702e6a7067)](https://camo.githubusercontent.com/4782092137485ba5965cc57cd9541fe9131feb6b6e0bc7112390b178847f67d2/68747470733a2f2f692e736e6970626f6172642e696f2f7962697458702e6a7067)

### Step 1.1 Find invalid column types

[](#step-11-find-invalid-column-types)

```
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE DATA_TYPE ='enum';
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE DATA_TYPE ='char';

```

### Step 1.2 Convert invalid column types

[](#step-12-convert-invalid-column-types)

```
ALTER TABLE `m1_sales_flat_order` CHANGE `column_name` `column_name` VARCHAR(255) NULL DEFAULT NULL;

```

### Step 2 - Dump from Magento 1 and import the following tables into your Magento 2 database

[](#step-2---dump-from-magento-1-and-import-the-following-tables-into-your-magento-2-database)

```
m1_sales_flat_order
m1_sales_flat_order_address
m1_sales_flat_order_item

```

Use `mysqldump` or similar

### Step 2.1 - Magento setup:upgrade error

[](#step-21---magento-setupupgrade-error)

```
undefined index :

```

Check foreign keys on newly imported table. May need to delete.

```
SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = ;

```

For example

```
SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = 'core_store';

ALTER TABLE `m1_sales_flat_order` DROP FOREIGN KEY ;

```

### Step 3 - Install extension

[](#step-3---install-extension)

`composer require dominicwatts/orderhistory`

`php bin/magento setup:upgrade`

`php bin/magento setup:di:compile`

Usage
-----

[](#usage)

```
Stores > Configuration > Xigen > Order History

```

Minor configuration required

- Map magento 1 order status codes to their labels
    - This is for status label shown on Magento 2 frontend
- Map Magento 2 Store ID against Magento 1 Store ID
    - This is to ensure correct orders are fetched in multisite scenario

[![Screenshot](https://camo.githubusercontent.com/dd7d2d453a27519d18b6277a43333cf109d6a66fa492926ba8fa325c1bf7e747/68747470733a2f2f692e736e6970626f6172642e696f2f51535944756f2e6a7067)](https://camo.githubusercontent.com/dd7d2d453a27519d18b6277a43333cf109d6a66fa492926ba8fa325c1bf7e747/68747470733a2f2f692e736e6970626f6172642e696f2f51535944756f2e6a7067)

Providing customer email matches logged in customer they will see Magento 1 orders in Previous Order section in their account area with reorder functionality if matching product is found.

My Account &gt; My Previous Orders

[![Screenshot](https://camo.githubusercontent.com/4898bbea7c7a6a66ef9788a2fb799aed24f032c4733e41d428e842cda9476782/68747470733a2f2f692e736e6970626f6172642e696f2f4636625976482e6a7067)](https://camo.githubusercontent.com/4898bbea7c7a6a66ef9788a2fb799aed24f032c4733e41d428e842cda9476782/68747470733a2f2f692e736e6970626f6172642e696f2f4636625976482e6a7067)

Known issues
------------

[](#known-issues)

- Will need to convert enum column type to varchar in `m1_*` tables as magento 2 does not support this column type

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

2270d ago

PHP version history (2 changes)1.0.0PHP ~5.6.0||~7.0.0||~7.1.0||~7.2.0||~7.3.0||~7.4.0

1.0.2PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/44d79495721d844614b7004c5811ff2ab7cf15c9be3544000f7ee89f3e187de3?d=identicon)[DominicPixie](/maintainers/DominicPixie)

---

Top Contributors

[![XigenDominic](https://avatars.githubusercontent.com/u/6814203?v=4)](https://github.com/XigenDominic "XigenDominic (13 commits)")[![DominicWatts](https://avatars.githubusercontent.com/u/7295705?v=4)](https://github.com/DominicWatts "DominicWatts (12 commits)")

### Embed Badge

![Health badge](/badges/dominicwatts-orderhistory/health.svg)

```
[![Health](https://phpackages.com/badges/dominicwatts-orderhistory/health.svg)](https://phpackages.com/packages/dominicwatts-orderhistory)
```

###  Alternatives

[elgentos/regenerate-catalog-urls

Regenerate Catalog URL Rewrites (products, categories, cms pages)

2842.6M](/packages/elgentos-regenerate-catalog-urls)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68353.9k](/packages/run-as-root-magento2-prometheus-exporter)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1859.0k](/packages/myparcelnl-magento)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1010.0k22](/packages/loki-magento2-components)[magepal/magento2-form-field-manager

Customer and Address Form Fields Manager for Magento2

273.9k](/packages/magepal-magento2-form-field-manager)[mage-os/module-llm-txt

AI-powered LLMs.txt generation for Magento 2 / Mage-OS stores. Help AI systems understand your store with OpenAI-generated content.

223.3k](/packages/mage-os-module-llm-txt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
