dominicwatts/orderhistory
Composer 安装命令:
composer require 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.
README 文档
README
Easily migrate magento 1 orders to magento 2 and show orders in self contained area in customer account. Offer reorder functionality where possible.
Install
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
Step 1.1 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
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
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
undefined index : <index>
Check foreign keys on newly imported table. May need to delete.
SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = <index>;
For example
SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = 'core_store';
ALTER TABLE `m1_sales_flat_order` DROP FOREIGN KEY <fk_name>;
Step 3 - Install extension
composer require dominicwatts/orderhistory
php bin/magento setup:upgrade
php bin/magento setup:di:compile
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
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 > My Previous Orders
Known issues
- Will need to convert enum column type to varchar in
m1_*tables as magento 2 does not support this column type
dominicwatts/orderhistory 适用场景与选型建议
dominicwatts/orderhistory 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.31k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 02 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dominicwatts/orderhistory 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dominicwatts/orderhistory 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2020-02-26