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

Constraining height of product thumbnails

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-29-2008, 06:09 PM
 
maw529 maw529 is offline
 

Newbie
  
Join Date: Jan 2008
Posts: 4
 

Default 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
__________________
X-Cart DB Version: 4.1.9 GOLD
Reply With Quote
  #2  
Old 04-30-2008, 12:37 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default 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.
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
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 02:33 PM.

   

 
X-Cart forums © 2001-2020