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)
-   -   Set size of image (https://forum.x-cart.com/showthread.php?t=15064)

kirsten 07-07-2005 02:41 PM

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

balinor 07-07-2005 02:48 PM

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"}

kirsten 07-07-2005 03:12 PM

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

balinor 07-07-2005 04:29 PM

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!


All times are GMT -8. The time now is 01:17 PM.

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