How to include pictures manually in the db

Didier31

Avatar: Didier31

2009-09-05 17:17

So, after a few days of work and tests and restore from backups and such, I finally succeeded to add more than 400 pictures to my site manually in one click (more or less).

problem recall
========

I imported 400 products by adding the proper lines to an export .csv file then imported back to QC. Last parameter should be null so that QC will generate an incremental product id for each product.

Now, I want to have these 400 products have their own picture and miniature.
This is what I did :

Solution
=====

a) gather the pictures
b) use a free utility to generate the miniatures in one click
c) upload the pix in the db/files/ folder
d) upload the miniatures in the db/files/100 folder
e) with EXCEL generate a sheet containing the following data (one line per product)

iFile (picture ID : should be last picture ID in db + 1)
iProduct (product ID : you know it from the exported .csv file)
sFileName (name of picture file, ex: foobar.jpg)
0 (empty field : legend of pix)
1 (boolean : picture exists for this product YES/NO)
0 (position of pix if many : 0 is first, 1 is second etc.)
1 (type : unknown parameter, always 0)
0 (size of miniature 100)
0 (size of miniature 200)
0 (placeholder to get a "$" at the end of each line)

Then save the sheet in .csv format,
then change all ";" to "$" character,
then change all $0$1$0$1$0$0$0 to $$1$0$1$$$

This should give for each line the following result (as an example) :
61$61$603246.jpg$$1$0$1$$$

Now I copy/pasted the whole list at the end of the db/xx_products_ext.php file and Bob is my Uncle.

Hope that helps.
Please ask questions in here for more.

» Quick.Cart v3.x

Didier31

Avatar: Didier31

2009-09-05 17:20

sorry, "unknown parameter" should be 1, not zero.

Back to top
about us | contact