EDIT - April 26, 2013UTF8 languages support added.
------------------------------------------
Code is here:
url :
http://tny.cz/ddc56f55pass : vmuser
This is tested on VM 1.1.9 to VM 2.0.6 But ideally should work on all versions.
I wrote this non-professional import script for one of my sites.
How to import child products:
1. First Migrate all data from old virtuemart to new virtuemart.
2. Your database should contain old virtuemart products table (jos_vm_product) and new vm tables.
3. Copy the code from the above location and paste it into a notepad file. Name the file importer.php (change the file type to all) and place it in the joomla root.
4. Change the variable $oldtable value to your old virtuemart product table on line 9. In most cases it will be : jos_vm_product - Line#12
6. Adjust settings (database, username etc) at the top of the script and access via url to execute it.
5. Add product ids to ignore (in case you already imported or added attributes to some products) - Line#13
$ignore = array(""); //array("11,12"); any products ids to ingore import to. ids are from new <yourdbprefix>_virtuemart_products table.
6. RUN IT ONCE! (otherwise it will keep importing the attributes)
What it does:
NOTE : It migrates product attributes which are defined under the product status tab of a product in Old versions of Virtuemart. It imports attributes which have a parent property and then child attributes. The imported properties will become parents and will be assigned as CART VARIANTS. IF you want to change that behavior, look around line 70.
Let me know if there is any issues and i will fix it when i get time. Its pretty simple so any one can modify or improve it.
THIS IS NOT A PROFESSIONAL CODE. Just a quick fix.
It will make VM 1.1.9 Attributes defined like this :

To this in the VM 2 frontend:
