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

Set size of image

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-07-2005, 02:41 PM
 
kirsten kirsten is offline
 

Senior Member
  
Join Date: Feb 2005
Location: Sydney, Australia
Posts: 104
 

Default Set size of image

Does anyone know if there is a way to set the size of the image that is shown on the product details page. I would like to have that image set with a width of 200. I know that the product details page draws the thumnail pic but I want the thumnail pic to be resized so it will be displayed at 200.
Any ideas on how to do this?
Thanx
Kirsten
__________________
Kirsten
X_Cart Gold Version 4.0.11
www.silverimports.com.au
www.diamondimports.com.au
Reply With Quote
  #2  
Old 07-07-2005, 02:48 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You can force it to resize in one direction (x or y) by altering this code. I'll use the X direction as an example. Change this:

Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"}

to this:

Code:
{include file="product_thumbnail.tpl" productid=$product.productid image_x=200 image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail"}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-07-2005, 03:12 PM
 
kirsten kirsten is offline
 

Senior Member
  
Join Date: Feb 2005
Location: Sydney, Australia
Posts: 104
 

Default

Okay thast worked for what I wanted but it is not going to work for what I wanted. I was trying to avoid having to reload all my pics again. I know you can have a separate image for the thumbnail and detailed image pop-up but can you have another image that is sized to the right size you need for the detailed product view in the product.tpl?
Or should I just make sure that the size I want to be showed in the product.tpl is the size I load for the thumbnail as long as it looks okay when it is resized down for the thumbnail?
What is the best way to handle this?
Regards
Kirsten
__________________
Kirsten
X_Cart Gold Version 4.0.11
www.silverimports.com.au
www.diamondimports.com.au
Reply With Quote
  #4  
Old 07-07-2005, 04:29 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Ideally, you should size the thumbanil to the size you want it displayed in the product detail page. Problem is, if the thumbnail size on the product list is much smaller, it looks distored when scaled too much.

One way around this is to simply code in a third image to the product description and remove the thumbnail image from the product template all together.

Hope this helps!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
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:09 AM.

   

 
X-Cart forums © 2001-2020