X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Constraining height of product thumbnails (https://forum.x-cart.com/showthread.php?t=39446)

maw529 04-29-2008 06:09 PM

Constraining height of product thumbnails
 
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

carlisleglass 04-30-2008 12:37 AM

Re: Constraining height of product thumbnails
 
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.


All times are GMT -8. The time now is 07:24 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.