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

werian

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 34
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/

infin8

  • Beginner
  • *
  • Posts: 3
Hi,
Sounds awesome and thank you so much for sharing this migration tool, however, the zip file is corrupt, please upload again.  ;)

werian

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 34
Indeed, nice fail :/
Everything should be fine now.

infin8

  • Beginner
  • *
  • Posts: 3
Łukasz you are a LEGEND!!!!!  8)

Updated titles, descriptions, meta data: 1454
I migrate 1361 images.

Thanks mate, you have saved me so much time!

werian

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 34
Thanks :)
Tomorrow i will update reviews migration plugin :)

patrick356356

  • Beginner
  • *
  • Posts: 15
 ;D ;D ;D
You are my absolute hero!!! I don't know how to thank you enought for this plugin.

/ Patrick

gain

  • Beginner
  • *
  • Posts: 47
Thank you very much for this plugin. You save me lots of time...
Thanks again... :D

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9091
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Great work, when you know how to add it to the core, would be nice. On the other hand, that way the marketing effect is better for you. Whatever, good work
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gain

  • Beginner
  • *
  • Posts: 47
Just noticed that the plugin works only with images, not with other filetypes (I have pdf manuals also)...

werian

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 34
@Milbo
Thanks Milbo for that words, it's very good feeling heard somethink like that, especially from you...
I could add this script into VM 2 migration source, but my knowledge about SVN & working in dev don't exists. I'm just alone-dev, and have no idea how to break that :(

@gain
I see you pronblem, I will try to solve that in new version, but it will be difficult.

bytelord

  • Nikos
  • Global Moderator
  • Hero Member
  • *
  • Posts: 2369
@werian

Great work man!
You could make the changes to migration source and send the files to Max, he will adjust it to the core

Regads
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

gain

  • Beginner
  • *
  • Posts: 47
@gain
I see you pronblem, I will try to solve that in new version, but it will be difficult.

np, I've done it by myself with a custom script...

So I'm wondering: from db structure seems that I can upload a pdf once and referring it to many products (sometimes manuals are for a range of products, not only one) and adding associations in #__virtuemart_product_medias works like a charm...
But I can't find a way to do that from the administrator user interface... am I noob or is not implemented yet?

bytelord

  • Nikos
  • Global Moderator
  • Hero Member
  • *
  • Posts: 2369
Hello,

Not sure exactly what are you seraching, may be the open under media selection the option Role?? Have two options file is Displayable or file is Downloadable.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

gain

  • Beginner
  • *
  • Posts: 47
I've noticed that the plugin publish all the images... I've several images unpublished.
I've solved with this SQL (inspired by werian's one):
Code: [Select]
UPDATE `#__virtuemart_medias`
SET published = 0
WHERE REPLACE(file_url, 'images/stories/virtuemart/product/', '') IN (
  SELECT REPLACE(file_name, '/components/com_virtuemart/shop_image/product/', '')
  FROM `#__vm_product_files`
  WHERE file_published = 0
)
works obviously with the default vm path... change it if you've changed it in the backend.

Hello,

Not sure exactly what are you seraching, may be the open under media selection the option Role?? Have two options file is Displayable or file is Downloadable.

Regards

Thanks for your reply, I've tried this option right now but I can't see any difference...

But, well, I'm searching a way to add an image, already in vm, to a product.

patrick356356

  • Beginner
  • *
  • Posts: 15
Hi Werian,

Just discovered a lot of pictures missing after import but most worked fine. Any idea what could be wrong? For example an article had 4 pictures before but now only 2. I don't see any pattern in the number of pictures imported per product, it seems totally random.

I also had some pdf:s that didn't import at all. But that's a separate thing I guess...

Regards
Patrick