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

Image Size

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-31-2003, 04:05 AM
 
cartesio cartesio is offline
 

Member
  
Join Date: Jan 2003
Posts: 18
 

Default Image Size

Like change thumbnail image size of x cart

example: like every image of product tumbnail have this size 100 x 150

where is the .php or .tpl i take modify ?

Thanks
Reply With Quote
  #2  
Old 01-31-2003, 04:30 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

try this one

skin1/product_thumbnail.tpl
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 01-31-2003, 06:11 AM
 
cartesio cartesio is offline
 

Member
  
Join Date: Jan 2003
Posts: 18
 

Default

thank you,

Yes i test this modification

But when i set (example)
$image_x ne 100
and
$image_y ne 150
the image distort

the mystere ... if set 70 the image not distort

note my image as good set up
canvas 100*150
Reply With Quote
  #4  
Old 01-31-2003, 06:16 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

If your thumbnails are all the right size to start with (100x150) then you could change your skin1/product_thumbnail.tpl to this


Code:
{* $Id: product_thumbnail.tpl,v 1.4 2002/09/05 12:43:21 zorg Exp $ *} {if $config.General.show_thumbnails eq "Y"}[img]../image.php?productid={$productid}[/img]{/if}

In other word just remove the part that sets the size
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #5  
Old 02-26-2003, 12:39 PM
 
dez dez is offline
 

Member
  
Join Date: Oct 2002
Location: San Francisco
Posts: 22
 

Default Change thumbnail size

I have pictures that are 300 x 225 (I know a little large).
I want the thumbnails to be about half size.

The full image is too big and the small thumbs are too small
to see the details of my products. I need an in between.

i see that in / product_thumbnail.tpl there are some x and y variables
but I am not sure how to change these.

Since I've the same question and I don't see anyone replay, I thought I post this again.

original post:

http://forum.x-cart.com/viewtopic.php?t=2147&highlight=productthumbnail+tp l
Reply With Quote
  #6  
Old 02-26-2003, 01:28 PM
 
ATKOgirl ATKOgirl is offline
 

X-Adept
  
Join Date: Sep 2002
Posts: 448
 

Default

Hi,

You may be better off just setting the image x to 100 and not setting the y. This will maitain the image aspect ratio, resizing in aspect based on the width. If you set both x and y, and the settings do not maintain the original image aspect ratio, the image will be distorted.

Hope that helps,

ATKOgirl
__________________
X-Cart Versions: 4.1.10 and 4.2.0
Reply With Quote
  #7  
Old 02-26-2003, 06:34 PM
  BoomBoomBap's Avatar 
BoomBoomBap BoomBoomBap is offline
 

Senior Member
  
Join Date: Nov 2002
Location: San Francisco
Posts: 184
 

Default

Incidentally, I chatted with Dez and managed to solve this problem.

Go into the page customer/main/products.tpl and change the product_thumbnail include to something like this:


Code:
{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=150 image_y=150 product=$products[product].product}

where
x is width
y is length

As ATKO girl mentioned settings the y value isn't recommended unless all thumnails are exactly the same dimension. In this case remove image_y=150


Hope this helps...
__________________
Site 1 > XCART LIVE 3.4.12

Site 2 > XCART LIVE 4.0.17
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 01:40 AM.

   

 
X-Cart forums © 2001-2020