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 (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:
(http://joomstuff.com/free/migration_images_vm1.png)
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:
(http://joomstuff.com/free/migration_images_vm1_success.png)
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/
Hi,
Sounds awesome and thank you so much for sharing this migration tool, however, the zip file is corrupt, please upload again. ;)
Indeed, nice fail :/
Everything should be fine now.
Ł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!
Thanks :)
Tomorrow i will update reviews migration plugin :)
;D ;D ;D
You are my absolute hero!!! I don't know how to thank you enought for this plugin.
/ Patrick
Thank you very much for this plugin. You save me lots of time...
Thanks again... :D
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
Just noticed that the plugin works only with images, not with other filetypes (I have pdf manuals also)...
@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.
@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
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?
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
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.
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
Hmm, not worked for me at all?
I have these files with right prefix from vm1.5
Structure j25_vm_category
Structure j25_vm_category_xref
Structure j25_vm_manufacturer
Structure j25_vm_manufacturer_category
Structure j25_vm_product
Structure j25_vm_product_category_xref
Structure j25_vm_product_mf_xref
Structure j25_vm_product_price
Structure j25_vm_product_relations
Looked at source of php and do not see need for others... so what might be missing?
Backed up... reinstalled VM and ran again with same results. Tried the thumbnail creation and that threw up an internal server error... but have memory set to 128M.
This site has 800 items and about 3,000 images so not the end of the world if I have to add pics back in manually but this seems such a simple task I cannot understand why it fails. Also the next site to be migrated has 5,000 items and 20 or 30k images... so need to solve for that.
Is this going to be integrated into a future VM migration as it seems odd that if everytime a new VM version we have to manually rebuild so much of the site?
A little more info from error log
Sat Jan 05 02:42:09 2013] [warn] [client 92.152.xx.xxx] mod_fcgid: stderr: PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/XXXXX.info/httpdocs/jupgrade/plugins/system/vm1_additional_images_migrator/vm1_additional_images_migrator.php on line 106, referer: http://XXZZZZZ.info/jupgrade/index.php?convertVm1Images
which refers to code
$product_images = $db->loadObjectList();
foreach($product_images as $product_image)
So I presume it looks in the old table for each product to retrieve the file name and add a record to the new version table. I did notice that in vm_product_files it includes path in file name! But I guess that is supposed to be...
Anyway I am lost on how to resolve this one :-\
New version of plugin - I found SQL bug. Now plugin should be fine.
Thanks for @FrankA.
Version 1.3 allows you rename ".JPG" images to ".jpg".
".JPG" don't works with Virtuemart 2!
I tired to do this. I downloaded the plug in and installed it in my joomla 2.5 backend and I put the link in the browser, like you said: http://www.your_vm2_site.com/index.php?convertVm1Images
And I got a big pop up screen that says: "server not found." I am sad. How can I make it work?
My e-mail is: susan.mulford@gmail.com
Did you enabled pluign in Joomla backend?
I presume that this is intended to run on joomla 2.5?
Migrations from VM1 to VM2 were being done after upgrading joomla to 2.05... but currently advice 'seems' to have been quietly changed to migrating VM1 to VM2 on jommla 1.5.25 (or 1.5.26 depending which solution you read). Is there any impact on this plug-in werian, will it work on joomla 1.5?
I still have one major site to upgrade 1.5 to 2.5 and vm 1.1.9 to 2.
Also I just used this script again on a fairly restricted shared server vm migration. Took several attempts as the server gave up on it most attempts but it did complete the job in the end, but server never let script get back to display result.... I think some images never got reset... will have to do a manual check on each product... but certainly the bulk went through OK.
..followed the install plugin - started the script.
1300 thumbnails generated
But no additional images in products added.. :-[
Thumbnail generation is a separate function in the tool. You need to use button left to add the additional images. Note also you need the vm1 tables renamed with j25 prefix... same prefix as your joomla install
Migrating additional images with this plugin doesn't work for me.
I get an error message:
Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/mysite/plugins/system/vm1_additional_images_migrator/vm1_additional_images_migrator.php on line 132
This line is: foreach($product_images as $product_image)
Does anyone have an idea how to fix this?
Quote from: werian on November 01, 2012, 22:51:43 PM
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 (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.
The Link to the addtional images migrator is unfortunately broken. Is there annother option were you can download it?
Yes.
[attachment cleanup by admin]
Thank you very much! :)
You're welcome!
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
Your Joomla version?
Greetings,
My Joomla is version 2.5.14, and VM 2.0.22a
Thank you very much for helping.
Cheers,
Sasa
Quote from: svarmuza on September 26, 2013, 19:43:24 PM
1. I have old VM tables in my 2.5 database with correct 2.5 prefix
It should be 1.5 prefix.
Hi Maxim,
when i rename my old VM tables in new 2.5 database with original old jos_ prefix I get this error.
QuoteWarning: 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)
Quote1. 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
You could pm me access and I could look into it. Phpmyadmin access is welcome also.
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.
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
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
Quote from: werian on November 01, 2012, 22:51:43 PM
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 (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:
(http://joomstuff.com/free/migration_images_vm1.png)
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:
(http://joomstuff.com/free/migration_images_vm1_success.png)
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?
Thanks! Saved me hours of work!
I use virtuemart 2.6 and I lost my additional images after migration, the above script didn't worked on me, any thoughts?
Please, please, please, upload the file again. Link in the first post does not work. :'(
Uploaded once more time.
Thank you very much!!! :)
Tell my if it works fine, cause I made this kind of code really long time ago.
Thank you. The plugin works. I'm happy)) Thank you very much :)
Hi! I've Joomla 2.5.6 and Virtuemart 2.0.0, but after 3 min of script work there is "I migrate 0 images". I've installed plugin, publish it, I have old and new DB with correct prefixes, safe_mode is OFF on the server. What can be reason?
solved! There were too many goods and images, so I had to divide a key SQL query to some parts and run them step by step. It works! Thank you!
i have tested it. It worked fine for me. Thanks for this
Hi,
The download link is down. Can it be uploaded again? Thanks in advance.
EDIT: Ive found a download link on the previous page. Works good, thanks!
I tested all links .. none of them is working. I remember I had downloaded that years back. And found i back in my hard drive's archives.
Here is the ZIP file attached.
Good day! This feature is actual for me now. I've installed plugin but cant execute it, link from first post doesnt work already.
plugins/system/vm1_additional_images_migrator/vm1_additional_images_migrator.php in browser doesnt run anything.
Someone can help me?
Thanks!