-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4
-- Error-message(debug-mod must be tuned on) -- : How do I...
Hi,
I have several custom fields and I would like them to display in specific areas of my page (both front end product page and back
end product form page). I do not know PHP well enough to be able to pick a specific field to display and I need your help (please).
I am working with
- administrator/templates/isis/html/com_hikashop/product/form.php
- templates/tbdp/html/com_hikashop/product/show_bock_custom_main.php
and for the form.php file I would like to know how to change this existing code to display only a single custom field of my choice.
Here is your code
<?php
// **************** BEGIN CUSTOM FIELDS **************
if(!empty($this->fields)){?>
<table class="admintable table" width="50%">
<?php foreach($this->fields as $fieldName => $oneExtraField){
if(!$oneExtraField->field_backend){
if($oneExtraField->field_type != "customtext"){?>
<tr><td><input type="hidden" name="data[product][<?php echo $fieldName; ?>]" value="<?php echo $this->element->$fieldName; ?>" /></td></tr>
<?php }
}else{ ?>
<tr id="hikashop_product_<?php echo $fieldName; ?>">
<td class="key">
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
</td>
<td>
<?php
if(!isset($this->element->$fieldName))
$this->element->$fieldName = $oneExtraField->field_default;
?>
<?php $onWhat='onchange'; if($oneExtraField->field_type=='radio') $onWhat='onclick'; ?>
<?php echo $this->fieldsClass->display($oneExtraField,$this->element->$fieldName,'data[product]['.$fieldName.']',false,' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'product\',0);"'); ?>
</td>
</tr>
<?php }
} ?>
</table>
<?php
// **************** END CUSTOM FIELDS **************
}?>
Can you help me and alter the above to show a specific field?
Thanks,
Dennis