| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Hiding Feature Comparison Tabbed Menu Item | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#2
|
|||||||
|
|||||||
![]() 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 |
|||||||
#3
|
|||||||
|
|||||||
![]() 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 |
|||||||
|
|||
X-Cart forums © 2001-2020
|