PDA

View Full Version : Extra Images



michael_s
08-16-2009, 01:12 PM
products_extra_images.php:

I was getting multiple listings displayed in the extra images list in the admin (catalog/admin/products_extra_images.php). I updated the products_extra_images_query_raw query around line 194 with a DISTINCT and GROUP BY clause to fix the problem.

There are also features such as specifying an image that is already uploaded that I commented out in the options box when adding/editing extra images. I simplified this section because it is too confusing for my clients.

I also updated the select box so that only products with names display.

html_output.php:

Also, I don't like how OS Commerce displays thumbnail images. I want them to be proportional to the actual size of the full image. So I have also included an updated catalog/admin/includes/functions/html_output.php that has an updated tep_image() function. If the passed image size is the same as the constant SMALL_IMAGE_WIDTH and an extra parameter $forced_unproportion is not set to true, then the image ratio is calculated based on configuration settings in the database table `configuration`. I have included the SQL to insert the new settings as well.

Hope someone finds this useful. Happy coding!

More... (http://addons.oscommerce.com/info/1289)