如何处理两难问题:将旧magento系统导出的订单导入新的magento,重叠ID [英] How to approach dilemma: export orders from old magento system import into new magento, overlapping IDs

查看:220
本文介绍了如何处理两难问题:将旧magento系统导出的订单导入新的magento,重叠ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在从Magento 1.5升级到1.7期间,我们不得不重新安装Magento(不要问),现在我需要将所有旧订单信息都放到实时升级中。我研究过几个场景。首先是识别它们对应的数据库中的表并将这些表迁移过来,但我有三个问题。一:我已经做了一点,因为1.5和1.7之间的差异引起了几个小时的调试乐趣。二:我无法弄清楚哪些特殊表需要更新(只是替换所有的sales_表)。第三:自升级以来,其他订单已经下达,如您所知,重新开始订单ID,我不希望这些条目被替换。

During an upgrade from Magento 1.5 to 1.7 unfortunately we had to reinstall Magento (don't ask) and now I need to get all of the old order information into the live upgrade. I've researched several scenarios. First would be identifying the tables in the database they correspond to and migrating those tables over, but I have three issues with that. One: I already did a little bit of that and because of the discrepancies between 1.5 and 1.7 caused several hours of debugging fun. Two: I can't figure out specifically which of these freaking tables needs updating (was going to just replace all sales_ tables). Third: since the upgrade other orders have been placed, and as you know, started order ids all over again and I don't want those entries to get replaced.

我的另一个选择是尝试构建像这样的扩展: http://www.magentocommerce.com/magento-connect/dataflow-batch-import-export-orders-to-csv- xml.html 。我已经开始了,但是我已经陷入了oAuth流程。

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

在我浪费任何时间之前,我想要一些建议。这个过程最好的方法是什么?

Before I waste anymore time, I'd like some advice. What would be the best way to go about this process?

更新1-17

我试过UNION在适用的表上查询但当然我得到错误#1062 - 密钥'PRIMARY'的重复条目'1'有几个主键。是否有查询在旧订单的ID之后递增新订单的主键?我尝试通过UPDATE sales_flat_invoice_grid
SET increment_id =( increment_id +6150)或类似,但ids被映射到其他表上的ids!请帮忙!我担心我不得不告诉老板我们需要买那个分机。

I have tried UNION queries on applicable tables but of course I get error "#1062 - Duplicate entry '1' for key 'PRIMARY'" being there are several primary keys. Is there a query to increment those primary keys of the new orders to follow after the ids of the old orders? I tried to do this in individual columns via UPDATE sales_flat_invoice_grid SET increment_id = (increment_id+6150) or similar, but the ids are mapped to the ids on other tables! Please help! I'm afraid I'm going to have to tell boss that we need to buy that extension.

推荐答案

继续上述评论^^

hmmm ..如果是这种情况,我过去做出口/进口的方式(参见我的帖子HERE )是使用MySQL Workbench EER Modeling工具创建自己的订单存储系统图。我首先只选择一个表,然后MySQL会告诉你其他表与该表绑定了什么。我重复这个过程,以便在我的EER图中,我没有不必要的表,而且我没有丢失表。我最终得到了理解流程所需的表格数量。

hmmm .. If that's the case, the way I've done exports/imports in the past (see my post HERE) is use MySQL Workbench EER Modeling tool to create myself a diagram of the order storage system. I would select only one table at first, then MySQL will tell you what other tables are tied to that table. I repeat this process so that in my EER diagram, I don't have unnecessary tables, and I am not missing tables. I end up with exactly the number of tables I need to understand the flow.

接下来,为1.7设置做同样的事情......并进行比较。您将需要生成一个SQL查询,该查询不仅会将1.5个订单插入到1.7数据库中,而且您可能需要创建自己的链接表,以防有使用的ID,您可能需要将X链接到Y Z的方式。它很混乱,有点令人困惑,但我花了3个星期编写了一个SQL / PHP脚本,其中包括1)产品数据,2)类别数据,3)客户数据和4)订单数据。我还为Admin后端用户和首选项编写了一个。这是在我发现上述工具之前。

Next, do the same for your 1.7 setup ... And compare. You will need to generate a SQL query that will not only INSERT the 1.5 orders into the 1.7 database, but you may need to create your own link table in case there is an ID that is used, you may need to link X to Y by way of Z. It's messy, and a little confusing, but I spent 3 weeks writing a SQL/PHP script that pulled 1) Product Data, 2) Category Data, 3) Customer Data and 4) Order Data. I also wrote one for Admin backend users and preferences. This was before I discovered the aforementioned tool.

编辑我可以补充说,该扩展只有200.00美元。开发时间需要多长时间才能让您的雇主为您开发出自己的方式?根据你的每小时费用(我知道我收取的费用,200美元将是一个窃取),获得扩展可能更有意义。

EDIT I might add , that extension is only $200.00. How much in development time is it going to cost your employer for you to develop your way out of this? Depending on your hourly cost (I know with what I charge, $200 would be a steal) it may make more sense to get the extension.

这篇关于如何处理两难问题:将旧magento系统导出的订单导入新的magento,重叠ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆