News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Products additional images migration from Virtuemart 1 to Virtuemart 2 -solution

Started by werian, November 01, 2012, 22:51:43 PM

Previous topic - Next topic

werian

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

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

werian


infin8

Ł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


patrick356356

 ;D ;D ;D
You are my absolute hero!!! I don't know how to thank you enought for this plugin.

/ Patrick

gain

Thank you very much for this plugin. You save me lots of time...
Thanks again... :D

Milbo

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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gain

Just noticed that the plugin works only with images, not with other filetypes (I have pdf manuals also)...

werian

@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

@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

Quote from: werian on November 30, 2012, 14:15:21 PM
@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

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

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):

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.

Quote from: bytelord on December 01, 2012, 17:17:20 PM
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

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