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

Hiding Feature Comparison Tabbed Menu Item

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-30-2007, 03:20 AM
  wardworth's Avatar 
wardworth wardworth is offline
 

Advanced Member
  
Join Date: Sep 2007
Posts: 78
 

Default Hiding Feature Comparison Tabbed Menu Item

Hi,

I have modified my product.tpl so that all of my feature comparison fields and values appear in a tabbed menu below rather than in the actual product.tpl.

However, some of the products do not have feature comparison fields and values therefore I would like to hide the feature comparison tab and content if these fields and values are empty. How do I go about doing this?
__________________
:: Wardworth Ltd
:: X-Cart 4.1.8
Reply With Quote
  #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
  #3  
Old 08-05-2010, 01:33 PM
 
Tdeviant Tdeviant is offline
 

Member
  
Join Date: Jul 2010
Posts: 25
 

Default Re: Hiding Feature Comparison Tabbed Menu Item

Hi i am having a similar problem, I wish to hide all the fields that say: No, None or have a boolean no, from the product description page, please help

http://sleepywings.co.uk/home.php?shopkey=123

http://sleepywings.co.uk/Shorty-2.html
__________________
Helping the world turn
X-Cart version 4.3.2
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 11:03 AM.

   

 
X-Cart forums © 2001-2020