View Single Post
  #2  
Old 01-11-2008, 04:55 AM
 
mistaegoista mistaegoista is offline
 

Member
  
Join Date: Nov 2007
Posts: 20
 

Default Re: Hiding Feature Comparison Tabbed Menu Item

Simple.

You just say in your template: if there is a value in the feature comparison field, display it (otherwise the field will be automatically ignored).

The code taken from product.tpl should be like something this:

{if $v.value}
<tr>
<td width="30%" valign="top">{$v.option_name}</td>
<td>
{if $v.option_type eq 'S'}
{$v.variants[$v.value].name}
{elseif $v.option_type eq 'M'}
{foreach from=$v.variants item=o}
{if $o.selected ne ''}{$o.name}<br />{/if}
{/foreach}
{elseif $v.option_type eq 'B'}
{if $v.value eq 'Y'}{$lng.lbl_yes}{else}{$lng.lbl_no}{/if}
{elseif ($v.option_type eq 'N' || $v.option_type eq 'D') && $v.value ne ''}
{$v.formated_value}
{else}
{$v.value|replace:"\n":"<br />"}
{/if}
</td>
</tr>
{/if}

All you have to do is encapsulate the feature comparison field within the bold code, as shown above.

Hope that helps!

Regards, mE
__________________
X-Cart PRO v4.1.9
Reply With Quote