Thank you but I think that will just check to see if the original product >0, not the related product. Look at the related_products.tpl and we see it loops, looking at '$product_links[cat_num].productid' (of which, $product_links seems to be assigned by related_products.php).
Code:
{* $Id: related_products.tpl,v 1.10.2.1 2004/10/07 10:52:42 max Exp $ *}
{if $product_links ne ""}
{capture name=dialog}
<TABLE border="0" cellspacing="5">
{section name=cat_num loop=$product_links}
<TR class="ItemsList">
<TD width="1%">{$product_links.productid}</TD>
<TD width="99%">
{* SAFETYNET DSEFU MOD *}
{if $enable_seo_links == "Y"}
<A href="{seo_link prod_name=$product_links[cat_num].product prod_id=$product_links[cat_num].productid}"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
{$product_links[cat_num].product}
</A>
{else}
<A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
{ $product_links[cat_num].product}
</A>
{/if}
{* END SAFETYNET *}
</TD>
</TR>
{/section}
</TABLE>
{/capture}
{include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"}
{/if}
I think what I need is something like {if $product_links[cat_num].product.avail gt 0} but I know that syntax is not correct.... {if $product_links.avail gt 0} doesn't work either.
I opened a ticket with Xcart.