Had several times unsuccessfully tries to migrate a shop from 1.1.19 to 2.0.22. It ports everything but the user's BT addresses, ST addresses are migrated just fine.
It always comes up with this error message
vmError: port shoppers db error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`vmu`.virtuemart_user_id FROM j25sc_vm_user_info AS `ui` LEFT OUTER JOIN j25' at line 1 SQL=SELECT `ui`.*,`svx`.*,,`vmu`.virtuemart_user_id FROM j25sc_vm_user_info AS `ui` LEFT OUTER JOIN j25sc_vm_shopper_vendor_xref AS `svx` ON `svx`.user_id = `ui`.user_id LEFT OUTER JOIN j25sc_users AS `p` ON `p`.id = `ui`.user_id LEFT OUTER JOIN j25sc_virtuemart_vmusers AS `vmu` ON `vmu`.virtuemart_user_id = `ui`.user_id WHERE (`vmu`.virtuemart_user_id) IS NULL LIMIT 0,1000
vmError: port shoppers db error SELECT `ui`.*,`svx`.*,,`vmu`.virtuemart_user_id FROM #__vm_user_info AS `ui` LEFT OUTER JOIN #__vm_shopper_vendor_xref AS `svx` ON `svx`.user_id = `ui`.user_id LEFT OUTER JOIN #__users AS `p` ON `p`.id = `ui`.user_id LEFT OUTER JOIN #__virtuemart_vmusers AS `vmu` ON `vmu`.virtuemart_user_id = `ui`.user_id WHERE (`vmu`.virtuemart_user_id) IS NULL LIMIT 0,1000
I think the problem is at the red marked part of the query. I found the query in migrator.php, line 579. It contains a variable called $JUserString. But, this var seems undeclared as the declaration above the query is commented out.
I have now idea what this var should contain, any hints?
Uwe
OK.
I replaced the part with 'p.*' and it worked, no more error message. Now checking if everything went well.
Uwe
Keep us forum watchers updated please
HI
I think that you should not edit the code!
If you make sure you have a user set as a vendor BEFORE migrating users then there should be no errors
Try setting the vendor and then migrate just the users
Hi,
As it turns out this edit was necessary to make it work at all. If you have a look at the code, the generated SQL query has a missing argument. And that independently of any vendor definition (I tried it).
BUT, it does not work correctly. The BT addresses are not migrated correctly, there are missing addresses (3000 converted out of 5000) and wrong links in between users and addresses. Still trying to figure this one out and will keep posting
Uwe
Hmm, I tried to migrate again and got a similar message
After running through a couple of times I still get the message but I see users - I should check the old and new data files to see if values/id s match
Hi,
I am done now migrating all users. Turns out that the migration is working correctly. The only thing I had to do was comment out line 548 in migrator.php
"return false;"
because this line would prevent the script from converting all the users. I had to run the migration multiple times (users only) to convert all users.
Uwe
excellent
That is what I did (except the removal of the line)
Wonder why it worked for me?
Now check your order items data and you might see that the order tax details etc are incomplete due to new fiedls in VM2
Look at an order inthe backedn of Vm
Hi,
see here:
http://forum.virtuemart.net/index.php?topic=117130.0
Uwe
LOL that is my post!
It does not fix the direct_virtuemart_order_items
e.g. field product_tax
Of course if you tax only the final bill amount this post may not be of much use! LOL
Uuups, sorry.
Just checked the old order_items table and there are no fields for the tax as in the new one. And the migration is not taking care of that by calculating the tax. Guess you have to life with no tax amounts in the items table.
I think that's not too bad as the total tax amount is correct (after the fix). And for european tax purposes you can still have an old version of vm on the server to reprint orders. And the user usually does not care as long as the totals are correct
Uwe
It is pretty simple to populate the tax values using the data on the table
UPDATE xxx SET yyy = "aaa" - "bbb"
etc.
Some data for order-items is recreated in vm2.0.22a however not all!
Working on the solution now!
Uwe, how works the vm2.0.22a for you?
Max
This solves the item issue.
in migrator.php
At line 1456 change to this
Quote
//quorvia no tax in vm1.1.9 tables!
// $item['product_discountedPriceWithoutTax'] = $item['product_final_price'] - $item['product_tax'];
$item['product_discountedPriceWithoutTax'] = $item['product_item_price'];
$item['product_priceWithoutTax'] = $item['product_item_price'];
$item['product_tax'] = $item['product_final_price'] - $item['product_item_price'];
$item['product_basePriceWithTax'] = $item['product_final_price'];
//quorvia end
@Milbo
being used to vm 1.1.x for a few years now. Using 2.0.22 is quite different. Fighting with tax settings, shipping and payment.
But, there is light and the end of the tunnel. Nearly done configuring the migrated store.
2.0.22 seems faster and with much more functionality then in 1.1.x. I like the basic concept and the easiness to expand the functionality with plugins as well as the easy way of custom templates. Still, need some more time to get my head around the new version. Hope to be done by next week and will report back
Uwe
Thanks guys. But commenting out return false; on line 548 didn't work for me. I'm still getting the error "vmError: port shoppers db error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`vmu`.virtuemart_user_id FROM" Any other ideas? How would I go about transferring this data in via Mysql?
Interestingly enough, both Hikashop and Redcart migrate this data perfectly. But VM can't migrate its own data...
I never commented out this line and the migration worked perfectly!
Don't comment it out and it should be fine