| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Define Thumbnail Height, Not Width | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello,
Is anyone aware of how to define the Thumbnail by Height and not width ? Any assistance is appreciated. James
__________________
X-Cart Pro 4.1.9 FreeBSD Apache MySQL 5 PHP 4.4.8 |
|||||||
#2
|
|||||||
|
|||||||
![]() Just edit product_thumbnail.tpl and hard-code the height in there.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() Quote:
I have had a look at product_thumbnail.tpl and I made the following changes: Original File: {* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *} {if $config.Appearance.show_thumbnails eq "Y"}<IMG id="{$id}" src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" border="0">{/if} Modified File: {* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *} {if $config.Appearance.show_thumbnails eq "Y"}<IMG id="{$id}" src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?productid={$productid}{if $file_upload_data.file_path}&tmp=y{/if}{/if}"{if $image_x ne 0} height="{$image_x}"{/if}{if $image_y ne 0} width="{$image_y}"{/if} alt="{$product|escape}" border="0">{/if} You will notice in the modified file I have changed width="{$image_x}" to height="{$image_x}" and height="{$image_y}" to width="{$image_y}" This did change the thumbnail height based on the width setting in the 'Appearance Options' however this resizes the thumb image in the product description which was not the case before. Does anyone know how to modify the script so that only the thumb images are re sized in the directory listings etc and not in the product description ? I find it strange that the thumb image in the product description is re sized after I make this change as it was not re sized with the original script. Any assistance appreciated. James
__________________
X-Cart Pro 4.1.9 FreeBSD Apache MySQL 5 PHP 4.4.8 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Anyone got an answer to James' question? I could definately use this particular fix as the thumbnails our company provides us with are varried in size and some of them are far longer than they are wide and being able to set the height instead of width would fix the issue completely.
Thanks!
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() *polite bump*
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#6
|
|||||||
|
|||||||
![]() Hi,
I ended up obtaining a custom image resize modification from Qualiteam which also ensures that the image does not appear jagged or degraded in quality. The modification basically creates a new thumb nail and detailed image and resizes them to specification. I think it uses GDLib on apache. I am sure that there will be other mods out there that do something similar. Regards, James Long
__________________
X-Cart Pro 4.1.9 FreeBSD Apache MySQL 5 PHP 4.4.8 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() Quote:
Open file skin1/customer/main/products.tpl (products_t.tpl) and find next line: for products.tpl PHP Code:
for products_t.tpl PHP Code:
change this line by this: image_y=250 (fixed height for thumbnail) for products.tpl PHP Code:
for products_t.tpl PHP Code:
ps. File " product_thumbnail.tp" does not need to change!!!! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|