how Customize Custom field's HTML output

  • Posts: 10
  • Thank you received: 1
9 years 2 months ago #245557

-- HikaShop version -- : 2.5.0

Okay!
I am so tired of searching over the forum!
I add a custom field, with type of "file" in "item" table and it's the body of HTML output in the product listing page:

<!-- CUSTOM ITEM FIELDS -->
	<div id="hikashop_product_custom_item_info_for_product_113" class="hikashop_product_custom_item_info hikashop_product_listing_custom_item">
		<table class="hikashop_product_custom_item_info_table hikashop_product_listing_custom_item_table" width="100%">
			<tbody><tr id="hikashop_item_upload_tasvir" class="hikashop_item_upload_tasvir_line">
				<td class="key">
					<span id="hikashop_product_custom_item_name_45_for_product_113" class="hikashop_product_custom_item_name"><label for="upload_tasvir">Upload</label></span>
				</td>
				<td>
					<span id="hikashop_product_custom_item_value_45_for_product_113" class="hikashop_product_custom_item_value"><input class="inputbox hikashop_custom_file_upload_field" id="product_113_upload_tasvir" onchange="if ('function' == typeof window.hikashopToggleFields) { hikashopToggleFields(this.value,'upload_tasvir','item',0); }" name="item_upload_tasvir" value="" type="file"><span class="hikashop_custom_file_upload_message">maximum is 50MB</span> <span class="hikashop_field_required">*</span></span>
				</td>
			</tr>
		</tbody></table>
	</div>
	<!-- EO CUSTOM ITEM FIELDS -->
and I need to change the output to different format.
I want to change the tag types (for example I don't want to use "span") and I want to change the order of output (for example I want to echo "hikashop_custom_file_upload_message" at first)

can you please guide me.
thanks

Last edit: 9 years 2 months ago by nicolas.

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 2 months ago #245567

Hi,

The view file to edit depends on how you configured the settings of your menu item.
Supposing that you're using the "image and title" product layout for your listing, it's the file "listing_img_title" of the view "product" that you want to edit for your frontend template via the menu Display>Views.
You can read more about the different view files here:
www.hikashop.com/support/documentation/1...-display.html#layout

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

Time to create page: 0.054 seconds
Powered by Kunena Forum