| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Making all product images the same size? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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!
|
|||||||
#2
|
|||||||
|
|||||||
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 |
|||||||
#3
|
|||||||
|
|||||||
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.
|
|||||||
|
|||
X-Cart forums © 2001-2020
|