PDA

View Full Version : Removing product images


lisrael
January 26th, 2004, 06:36 AM
I'm trying to remove product images.

I found the post from several months ago (in this thread0, but the procedure described doesn't work. I had never created (or uploaded) any images for this particular product. When I go in via phpMyAdmin, the 4 image fields for that product are already blank. (This, despite the fact that the DB structure defines these 4 fields as not null... hmmm, what's up with that?)

Posted Last February:
At this time, images are only removed when a product is deleted. A function to remove a product image, without deleting the product itself, is planned for a future release.

Has this happened? Has the function been added?

Actually, we don't expect to use images for any of our products. Is there a way to disable them entirely, for ALL products?

Larry

Rich
February 4th, 2004, 03:33 PM
Hi Larry,

I've split your post from the original thread since it covers a different subject matter (although it's close).

With the new releases of Squirrelcart (v1.3.0 and higher) you now have better control over a product's images. To remove an image for a product, view that product in the control panel. You'll see a small eraser icon next to each image field. Click it to clear the field, then submit the record. The images for that product will change to the default "No photo available" image.

To remove images entirely you'll need to create a custom theme (if you haven't already done so, refer to the documentation for creating a theme) and edit the template files which display the images you wish to remove. The template files, along with the tags within them, have been named so they are somewhat self explanatory.

For example, to remove the main image for a product you would edit the show_product_detail.php template file and remove this section of code:


<?=$Image_in_Large_Image_Link?>
That tag would normally display the image for a product which links to that product's larger image.

You would also have to make similiar changes within the category templates and the check out page templates so the thumnails are not displayed.

If you have a question regarding which template to edit for the different sections of the cart, or a question about anything else, please let us know.