Author Topic: Products additional images migration from Virtuemart 1 to Virtuemart 2 -solution  (Read 30577 times)

svarmuza

  • Beginner
  • *
  • Posts: 16
Greetings...
I can' manage to migrate additional images...  I get message.. "I migrate 0 images."... and i think i did procedure as explaned:

1. I have old VM tables in my 2.5 database with correct 2.5 prefix
2 I installed plugin and enabled it
3. my old image folder is in /components/com_virtuemart/shop_image/product  .... with all images there  (and i have it also in images/stories/virtuemart/product too)

when i click START PROCESS i get message "I migrate 0 images."

I would be very happy if someone could help me with this.
Thanks,
Sasa

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
Your Joomla version?
Virtuemart 2 is quite bugfree now. You can support Community by voting for Project on the JED
http://extensions.joomla.org/extensions/e-commerce/shopping-cart/129/review
Join us in
https://www.facebook.com/virtuemart
https://twitter.com/virtuemart

svarmuza

  • Beginner
  • *
  • Posts: 16
Greetings,

My Joomla is version 2.5.14, and VM 2.0.22a

Thank you very much for helping.

Cheers,
Sasa

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
1. I have old VM tables in my 2.5 database with correct 2.5 prefix
It should be 1.5 prefix.
Virtuemart 2 is quite bugfree now. You can support Community by voting for Project on the JED
http://extensions.joomla.org/extensions/e-commerce/shopping-cart/129/review
Join us in
https://www.facebook.com/virtuemart
https://twitter.com/virtuemart

svarmuza

  • Beginner
  • *
  • Posts: 16
Hi Maxim,
when i rename my old VM tables in new 2.5 database with original old jos_  prefix I get this error.
Quote
Warning: Invalid argument supplied for foreach() in .../plugins/system/vm1_additional_images_migrator/vm1_additional_images_migrator.php on line 132
I migrate 0 images.

But I'm not sure that i should have old prefix, but new of 2.5 database (in the first post of this thread it is mentioned that old VM tables should have correct prefix of new 2.5 database)

Quote
1. Old Virtuemart 1 tables musts exists in your actual database! (especially #__vm_product_files table), with the same prefix, as your Virtuemart 2 database prefix.

Thank you very much for trying to help me...
Sasa

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
You could pm me access and I could look into it. Phpmyadmin access is welcome also.
Virtuemart 2 is quite bugfree now. You can support Community by voting for Project on the JED
http://extensions.joomla.org/extensions/e-commerce/shopping-cart/129/review
Join us in
https://www.facebook.com/virtuemart
https://twitter.com/virtuemart

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2657
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
It could be issue with your php settings. Ask your hosting support to turn off "safe mode" in your PHP. Safe mode is not welcome in Joomla.
Virtuemart 2 is quite bugfree now. You can support Community by voting for Project on the JED
http://extensions.joomla.org/extensions/e-commerce/shopping-cart/129/review
Join us in
https://www.facebook.com/virtuemart
https://twitter.com/virtuemart

svarmuza

  • Beginner
  • *
  • Posts: 16
Hi Maxim,
Big thanks for checking my issue and helping me.
I have one copy of the site on my localhost machine... and I have the same problem as on live server migrating additional photos, although safe_mode is turned OFF on my local server....

But the good news is that i managed to migrate additional images somehow by manipulating database in phpMyadmin. Yes, it took me whole night untill 5 AM but finally i managed to solve this:)

Thanks one more time for everything.
SAsa


barboss

  • Beginner
  • *
  • Posts: 6
I have errors while renaming
Warning: mysql_affected_rows() [function.mysql-affected-rows]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /plugins/system/vm1_additional_images_migrator/vm1_additional_images_migrator.php on line 325

When I try to import pictures I have this errors
Warning: imagejpeg() [function.imagejpeg]: Unable to open '_90x90/home/site/images/stories/virtuemart/product/resized/tmpForThumb_php1t6pEk.jpg' for writing: No such file or directory in /site/administrator/components/com_virtuemart/helpers/img2thumb.php on line 318


mfarooqi

  • Beginner
  • *
  • Posts: 7
Hello there!

Few days ago I just develop & release simple plugin, which helps you with migration process of additional images from Virtuemart 1 to Virtuemart 2.
Here is download: http://joomstuff.com/free/plg_vm1_additional_images_migrator.php
Use this plugin after VM 1 => VM 2 migration process, when your old VM 1 tables still exists into target, new database.
Plugin migrates only product additional images, not the first one, which is migrated with standard VM 1 => VM 2 migration process.


Installation is simple - use your Joomla installer, then publish plugin in plugins panel.

Migration process:

1. Old Virtuemart 1 tables musts exists in your actual database! (especially #__vm_product_files table), with the same prefix, as your Virtuemart 2 database prefix.
2. Put this url into your browser address bar: www.your_vm2_site.com/index.php?convertVm1Images
3. You will get this form:



4. You can optionally update images titles & descriptions from Virtuemart 1 database, if you want that - check it.
5. Put "Start process" to begin images migration.
6. You will get this message on complete:



Changelog:
- version 1.1 - added function to generate thumbnails from plugin
- version 1.2 (27.01.2013) - fixed SQL bug



Regards, sorry for my poor English & have fun!  ;)

Łukasz Duda / Luke Duda
http://joomstuff.com/
http://dodatkijoomla.pl/


I've tried this same process. several times.. but i get nothing instead "I migrate 0 images."

I done following steps
1. my vm1 table names were like j25_vm_tablename .. i  renamed them to j25_vm_tablename
2. my vm2 table names were like j25_virtuemart_tablename .. i renamed them too j25_virtuemart_tablename ..
Uploaded files.. but couldnt' get any result.

Can you please tell me what could be the issue?

Darkheart

  • Beginner
  • *
  • Posts: 12
Thanks! Saved me hours of work!

csho

  • Beginner
  • *
  • Posts: 33
I use virtuemart 2.6 and I lost my additional images after migration, the above script didn't worked on me, any thoughts?

onli333

  • Beginner
  • *
  • Posts: 3
Please, please, please, upload the file again. Link in the first post does not work. :'(

werian

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 34
Uploaded once more time.

onli333

  • Beginner
  • *
  • Posts: 3
Thank you very much!!! :)