- Posts: 12
- Thank you received: 0
Move Custom fields in Admin Add Product
12 years 8 months ago - 12 years 8 months ago #141405
by punga98
Move Custom fields in Admin Add Product was created by punga98
-- HikaShop version -- : Business 2.2.3
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : Chrome 33.0.1750.46 beta-m
Hi
When adding a new product in admin, I want to move the Custom Fields nearer to the top of the page.
I've searched through all the files and cant find which one to alter.
Which is the file where I can do this?
Thanks
Jim
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : Chrome 33.0.1750.46 beta-m
Hi
When adding a new product in admin, I want to move the Custom Fields nearer to the top of the page.
I've searched through all the files and cant find which one to alter.
Which is the file where I can do this?
Thanks
Jim
Last edit: 12 years 8 months ago by punga98.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 8 months ago - 12 years 8 months ago #141417
by Mohamed Thelji
Replied by Mohamed Thelji on topic Move Custom fields in Admin Add Product
Hi Jim,
To do that you'll have to edit the "form" file of the "product" view of your back-end template through the page "Hikashop->DIsplay->Views" and move the following code :
To do that you'll have to edit the "form" file of the "product" view of your back-end template through the page "Hikashop->DIsplay->Views" and move the following code :
Code:
if(!empty($this->fields)){?>
<table class="admintable table" width="100%">
<?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 }
Last edit: 12 years 8 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #141903
by punga98
Replied by punga98 on topic Move Custom fields in Admin Add Product
Thank you
On my first 2 attempts the page threw a wobbly. It looks like I have to be more selective where I put it although I thought I was putting it before or after what looked like an important bit of code
Will try again later
On my first 2 attempts the page threw a wobbly. It looks like I have to be more selective where I put it although I thought I was putting it before or after what looked like an important bit of code
Will try again later
Please Log in or Create an account to join the conversation.
Time to create page: 0.151 seconds