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

turn off auto size of thumbnails - rewrite needed

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-30-2008, 03:07 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default turn off auto size of thumbnails - rewrite needed

Hi,

I recently upgradesd from 4.0.19 to 4.1.10. I used to have the auto thumbnail size disabled as it meeses up my thumbnails.

X cart support handed me this code in the past to edit into /product_thumbnail.tpl

{* $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}


how can i adjust this to work in 4.1.10??? right now it's not functioning as it should
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #2  
Old 06-30-2008, 04:57 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: turn off auto size of thumbnails - rewrite needed

Have you tried using the standard product_thumbnail.tpl from 4.1.10? It doesn't appear to resize the "T" thumbnail. One of the problems with upgrading is that x-cart no longer uses the "files" folder but uses the "root/images" subfolders for product images and thumbnails. The code you have doesn't take this into account.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #3  
Old 06-30-2008, 05:44 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default Re: turn off auto size of thumbnails - rewrite needed

i tried. I want to override the setting for thumbnail size in the general settings, the support team gave me the code above in the past which obviously does not work anymore...

I need a rewrite of that code to meet the new standards, so with the modification you gave.. can you do that?
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #4  
Old 06-30-2008, 06:10 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: turn off auto size of thumbnails - rewrite needed

Well, the only difference I see is the part that has been commented out in your old code
{*{if $image_x ne 0} width="{$image_x}"{/if}
{if $image_y ne 0} height="{$image_y}"{/if}
*}
and
{$xcart_web_dir}{/if}/image.php?productid={$productid}
being changed to
{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$produc tid}
in the new code. The $type..."T" is the part that tells x-cart what image type and where to look for the image I believe.
I'm not sure what it is that you are trying to accomplish since even in the code that you got from x-cart the image size is undefined. Is it defined elsewhere, another template perhaps?
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote
  #5  
Old 07-01-2008, 12:42 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default Re: turn off auto size of thumbnails - rewrite needed

Idea is to have no image size definded as the support gave me the code for in the past. My thumbnails are perfect as i create them, i don't want any resize option which is default in xcart
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #6  
Old 07-01-2008, 05:28 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default Re: turn off auto size of thumbnails - rewrite needed

I fixed this simply by removing the image width variable from the products template.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #7  
Old 07-01-2008, 11:35 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default Re: turn off auto size of thumbnails - rewrite needed

if all things could be so simple
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #8  
Old 07-23-2008, 12:51 PM
 
stagshop stagshop is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 32
 

Default Re: turn off auto size of thumbnails - rewrite needed

We're having the same problem on our site. We recently upgraded, and I went into the Appearance Options earlier today to fix something else unrelated, and it forced me to input a value in the "Product Width" field (couldn't be blank, or zero).

Our thumbnails are varying in size, however I did standardize a sizing for them (max 120 pixels wide AND max 100 pixels high), but now that the width adjuster thing is active, the tall thumbnails are way too large and the wide ones are too small.
__________________
x-cart v 4.5.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:26 PM.

   

 
X-Cart forums © 2001-2020