January 4, 2010

Migrating orders using Vm2Mage

Yireo Blog Post

With Vm2Mage various data are migrated into Magento entities (based on the complex EAV-database structure that Magento uses), but there is one main exception to this migraton: Orders. This tutorial explains you the bits about this specific part of the migration.

VirtueMart orders are not migrated into Magento orders

Orders are migrated by Vm2Mage when migrating customer records. However, VirtueMart orders are not migrated into Magento orders but are placed as separate records in the Magento database. The main reason for this is that Magento orders are very complex, and do not only involve the actual order, but also order-items, shipping information, inventory data, product information, discount rules and much much more.

Now, in book-keeping terms, an order involves specific information and unless the VirtueMart order is shown in the exact same way within Magento, it's not the same order anymore. To name one problem here, the format of ordernumbers is different in VirtueMart than in Magento, so migrating orders correctly is nearly impossible.

The VmOrder extension

There for Vm2Mage does not migrate VirtueMart orders as Magento orders, but stores them as separate entities in the database. This functionality is made available through a second Magento module called VmOrder, which allows you to deinstall the Vm2Mage migration tool but keep your older VirtueMart orders available.

The VmOrder extension uses various Magento database tables starting with the prefix "vmorder_". It contains a more or less direct copy of information derived from the VirtueMart database tables.

Viewing old VirtueMart orders

The older VirtueMart orders are made available under a different tab than the regular Order History. The VmOrder module uses regular Magento theming principles to accomplish this task: The logic is defined by a XML-layout file called vmorder.xml while PHTML-templates are responsible for the final HTML-code.

Backup your bookkeeping

Orders are part of your bookkeeping. Because Vm2Mage does not migrate the full information available in VirtueMart, but only those data that could be reused in Magento, it is highly recommended to keep a backup of your VirtueMart installation (both files as database). If you use a different application for bookkeeping, this is not mandatory.

Posted on January 4, 2010

About the author

Author Jisse Reitsma

Jisse Reitsma is the founder of Yireo, extension developer, developer trainer and 3x Magento Master. His passion is for technology and open source. And he loves talking as well.

Sponsor Yireo

Looking for a training in-house?

Let's get to it!

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.

Do not miss out on what we say

This will be the most interesting spam you have ever read

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.