[Skip to main content](#vessel-content)

#   custom fields presentation

##

- **[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")**
- [![Greg&#95;C's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57819-greg-c "View Greg&#95;C's Profile") Topic Author
- [ Offline](/forum/user/57819-greg-c)

Less More

- Posts: 141
- Thank you received: 3
-
-

6 years 7 months ago [\#317502](#317502) by [Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")  *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317502 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")* was created by *[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")*

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3.1

Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.

Now it looks like that:

Product Image
Custom Field 1 name: value
Custom Field 2 name: value
Custom Field 3 name: value
Custom Field 4 name: value
Custom Field 5 name: value
Custom Field 6 name: value
Custom Field 7 name: value
Custom Field 8 name: value

I am looking for a solution to display custom fields like that:

Product Image
Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value
Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value

I think I can use g-grid in the view code for example:
Code:

&lt;div class="g-grid"&gt; &lt;div class="g-block size-25"&gt; &lt;!—First Published Custom Field --&gt; &lt;!—Fifth Published Custom Field --&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;!—Second Published Custom Field --&gt; &lt;!—Sixth Published Custom Field --&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;!—Third Published Custom Field --&gt; &lt;!—Seventh Published Custom Field --&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;!—Fourth Published Custom Field --&gt; &lt;!—Eight Published Custom Field --&gt; &lt;/div&gt; &lt;/div&gt;

However all Custom Fields are included in the present Product Page View in these lines: Code:

&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$value); ?&gt;

Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.

Regards,
Greg

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

6 years 7 months ago [\#317520](#317520) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317520 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")*

Hi,

I'll give you an example for the first column: Code:

&lt;div class="g-grid"&gt; &lt;div class="g-block size-25"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['XXX']);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['XXX'],$this-&gt;element-&gt;XXX); ?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['YYY']);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['YYY'],$this-&gt;element-&gt;YYY); ?&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;!—Second Published Custom Field --&gt; &lt;!—Sixth Published Custom Field --&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;!—Third Published Custom Field --&gt; &lt;!—Seventh Published Custom Field --&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;!—Fourth Published Custom Field --&gt; &lt;!—Eight Published Custom Field --&gt; &lt;/div&gt; &lt;/div&gt;

where XXX is the column name for the first custom field you want in the first column, and YYY is the column name for the second custom field you want in the first column.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")**
- [![Greg&#95;C's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57819-greg-c "View Greg&#95;C's Profile") Topic Author
- [ Offline](/forum/user/57819-greg-c)

Less More

- Posts: 141
- Thank you received: 3
-
-

6 years 7 months ago [\#317552](#317552) by [Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")  Replied by *[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")* on topic *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317552 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")*

Hi Nicolas, thank you !
I am trying to add this code to the view product/show_block_custom_main.php using Hikshop – Configuration – Display - Views

Native code from Hikashop before changes is as following:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 4.2.3 * @author hikashop.com * @copyright (C) 2010-2020 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $this-&gt;fieldsClass-&gt;prefix = ''; $displayTitle = false; ob_start(); foreach ($this-&gt;fields as $fieldName =&gt; $oneExtraField) { $value = ''; if(empty($this-&gt;element-&gt;$fieldName) &amp;&amp; !empty($this-&gt;element-&gt;main-&gt;$fieldName)) $this-&gt;element-&gt;$fieldName = $this-&gt;element-&gt;main-&gt;$fieldName; if(isset($this-&gt;element-&gt;$fieldName)) $value = trim($this-&gt;element-&gt;$fieldName); if(!empty($value) &#124;&#124; $value === '0' &#124;&#124; $oneExtraField-&gt;field_type == 'customtext') { $displayTitle = true; ?&gt; &lt;tr class="hikashop_product_custom_&lt;?php echo $oneExtraField-&gt;field_namekey;?&gt;_line"&gt; &lt;td class="key"&gt; &lt;span id="hikashop_product_custom_name_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_name"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;/span&gt; &lt;/td&gt; &lt;td&gt; &lt;span id="hikashop_product_custom_value_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_value"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$value); ?&gt; &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } } $specifFields = ob_get_clean(); if($displayTitle){ ?&gt; &lt;div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main"&gt; &lt;?php if($this-&gt;productlayout != 'show_tabular') { ?&gt; &lt;h4&gt;&lt;?php echo JText::_('SPECIFICATIONS');?&gt;&lt;/h4&gt; &lt;?php } ?&gt; &lt;table class="hikashop_product_custom_info_main_table"&gt; &lt;?php echo $specifFields; ?&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php }

Code after changes is as following:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 4.2.3 * @author hikashop.com * @copyright (C) 2010-2020 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $this-&gt;fieldsClass-&gt;prefix = ''; $displayTitle = false; ob_start(); foreach ($this-&gt;fields as $fieldName =&gt; $oneExtraField) { $value = ''; if(empty($this-&gt;element-&gt;$fieldName) &amp;&amp; !empty($this-&gt;element-&gt;main-&gt;$fieldName)) $this-&gt;element-&gt;$fieldName = $this-&gt;element-&gt;main-&gt;$fieldName; if(isset($this-&gt;element-&gt;$fieldName)) $value = trim($this-&gt;element-&gt;$fieldName); if(!empty($value) &#124;&#124; $value === '0' &#124;&#124; $oneExtraField-&gt;field_type == 'customtext') { $displayTitle = true; ?&gt; &lt;tr class="hikashop_product_custom_&lt;?php echo $oneExtraField-&gt;field_namekey;?&gt;_line"&gt; &lt;td class="key"&gt; &lt;span id="hikashop_product_custom_name_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_name"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($oneExtraField);?&gt; &lt;/span&gt; &lt;/td&gt; &lt;td&gt; &lt;span id="hikashop_product_custom_value_&lt;?php echo $oneExtraField-&gt;field_id;?&gt;" class="hikashop_product_custom_value"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$value); ?&gt; &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } } $specifFields = ob_get_clean(); if($displayTitle){ ?&gt; &lt;div class="g-grid"&gt; &lt;div class="g-block size-25"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['color']);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['color'],$this-&gt;element-&gt;color); ?&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['format']);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['format'],$this-&gt;element-&gt;format); ?&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['width']);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['width'],$this-&gt;element-&gt;width); ?&gt; &lt;/div&gt; &lt;div class="g-block size-25"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['size']);?&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['size'],$this-&gt;element-&gt;size); ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="hikashop_product_custom_info_main" class="hikashop_product_custom_info_main"&gt; &lt;?php if($this-&gt;productlayout != 'show_tabular') { ?&gt; &lt;h4&gt;&lt;?php echo JText::_('SPECIFICATIONS');?&gt;&lt;/h4&gt; &lt;?php } ?&gt; &lt;table class="hikashop_product_custom_info_main_table"&gt; &lt;?php echo $specifFields; ?&gt; &lt;/table&gt; &lt;/div&gt; &lt;?php }

After I changed the code I recognize two problems:
a) names of custom fields are presented even if there is no values of custom fields (name shouldn’t be displayed if custom field has no value)
b) additionally when custom field is not a text field type – for example multiple dropdown or single dropdown usage of this code caused a white screen with error message “0 Call to undefined method hikashop::getFieldName()”

Could you help me with this issues ?

Regards,
Greg

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

6 years 7 months ago [\#317554](#317554) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317554 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")*

Hi,

a. Well, you need to adapt the code in order to check if the field is empty. For example: Code:

&lt;?php if(!empty($this-&gt;element-&gt;color) { echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['color']); echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields['color'],$this-&gt;element-&gt;color); } ?&gt;

b. I don't see why the type of the custom field would create that error. And the code you posted doesn't look like it could generate that error either.
I would say that there is probably an error somewhere. The first thing to do is to activate the "error reporting" and "debug mode" settings of the Joomla configuration. That way, you'll get more information on that error, including the line number where the error is happening. That will help you understand where is the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")**
- [![Greg&#95;C's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57819-greg-c "View Greg&#95;C's Profile") Topic Author
- [ Offline](/forum/user/57819-greg-c)

Less More

- Posts: 141
- Thank you received: 3
-
-

6 years 7 months ago [\#317576](#317576) by [Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")  Replied by *[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")* on topic *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317576 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")*

Hi Nicolas,
a. after adding code:

> &lt;?php
> if(!empty($this-&gt;element-&gt;test) {
> echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields);
> echo $this-&gt;fieldsClass-&gt;show($this-&gt;fields,$this-&gt;element-&gt;test);
> }
> ?&gt;

I got a white screen with error message: 0 syntax error, unexpected '{'
please find enclosed information from debug mode - Image 1 for this error message - the line 56 in show_block_custom_main.php is Code:

if(!empty($this-&gt;element-&gt;test) {

ad. b - please find enclosed information from debug mode - Image 2 for error message “ 0 Call to undefined method hikashop::getFieldName() ”
the line 58 in show_block_custom_main.php is Code:

&lt;?php echo $this-&gt;fieldsClass-&gt;getFieldName($this-&gt;fields['color']);?&gt;

Regards,
Greg

- [ ![1-0syntaxerrorunexpected.png](/forum/attachment/49081) ](/forum/attachment/49081 "...unexpected.png") [ ](/forum/attachment/49081?download=1 "...unexpected.png")
- [ ![2-0CalltoundefinedmethodhikashopgetFieldName.png](/forum/attachment/49082) ](/forum/attachment/49082 "...tFieldName.png") [ ](/forum/attachment/49082?download=1 "...tFieldName.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86586
- Thank you received: 14325
-
-

6 years 7 months ago [\#317585](#317585) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317585 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")*

Hi,

a. Ah, yes the line:
if(!empty($this-&gt;element-&gt;test) {
shold be:
if(!empty($this-&gt;element-&gt;test)) {
My bad.

b. This indicates that you don't have a custom field with the column name 'color'.
Please double check.

The following user(s) said Thank You: [Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")**
- [![Greg&#95;C's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/57819-greg-c "View Greg&#95;C's Profile") Topic Author
- [ Offline](/forum/user/57819-greg-c)

Less More

- Posts: 141
- Thank you received: 3
-
-

6 years 7 months ago [\#317589](#317589) by [Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")  Replied by *[Greg\_C](/forum/user/57819-greg-c "View Greg&#95;C's Profile")* on topic *[custom fields presentation](/forum/26-product-category-display/899553-custom-fields-presentation#317589 "-- HikaShop version -- : 4.2.3 -- Joomla version -- : 3.9.16 -- PHP version -- : 7.3.1  Hi, I have many custom fields and all of them are presented in description section under the product image in the product page - one custom field under another custom field. So the list is long and presentation it is not ergonomic. I would like to split description section in the product page view for 4 columns and indicate which custom field should be presented in which column.  Now it looks like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I am looking for a solution to display custom fields like that:  Product Image Custom Field 1 name: value Custom Field 2 name: value Custom Field 3 name: value Custom Field 4 name: value Custom Field 5 name: value Custom Field 6 name: value Custom Field 7 name: value Custom Field 8 name: value  I think I can use g-grid in the view code for example:  However all Custom Fields are included in the present Product Page View in these lines:  Because all custom fields are included in the present code without division for particular custom fields I don’t have idea how assign particular custom fields to selected columns. If you can give me a hint how to do it would be a massive help for me.  Regards, Greg")*

Hi Nicolas,
a. ok, it works !
b. you right - the problem was related with custom fields with status unpublished in Front end

thank you for great support !

Regards,
Greg

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTk1NTMtY3VzdG9tLWZpZWxkcy1wcmVzZW50YXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.076 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
