Using the features built into Zen Cart, I have setup photo upload on a number of products in my store.

What I would like to do next is show a preview of that image in the shopping cart for the item in question, so that the customer *knows* the website has received it.

Also, I am concerned with people uploading images, and then not completing checkout (I don't need 93287432974 images on my server that serve no purpose). I did a test, uploaded a photo (the uploading actually occurs when you click Add to Cart), then deleted the item from my cart. I refreshed the directory in my FTP client, and the uploaded image did not disappear.

It's very easy to delete a file with PHP, so my question is, has someone already done this or is there a mod I do not know about? I don't mind doing it myself if not, but if I can get around reinventing the wheel, I'm all for it.

I'm okay with images staying in the upload directory if the person just doesn't checkout but leaves the item in their cart - that way it will be there when they return, but if they delete the item from their cart, I want to get rid of that image as well.

I'm thinking the preview of the uploaded image in the cart will be the easiest, it already displays the filename (even though the filename displayed is incorrect and misleading by default). I do not know why they couldn't let the uploaded image retain it's original name, or either just display 1.jpg, 2.jpg, etc., instead this weird format to display in the cart, which is 1.<old name here>.jpg...lol...*sigh*

Anyway, if I have to do it myself, I'll post the walk through.