Virtuemart duplicate users and orders after upgrade
In one of our latest projects we migrated a client from Virtuemart 1.0 to Virtuemart 1.1. The migrate went pretty well although we did come across a bug where users and orders were duplicated in the back end of Virtumart. While it didn’t cause any serious problems it was quite annoying.
Ultimately we found that jos_vm_order_user_info and jos_vm_user_info had extra records, which we found with these selects:
select * FROM `jos_vm_user_info` WHERE `address_type_name` is null;
select * FROM `jos_vm_order_user_info` WHERE `address_type_name` is null;
In our case there were over 8000 unnecessary records. After carefully backing up the database we ran the following SQL and the problem was fixed:
delete from jos_vm_order_user_info where address_type_name is null;
delete from jos_vm_user_info where address_type_name is null;
If you are experiencing this problem, this solution may work out for you. Of course we make no warranty (you can always hire us if you want that!!). Be sure to to backup your database and validate the backup before you run the delete commands.
