Protect Images with Unlimited Images Per

for osCommerce Online Merchant v2.2

The biggest problem with osCommerce version 2 is that all images, whether for products, categories, manufacturers or built into osCommerce are stored in one huge folder which means newly uploaded images can overwrite other completely unrelated images if they happen to have the same file name as a previously loaded image. This contribution splits the images for categories, products and manufacturers into their own folders (as is done in osCommerce version 3) which gives protection against overwriting the stock osCommerce images. An unlimited number images can now be added to a product and each product gets its own folder for images (which is NOT done in osCommerce 3, at least as of alpha 5) which protects against the image of one product overwriting the image of another unrelated product if the file name for the image happens to be the same. Category and manufacturer images that are larger than the sizes defined in admin image configuration are resized down to fit and are protected from overwriting other category or manufacturer images by renaming the files to a unique name for each category and manufacturer. Thumbnail images are created for products to conserve download bandwidth for product listings. Uploaded images are first sent to a temporary folder and are then moved to final position only if the edit/create of a category, manufacturer or product is confirmed. This makes orphaned images that are left over because an edit was cancelled after an image was uploaded easy to find. Provision is also made for products to display a language determined "No Image Available" image or no image at all if the product is not a physical product. Also added are configuration variables to determine the maximum size of original product image to allow (those that are too large will automatically be resized down) and one to set the maximum number of images to display on the product information page. If a product has more images than are allowed on the information page a "View More Images" note will show linking to the new image viewing page so that all product images may be seen.

Files