VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: nicobond on April 01, 2016, 00:45:44 AM

Title: Migrate from K2 to Virtuemart
Post by: nicobond on April 01, 2016, 00:45:44 AM
I have to migrate all contents from K2 to Virtuemart 3 to create a small ecommerce website. Is there any tool for migration? Concerning K2 item's photos, I know that there's not any table in the database that stores items' photos. How is possible to migrate them to Virtuemart? Is there any solution?
Title: Re: Migrate from K2 to Virtuemart
Post by: GJC Web Design on April 01, 2016, 11:15:03 AM
IMHO only coding a script manually to export the K2 stuff into a csv or xml and use csvi to import (or directly import)
Title: Re: Migrate from K2 to Virtuemart
Post by: nicobond on April 05, 2016, 22:14:51 PM
At the end I managed to export all K2 item data (except the images) by exporting all K2 tables from phpmyadmin.
If you want to import them to Virtuemart you have to remap all columns in the CSV exported.
For the images the only solution I found is to generate for every K2 item its md5 hash (for those who are interested you have to convert the string "Image[K2 item id]" into a md5 hash).
After that I added all md5 hashes into the Virtuemart media table.
It's not necessary to write any particular php script, it's only a datasheet job.