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

Image Resizing

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-09-2004, 12:25 PM
 
elabdesigns elabdesigns is offline
 

Advanced Member
  
Join Date: May 2003
Location: Mount Airy, NC
Posts: 66
 

Default Image Resizing

I am building a site for a client using x-cart 4.0.6 gold. Once I customize the site to their liking, they will mantain the site. Not that uncommon right?

Well I have ran into a bit of a problem. When you add a product and select an image for the product, my client will not know how to resize their image to fit my design scale. So if my client imports a 680x420 image and I need the image to be no bigger than 150 wide, how can I make the cart resize the image for them. Kinda like the thumbnail view on the category listing, but not destort it? Does anyone have a why to rescale the image once they click on a product (/product.php?productid=2&cat=13&page=1)

Also, does anyone know how to make a three column product category listing rather than the default one product under the other listing? Nevermind, sorry found that. What file do I edit to change the appearance of the multi-column lists? products.tpl?

Thanks
Reply With Quote
  #2  
Old 11-09-2004, 02:21 PM
  shan's Avatar 
shan shan is offline
 

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

Default

products_t.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 11-09-2004, 02:35 PM
 
emil emil is offline
 

Newbie
  
Join Date: Aug 2004
Posts: 8
 

Default

hi,

for the image sizing,

try to adding the code with (width="150") in the image tags where the image appears and remove the smarty tags that input the image widths.

eg, in the file product_thumnail.tpl

Quote:
{* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}[img]{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}[/img]{/if}

try to change the code to:
Quote:
{* $Id: product_thumbnail.tpl,v 1.14 2004/06/24 09:53:29 max Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}[img]{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}[/img]{/if}

you also may need to create your own image tpl file since changing the above template also affects your products list
__________________
Happy Dayz
--------------------------------------
www.sefama-vega.com (3.4.13)
--------------------------------------
under dev(V3.5.9)
under dev(V4.0.5)
Reply With Quote
  #4  
Old 11-09-2004, 03:28 PM
  shan's Avatar 
shan shan is offline
 

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

Default

having them upload massive files wioll screw up the performance of the store.

get some freeware software that resizes images and teach them how to do it properly.
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
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 12:34 PM.

   

 
X-Cart forums © 2001-2020