VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: achilleas on March 13, 2012, 01:35:44 AM

Title: Migrate additional images
Post by: achilleas on March 13, 2012, 01:35:44 AM
I know that with the standard migration, additional images of a product cannot migrate (from 1.1.9 to 2).

Is there any way (easy or hard) or workaround to do a migration?

I have a shop with 900+ products and every product has more than 4 additional images...
The one by one procedure will take me years!

Thank you in advance
Title: Re: Migrate additional images
Post by: BigAlStorm on March 13, 2012, 02:04:33 AM
im looking at the structure in the database of the additional images and how the sql fields link tot he products

Once ive worked out how it does it ill look at the old format and see If I cant make some sql with lots of edits to convert the old data to new

Wont be impossible unless something new has been introduced

Al
Title: Re: Migrate additional images
Post by: achilleas on March 13, 2012, 02:20:03 AM
I'm working on it on my side. Thanks for your reply.
Waiting for any news!
Title: Re: Migrate additional images
Post by: achilleas on March 13, 2012, 02:43:27 AM
So I try the CSVI for VM 1.1.9
I have a csv file for every product with

SKU code - photo filename - photo title - photo description - photo url - photo published state

the sku code is unique. Also the photo filename

I'm not that good in php. Let's say that I store the data from the CSV to a table eg jos_old_add_img
The structure of the php is something like this:

LOOP   the jos_old_add_img
_Read the SKU code
__SEARCH the jos_virtuemart_products for that SKU and GET the product id
_Read the photo filename
__SEARCH the jos_virtuemart_medias in file_title for photo filename and GET media id
_Write in jos_virtuemart_product_medias the photo id and media id and ordering +1
END LOOP

I think it's not that difficult for a php programmer
Title: Re: Migrate additional images
Post by: BigAlStorm on March 13, 2012, 03:09:53 AM
I dont even think php will be needed as any one who migrated has the old tables in the database already

SQl should be enough, ill run a sample with fresh eyes in the morning

Been getting all my plugins working :)
Al
Title: Re: Migrate additional images
Post by: achilleas on March 14, 2012, 11:49:52 AM
Big do you have any news?
Title: Re: Migrate additional images
Post by: Petrus on March 16, 2012, 12:57:47 PM
Achilleas, from where do you know additional images to a product can't migrate?
I have the same problem, no images at all frontend/backend but in database all link to images are okay.
Title: Re: Migrate additional images
Post by: achilleas on March 16, 2012, 16:05:52 PM
According to the developers, when migrating from 1 to VM 2 additional images don't migrate. Just the basic photo of the product.
Excuse me if I am wrong.
Title: Re: Migrate additional images
Post by: Petrus on March 18, 2012, 23:48:32 PM
no, i don't say your wrong, excuse me my bad english.
I haven't manage to get a single images with me from 1.9 to 2.0.2
so im very surprised its possible, so many ask for that here but no answere to use, how did you do that if i may ask?