Move Custom fields in Admin Add Product

  • Posts: 12
  • Thank you received: 0
10 years 10 months ago #141405

-- 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

Last edit: 10 years 10 months ago by punga98.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #141417

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 :

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: 10 years 10 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
10 years 9 months ago #141903

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum