| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Constraining height of product thumbnails | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() So, i've been looking and looking for the height and width settings for the product thumbnails and have nearly torn my hair out looking. I know that on my site it constrains the width of the thumbnail, but not the height. I have constrained all of my thumbnails to 150 px X 150 px and they are displayed as the width being constrained to 90 px. If the width of the actual thumbnail is less than 90 px the picture is blown up to fit the already set 90 px width therefore pixelating the picture.
I need a remedy. I also wrote this kind of fast so if you need clarifying let me know! I've checked out product_thumbnail.tpl products.tpl products_t.tpl and can't seem to find anything to add a height constraint to the thumbs. Thanks, Mike
__________________
X-Cart DB Version: 4.1.9 GOLD |
|||||||
#2
|
|||||||||
|
|||||||||
![]() I went the next step and rewrote the image.php (thats the file which determines which image is needed to be display).
instead of just showing the image, I use GD (a php module) to redraw the image so it fits within a certain size, so I can specify this in the actual template e.g. ?width=75 also it makes the thumbnail less jaggy. The coding is a bit messy but works so I can help you with getting a similar thing working but I wouldn't want to give you my actual coding cause it probrably wouldn't mean anything to you. Also cause all images are getting re-processed when the page is loaded, you need a good server to do it, unless you will get server lag. Carlisle Glass has a dedicated server so this isn't a issue.
__________________
Darren Kierman Carlisle Glass (http://www.carlisleglass.co.uk/) ... running X-Cart Gold 4.4.5 [unix] |
|||||||||
|
|||
X-Cart forums © 2001-2020
|