Hi Everyone,
I am currently working on a project migrating an existing project to nopCommerce 1.80. I've gone through and mapped most of the database tables but I've ran into a bit of a problem on the images.
Images are stored on the filesystem on the existing db. I installed nopCommerce, changed the setting to store images on the filesystem, copied over the existing images from the old ecommerce software and then went to figure out how the images are referenced.
I noticed that when stored on the filesystem an entry is created in the nop_Picture table and the picture is stored in the images folder with a name that matches the PictureID, so in my case I added an image and it got the id 173 in the db and the name 0000173_0.jpg on the file system.
On the old system images are named according to the sku followed by a picture size (t for thumbnails, s for smal, m for medium, l for large). A product image is referenced in the old db like '/images/d5789_m' for example. What would be the easiest way to import the old images into nopCommerce?
I was thinking about adding another column to Nop_Picture called Image_Location and inserting the values from the old db into that column. I would then write a program in c# that would look up all the image locations, find the file and rename it according to the PictureID. This seems like a lot of work to import the pictures. Any other suggestions or guidlines for the program I am thinking about writing if that is the only way?