Image Thumbnailing Hack ======================= This hack gives more sophisticated, HTML aware, handling of product images. You an specify the type of image you require in your database, with four options possible at present: thumb A thumbnail image which references a larger version image An image file with no related thumbnail text A text string, to be displayed instead of an image (blank) No image This hack also allows you to refer to image file names without needing to include HTML within your database file. Currently, if you use the 'thumb' option, a hyperlink will be created to large_, eg foo.jpg will link to large_foo.jpg. Of course to have the large image filename come from the database would not be much work (for someone...) I have this hack working, but have not tested this document, so if you have difficulties with it, let me know and I will send any corrections. This hack requires XXX files to be modified, as follows: web_store.setup.db ================== Below the line: $sc_order_script_url = ... add: $sc_product_image_url = "/productimages/"; To your database definition, add another field for imagetype, eg: ... $db{"image"} = 4; $db{"imagetype"} = 5; $db{"description"} = 6; ... After the line: $sc_db_index_of_price = $db{"price"}; add: $sc_db_index_of_image = $db{"image"}; $sc_db_index_of_imagetype = $db{"imagetype"}; data.file ========= Add another field to your database file, with one of the following options for each product: image/thumb/text/(blank) web_store.cgi ============= Seek the section: if ($display_index == $sc_db_index_of_price) { $temp_fields[$sc_db_index_of_price] = &display_price($temp_fields[$sc_db_index_of_price]); } Add immediately afterwards: if ($display_index == $sc_db_index_of_image) { if ($temp_fields[$sc_db_index_of_imagetype] eq "image") { $temp_fields[$sc_db_index_of_image]="\"Product"; } elsif ($temp_fields[$sc_db_index_of_imagetype] eq "thumb") { $temp_fields[$sc_db_index_of_image]="\"Product"; } elsif ($temp_fields[$sc_db_index_of_imagetype] eq "text") { $temp_fields[$sc_db_index_of_image]=$temp_fields[$sc_db_in dex_of_image]; } else { $temp_fields[$sc_db_index_of_image]=""; } }