Import from VM2.6 does not import actual data

  • Posts: 30
  • Thank you received: 1
  • Hikashop Business
9 years 8 months ago #192794

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.4.0

Hi,
I've been trying to migrate a website from 2.5 to 3.4 and from VM2.0/2.6 to Hikashop. Unfortunately, the import process from VM to HK does not work. I've tried with the VM 2.0 version and I tried updating first to VM 2.6 and the importing. I also tried to import the data in J2.5 and 3.4.

It sometimes failed with SQL errors and other times the imported data was mostly empty, meaning that no filepaths have been migrated and that all category data is empty. I don't really know where to start. it seems as if the data is not properly retrieved from the database...

Please help. :)

Regards,
Hannes

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #192936

Hi,

It will be helpful to know what data is imported or not.

We did not modify the VM import after the 2.3.5 and we do not have special report of VM import failure since then.
The VM2 import has been created few years ago ; with the different VM release, they changed several things in the database structure ; so it's highly possible that there are some differences in the database (structure/content) which give trouble to the import. It is not the first time that we have to modify the import to handle new VM versions.
But we will need more details in order to know what and why.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 30
  • Thank you received: 1
  • Hikashop Business
9 years 8 months ago #192941

I looked into this a bit further and noticed a "little" mistake by me: VM was set up to have both english and german content (even though the english content wasn't filled) and the site itself did not have a german content language. After adding that one and selecting german content to be imported, the products and categories were correctly imported. However, the images were not, so I had to write the following query to get those imported, too:
INSERT INTO #__hikashop_file (file_ref_id, file_path, file_type, file_ordering) SELECT hkvmprod.hk_id, REPLACE(vmm.file_url, 'images/stories/virtuemart/product', ''), 'product', vmpm.ordering
FROM #__virtuemart_medias as vmm
LEFT JOIN #__virtuemart_product_medias as vmpm ON vmpm.virtuemart_media_id = vmm.virtuemart_media_id
LEFT JOIN #__hikashop_vm_prod as hkvmprod ON vmpm.virtuemart_product_id = hkvmprod.vm_id
WHERE file_type = 'product'

I also had to copy the files themselfs by hand.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 8 months ago #192944

Hi,

Thanks for the report.
Depending the VM version, the images are not stored in the same way so the import have to handle different situations.
The algorithm first try to extract the file name from the "file_meta" and then from "file_url".
I'll add some modifications in order to handle the value of the "media_product_path" from the VM configuration in the "file_url" content ; so the SQL request you made (and the copy of the files) won't be required anymore.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum