View Single Post
  #2  
Old 11-05-2002, 10:20 PM
 
derrick92130 derrick92130 is offline
 

Advanced Member
  
Join Date: Nov 2002
Location: San Diego, California USA
Posts: 68
 

Default Default Image Sizes in Individual Product View

Couple of ways to deal with this. When the image is initially loaded into the xcart_products table, the /xcart/include/product_modify.php file calls get_image_size to determine the overall size, x and y dimensions of the image being loaded. That info is then stored in the xcart_products table.

When the product is being viewed (not the multi-product listing, but the individual product view) the dimensions are read from the xcart_products table and passed to the thumbnail program.

So, if you wanted to override the values stored, you could change the /xcart/skin1/customer/main/product.tpl file and change the variable to a constant (or to a variable defined in config.php, etc). This could cause a performance issue and picture quality issue since the customers browser will still need to download the entire image, then the browser will resize it using the sizing parameters. Visually, this dithering or compressing of the image could make the image look bad.

In one of the sites, I changed the value in the product.tpl file to be a static value (now defined in a global config file), and generally try to encourage my customer to adhere to resizing the image using PhotoShop, etc to match the size I specified prior to their uploading into the cart.

Hope this helps,
__________________
-Derrick
FreeRangeMinds, LLC
Reply With Quote