I am migrating a shop from 1.1.9 to 2.0.22.
The orders are migrated but the amount in the field "order_shipment" is always zero (0). Tried it several times, no luck. The total of the order is correct, the subtotal and tax is correct, just the amount charged for shipping is missing in all migrated orders.
Any ideas?
Uwe
Yes
So odd you post this problem, as I have just been practising with a migration to see how well it works. Very well in fact! However orders and order items have some challenges for me.
There is a bug in site/administrator/components/comvirtuemart/helpers/migrator.php
Adjust the lines around 1390:-
//QUORVIA changed to get correct db values from VM1
// $orderData->order_shipment = empty($order['order_shipment'])? 0:$order['order_shipment'];
// $orderData->order_shipment_tax = empty($order['order_shipment_tax'])? 0:$order['order_shipment_tax'];
$orderData->order_shipment = empty($order['order_shipping'])? 0:$order['order_shipping'];
$orderData->order_shipment_tax = empty($order['order_shipping_tax'])? 0:$order['order_shipping_tax'];
I have posted the correct code below.
Order items is also incorrect (in my experience)- No VAT elements per item etc, Look in an order detail in admin , but I have not been able to see how to fix that yet. I may do it directly in the database, using SQL, rather than messing with the migrator scripts
Hope this helps :)
[attachment cleanup by admin]
Hi
Thanks, that is what i found out too. And it fixes the problem
Uwe