Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Making all product images the same size?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-05-2002, 05:12 PM
 
Tricker Tricker is offline
 

Newbie
  
Join Date: Nov 2002
Posts: 9
 

Default Making all product images the same size?

I need to put some html into the code that displays all the images submitted at a specific size. What file do I mod for this? If you look at this... http://www.kandkcollectibles.com/store/customer/product.php?productid=16228&cat=&page= you will see how the image is so big it runs off other info... so i need to make all images a default smaller size via width= and height=...Thanks!
Reply With Quote
  #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
  #3  
Old 11-05-2002, 10:59 PM
 
Tricker Tricker is offline
 

Newbie
  
Join Date: Nov 2002
Posts: 9
 

Default

thx man all his pics are 640x480 so i just made them scale down to 320x 240 and it keeps perfect picture quality..works great..im starting to get used to how this template engine works now, just lots of places to look.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:38 PM.

   

 
X-Cart forums © 2001-2020