View Single Post
  #7  
Old 03-04-2008, 11:56 AM
 
brocillator brocillator is offline
 

Newbie
  
Join Date: Sep 2007
Location: Florida, USA
Posts: 8
 

Default Re: change image size on wishlist?

billc, what I ended up doing was this:

Edit skin1/modules/Wishlist/wl_products.tpl

Find {section name=product loop=$wl_products} on the page, and below it is:

<a href="product.php?productid={$wl_products[product].productid}&amp;quantity={$wl_products[product].amount}">
{if $wl_products[product].is_pimage eq 'W' }{assign var="imageid" value=$wl_products[product].variantid}{else}
{assign var="imageid" value=$wl_products[product].productid}{/if}
{include file="product_thumbnail.tpl" productid=$imageid image_x=$wl_products[product].pimage_x
image_y=$wl_products[product].pimage_y product=$wl_products[product].product tmbn_url=$wl_products[product].pimage_url type=$wl_products[product].is_pimage}</a>&nbsp;

change to:

<a href="product.php?productid={$wl_products[product].productid}&amp;quantity={$wl_products[product].amount}">
{if $wl_products[product].is_timage eq 'W' }{assign var="imageid" value=$wl_products[product].variantid}{else}
{assign var="imageid" value=$wl_products[product].productid}{/if}
{include file="product_thumbwish.tpl" productid=$imageid image_x=$wl_products[product].timage_x
image_y=$wl_products[product].timage_y product=$wl_products[product].product tmbn_url=$wl_products[product].timage_url type=$wl_products[product].is_timage}</a>

Then, I created skin1/product_thumbwish.tpl and put the following code:

{* $Id: product_thumbwish.tpl,v 1.19 2005/11/17 06:55:36 max Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y"}<img{if $id ne ''} id="{$id}"{/if} class="productthumbwish" src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$produc tid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />{/if}


-------
Note: class="productthumbwish" on skin1/product_thumbwish.tpl is my own CSS stylesheet (I turned my store into table-less CSS layout) - so choose your own style.

-------

If you "View Image" of the wishist thumb in your browser, the URL will look like: yourdomain.com/store/image.php?type=T&id=6
Whereas, on the products.tpl generated pages (search results, category thumbs) the URL is yourdomain.com/store/images/T/thumbimage.jpg

I don't know what it's doing, or why, but at least there are now actual thumb-size instead of modified full-size on the Wishlist page. Simply smashing the size of a full-size image into a 75px space looked terrible on some browsers.
__________________
X-Cart Gold 4.1.8
AOM 4.1.8
Apache 1.3.37 (Unix)
OS Linux
PHP 5.2.3
SQL 5.0.45
Reply With Quote