How to approach the dilemma: export orders from importing the old magenta system to the new magenta, overlapping identifiers

During the upgrade from Magento 1.5 to 1.7, unfortunately, we had to reinstall Magento (don’t ask), and now I need to get all the information about the previous order in the current update. I explored several scenarios. First, you would need to identify the tables in the database in which they correspond and migrate these tables, but I have three problems with this. One of them: I already did this a bit and, due to discrepancies between 1.5 and 1.7, I called several hours of debugging. Two: I can’t determine which of these extra tables needs updating (I was going to just replace all the sales_ tables). Thirdly: after other orders were added, and, as you know, the order identifiers were started again, and I do not want these records to be replaced.

My other choice is to try building an extension like this: http://www.magentocommerce.com/magento-connect/dataflow-batch-import-export-orders-to-csv-xml.html . I already started, but, alas, already stuck in the oAuth process.

Before I lose more time, I would like some advice. What would be the best way for this process?

Update 1-17

I tried UNION queries on the applicable tables, but of course I get the error message "# 1062 - Duplicate entry" 1 "for the key" PRIMARY ", because there are several primary keys. Is there a request to increase these primary keys of new orders, to follow the identifiers of old orders? I tried to do this in separate columns via UPDATE sales_flat_invoice_grid SET increment_id = ( increment_id +6150) or similar, but the identifiers are mapped to the identifiers in other tables! Please help! I'm afraid I have to tell the boss what we need to drink this extension.

+2
source share
1 answer

Continuation of the comment above ^^

hmmm .. If so, then, as I did export / import in the past (see my post HERE ), the MySQL Workbench EER modeling tool is used to create an order storage system scheme for yourself. First, I would select only one table, and then MySQL will tell you which other tables are bound to this table. I am repeating this process so that on my EER diagram I have no extra tables and I am missing tables. I get exactly the number of tables that I need to understand the flow.

Then do the same for your 1.7 installation and compare. You will need to generate an SQL query that will not only INSERT 1.5 orders into 1.7 database, but you may need to create your own link table, if an identifier is used, you may need to link X with Y to path Z. This is messy and a bit confusing, but I spent 3 weeks creating a SQL / PHP script that I pulled out 1) Product data, 2) Category data, 3) Customer data and 4) Order data. I also wrote one for users and admin backend preferences. This was before I discovered the above tool.

EDIT I would add that this extension is only $ 200. How much will your employer cost during development so that you can get out of this? Depending on your hourly cost (I know what I charge, $ 200 is a theft), it might make sense to get an extension.

0
source

All Articles