Community Add-Ons

Maintainers: wdepot
Add file to this package
Top » Images

Protect Images with Unlimited Images Per Product
for osCommerce Online Merchant v2.2

This add-on is register_globals compatible

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.

Legend:  Download   Report

Expand All / Collapse All

Protected Images with Unlimited Images Per Product wdepot 27 May 2011  

I discovered after finally moving my revised osCommerce from my test server to the production server that the display of catalog side images failed on the admin side because allow_url_fopen was turned off. I've revised the instructions to work on any server whether allow_url_fopen is on or off.

I've also modified the display of images on the catalog side product page (product_info.php) so that the default image for the product will always be displayed first.

Complete install attached with update instructions.

Protect Images with Unlimited Images Per Product wdepot 12 Nov 2010  
Protect Images with Unlimited Images Per Product wdepot 29 Oct 2010  
Protect Images with Unlimited Images Per Product wdepot 21 Sep 2010  
Protect Images with Unlimited Images Per Product wdepot 9 Sep 2010  
Protect Images with Unlimited Images Per Product wdepot 8 Sep 2010  
Unexpected Overwrite Protected Images with Unlimited Images Per Product wdepot 5 Aug 2010  
Unexpected Overwrite Protected Images with Unlimited Images Per Product wdepot 4 Aug 2010  
Unexpected Overwrite Protected Images with Unlimited Images Per Product wdepot 29 Jul 2010  
Protect Images with Unlimited Images Per Product wdepot 24 Jul 2010