View Single Post
  #3  
Old 02-05-2007, 02:06 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: Mfr. Image if No Product Image in Listing Results

Here's the coding so it will work in v4.1.x branch (and its a lot easier, no need to edit any PHP files). I can confirm it works in v4.1.6 (Latest version).

1) Edit skin1/product_thumbnail.tpl and replace its contents with:
Code:
{* $Id: product_thumbnail.tpl,v 1.19 2005/11/17 06:55:36 max Exp $ *} {if $config.Appearance.show_thumbnails eq "Y"} {if $manufacturer && $tmbn_url eq ""}<img src="{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?id={$manufacturer}&amp;type=M" {if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}"> {else} {if $thmb_url} <img src="{$tmbn_url}"> {else} <img {if $id ne ''} id="{$id}"{/if} 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={$productid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" /> {/if} {/if} {/if}
2) In products.tpl add the following code just before the } at the end of the {include file="product_thumbnail.tpl" statement :
Code:
manufacturer=$products[product].manufacturers
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote