Forums / Setting Up Categories, Products, Attributes / Mass Upload/Insert of Product Images

Mass Upload/Insert of Product Images

Started by dharris0211 on 11 May 2012, 5:26 PM · Views: 2,702

Results 1 to 6 of 6
11 May 2012, 5:26 PM
#1
dharris0211 avatar

dharris0211

New Zenner

Join Date:
Feb 2012
Posts:
9
Plugin Contributions:
0

Mass Upload/Insert of Product Images

Hello, I have been trying to figure out how to mass upload and insert my images so I don't have to upload them one by one. I finally found out how and was so excited so I thought I would share for others.

The key lies in the product model number, and the image name--they have to be the same!

Not sure how others get their images but I save my images from the products on the drop-shipping company I use. When I save, I name the file the id number (which is considered the model number for the product in my store). When all the images are saved, I used my FTP client (coreftp) to upload them to my server.

I download the data export my my dropshipping company. The model number that is already set in the field "v_products_model", is the same number that I name the image that goes with that item (as stated above). I sort the list of product numbers from least to greatest and copy and paste them in notepad (or word, doesn't matter). I then write .jpg (which is my image type) at the end of every product number. I recopy that updated list and insert them in data export csv file using OpenOffice. Then I use easypopulate 4.0 to upload the csv file (products). And that's it! Go to your store and you will see all the products you uploaded with their images.

Note
When I try to save the edited csv file, it doesn't save in csv format and it doesn't upload in easypopulate. What I do is save it as some other type of file, then re-save it as a csv file. Then it uploads in easypopulate just fine.

I am sure there is a much simpler way to do some of these things but I haven't figured it out yet (suggestions are welcomed:yes:)

How ever you do it, remember the image name has to be the same as the model number.

11 May 2012, 6:27 PM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,814
Plugin Contributions:
24

Re: Mass Upload/Insert of Product Images

dharris0211:

How ever you do it, remember the image name has to be the same as the model number.

Not exactly true.

This all depends on what the supplier's spreadsheet looks like. If you get a spreadsheet that has a product_model (or SKU or whatever) column and image name column, those don't necessarily need to match. You're most welcome to have model number AX8479 and image name green_shirt.jpg, just as long as you keep it in the same row.

If your supplier use product_model as image name, that's great, but it doesn't really matter.

BTW, I hope you're not really typing .jpg at the end of each product number. Try the following in OpenOffice:

  1. use a new spreadsheet and paste all your model numbers to column A (starting at A1, of course)
  2. type .jpg to cell B1
  3. select cells B1 to Bxx according to how many rows you're using in model number
  4. go to Edit->Fill->Down
  5. go to cell C1 and type =A1&B1
  6. select cells C1 to Cxx
  7. go to Edit->Fill->Down
  8. now that you have this list, copy the C column to notepad and then copy/paste from notepad to your EasyPopulate spreadsheet

Have fun!

My site - Pro ZC Help
My portfolio | My plugins

11 May 2012, 8:20 PM
#3
dharris0211 avatar

dharris0211

New Zenner

Join Date:
Feb 2012
Posts:
9
Plugin Contributions:
0

Re: Mass Upload/Insert of Product Images

balihr:

Not exactly true.

This all depends on what the supplier's spreadsheet looks like. If you get a spreadsheet that has a product_model (or SKU or whatever) column and image name column, those don't necessarily need to match. You're most welcome to have model number AX8479 and image name green_shirt.jpg, just as long as you keep it in the same row.

If your supplier use product_model as image name, that's great, but it doesn't really matter.

BTW, I hope you're not really typing .jpg at the end of each product number. Try the following in OpenOffice:

  1. use a new spreadsheet and paste all your model numbers to column A (starting at A1, of course)
  2. type .jpg to cell B1
  3. select cells B1 to Bxx according to how many rows you're using in model number
  4. go to Edit->Fill->Down
  5. go to cell C1 and type =A1&B1
  6. select cells C1 to Cxx
  7. go to Edit->Fill->Down
  8. now that you have this list, copy the C column to notepad and then copy/paste from notepad to your EasyPopulate spreadsheet

Have fun!

I couldn't find specific help and it was frustrating figuring this out. I tried what you said (different image name from product_model) and it worked. I don't know what I was doing wrong before but I'm just glad it works.

I knew there was an easier way, thank you!

17 Aug 2013, 1:21 AM
#4
shermanhdc avatar

shermanhdc

New Zenner

Join Date:
Aug 2013
Location:
NW Indiana
Posts:
1
Plugin Contributions:
0

Re: Mass Upload/Insert of Product Images

Ok, I've been beating my head trying to get this very thing done. I have 10k products and images. I don't really need my product model # because not all comic books have a unique barcode (barcodes are a more recent development) and the collection software/site management tool we use to catalog them doesn't have a unique number for EVERY book either, Heck, Not even every book has a JPG, so no matter what I do its a nightmare for me with the model number /sigh.

Regardless.... under the column V_products_image I've been trying to put where I already uploaded the jpeg to ie, /shopping_cart/images/comics/XMenUniversePastPresent19163_f.jpg

What do you put in this line? Just your *.jpg name? or the path to it? What do you put under v_products_model? Just the *.jpg name again or the entire path?

dharris0211:

Hello, I have been trying to figure out how to mass upload and insert my images so I don't have to upload them one by one. I finally found out how and was so excited so I thought I would share for others.

The key lies in the product model number, and the image name--they have to be the same!

Not sure how others get their images but I save my images from the products on the drop-shipping company I use. When I save, I name the file the id number (which is considered the model number for the product in my store). When all the images are saved, I used my FTP client (coreftp) to upload them to my server.

I download the data export my my dropshipping company. The model number that is already set in the field "v_products_model", is the same number that I name the image that goes with that item (as stated above). I sort the list of product numbers from least to greatest and copy and paste them in notepad (or word, doesn't matter). I then write .jpg (which is my image type) at the end of every product number. I recopy that updated list and insert them in data export csv file using OpenOffice. Then I use easypopulate 4.0 to upload the csv file (products). And that's it! Go to your store and you will see all the products you uploaded with their images.

Note
When I try to save the edited csv file, it doesn't save in csv format and it doesn't upload in easypopulate. What I do is save it as some other type of file, then re-save it as a csv file. Then it uploads in easypopulate just fine.

I am sure there is a much simpler way to do some of these things but I haven't figured it out yet (suggestions are welcomed:yes:)

How ever you do it, remember the image name has to be the same as the model number.

17 Aug 2013, 1:29 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Mass Upload/Insert of Product Images

ShermanHDC:

Regardless.... under the column V_products_image I've been trying to put where I already uploaded the jpeg to ie, /shopping_cart/images/comics/XMenUniversePastPresent19163_f.jpg

What do you put in this line? Just your *.jpg name? or the path to it?
In an un-modified Zen Cart site (ya, that means I'm NOT referring to anything discussed in this thread, I'm referring to ORIGINAL Zen Cart functionality), the products_image field contains the path to the image, relative to your store's /images/ folder.
So, if your image has been uploaded to /shopping_cart/images/comics/XMenUniversePastPresent19163_f.jpg then your /images/ folder is the /shopping_cart/images/ part, and thus the products_image field would need to contain comics/XMenUniversePastPresent19163_f.jpg
That's what Zen Cart does when you use the built-in image management features in the Admin.
If you're trying to write your own tool to do that same thing, then you should always start with determining how the system works first, and replicate that.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Aug 2013, 2:00 AM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Mass Upload/Insert of Product Images

Remember... if you are using EasyPopulate to write the data to the database, the contents of v_products_image column is just a STRING OF TEXT... it is not the actual image.

As DrByte says, zencart is programmed to "parse" the database's image reference into the compiled html for the products' images.

What does this mean, exactly???

Zencart "builds" the relevant html using PHP, and for product images, the php works something like this:-

The basic html structure to reference an image is <img src="path/to/your/image" />.

Zencart will "construct" this bit of html as follows: <img src="images/[then whatever TEXT STRING is contained in the database]" /> .

I have simplified this a bit to illustrate the principle, but the red text is what needs to be in your v_products_image column.

So if you have a SUB-DIRECTORY in the main images folder, into which the actual images (jpg's) are housed, then your v_products_image column MUST also state that directory.

In your case, you have put the jpg's into a sub-directory called "comics" - so your TEXT STRING in the v_products_image column should be:

v_products_image
comics/firstimage.jpg
comics/secondimage.jpg
comics/thirdimage.jpg
comics/fourthimage.jpg

When the php compiles the image reference, it then looks like this:

<img src="images/comics/firstimage.jpg" />