hi
please clarify you said
For example, you could add such line at the end:
<?php $this->done_once = true; ?>
where in block_custom_main should i add this file? tried adding it at the end of the file but nothing happened ? where should i add the code above?
<span id="hikashop_product_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_product_custom_value">
<?php echo $this->fieldsClass->show($oneExtraField,$value); ?>
</span>
</td>
</tr>
<?php
}
}
$specifFields = ob_get_clean();
if($displayTitle){
?>
<!------- sample display field for contol ------>
<?php $this->done_once = true; ?>
<!------- end display field for control ------>
<div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main">
<h4><?php echo JText::_('SPECIFICATIONS');?></h4>
<table width="100%">
<?php echo $specifFields; ?>
</table>
</div>
<?php }
again, you said
and then, where the fields are displayed, you could add a condition att he beginning of the foreach:
i did not see any foreach on the default and tabular file. in my case im using the default file. i did not see any foreach. i saw this code to call the show_block_custom_main" but where to add the next codes below? can you please specify?
if($fieldName== 'XXX' && empty($this->done_once)) continue;
and that would skip the display of the field XXX in the right area, while:
if($fieldName== 'YYY' && !empty($this->done_once)) continue;
would skip the display of the field YYY in the tab area.
for example i have 2 custom fields.
1. cutom_right > should appear on the right
2. custom_taabular_not_in_pecifications> should appear on tabular but not in specification.
can we use this as examples?
also what is the custom field name? is it the column name?