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

#   Custom field display in category view

##

- **[drock](/forum/user/31959-drock "View drock's Profile")**
- [![drock's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31959.jpg)](/forum/user/31959-drock "View drock's Profile") Topic Author
- [ Offline](/forum/user/31959-drock)

Less More

- Posts: 32
- Thank you received: 0
-
-

12 years 5 months ago [\#154643](#154643) by [drock](/forum/user/31959-drock "View drock's Profile")  *[Custom field display in category view](/forum/26-product-category-display/867920-custom-field-display-in-category-view#154643 "-- HikaShop version -- : Essential 2.3.0 -- Joomla version -- : 3.3  Hi,  Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing&#95;image&#95;title.php  Leads me to error:  Please help.  Thanks")* was created by *[drock](/forum/user/31959-drock "View drock's Profile")*

-- HikaShop version -- : Essential 2.3.0
-- Joomla version -- : 3.3

Hi,

Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing_image_title.php Code:

&lt;table width="100%"&gt; &lt;?php $this-&gt;fieldsClass-&gt;prefix = ''; foreach ($this-&gt;fields as $fieldName =&gt; $oneExtraField) { if(empty($variant-&gt;$fieldName) &amp;&amp; !empty($this-&gt;element-&gt;main-&gt;$fieldName)){ $variant-&gt;$fieldName = $this-&gt;element-&gt;main-&gt;$fieldName; } if(!empty($variant-&gt;$fieldName)) $variant-&gt;$fieldName = trim($variant-&gt;$fieldName); if (!empty ($variant-&gt;$fieldName)) { ?&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;_&lt;?php echo $variant_name;?&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;_&lt;?php echo $variant_name;?&gt;" class="hikashop_product_custom_value"&gt; &lt;?php echo $this-&gt;fieldsClass-&gt;show($oneExtraField,$variant-&gt;$fieldName); ?&gt; &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } } ?&gt; &lt;/table&gt;

Leads me to error: Code:

Notice: Undefined property: ProductViewProduct::$fields in C:\xampp\htdocs\...\components\com_hikashop\views\product\tmpl\listing_img_title.php on line 90Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\...\components\com_hikashop\views\product\tmpl\listing_img_title.php on line 90

Please help.

Thanks

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

- **[drock](/forum/user/31959-drock "View drock's Profile")**
- [![drock's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31959.jpg)](/forum/user/31959-drock "View drock's Profile") Topic Author
- [ Offline](/forum/user/31959-drock)

Less More

- Posts: 32
- Thank you received: 0
-
-

12 years 5 months ago [\#154701](#154701) by [drock](/forum/user/31959-drock "View drock's Profile")  Replied by *[drock](/forum/user/31959-drock "View drock's Profile")* on topic *[Custom field display in category view](/forum/26-product-category-display/867920-custom-field-display-in-category-view#154701 "-- HikaShop version -- : Essential 2.3.0 -- Joomla version -- : 3.3  Hi,  Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing&#95;image&#95;title.php  Leads me to error:  Please help.  Thanks")*

Also tried Code:

&lt;span class='hikashop_product_pure_list'&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')) { ?&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;get($oneExtraField,$value); if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;?php } ?&gt; &lt;/span&gt;

in listing_img_title.php

Leads to error: Code:

Notice: Undefined variable: oneExtraField in C:\xampp\htdocs\...\components\com_hikashop\views\product\tmpl\listing_img_title.php on line 90 Notice: Undefined variable: value in C:\xampp\htdocs\...\components\com_hikashop\views\product\tmpl\listing_img_title.php on line 90

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 5 months ago [\#154650](#154650) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Custom field display in category view](/forum/26-product-category-display/867920-custom-field-display-in-category-view#154650 "-- HikaShop version -- : Essential 2.3.0 -- Joomla version -- : 3.3  Hi,  Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing&#95;image&#95;title.php  Leads me to error:  Please help.  Thanks")*

Hello,
Can you show me how did you configured the custom field that you want to display and where you exactly want to display it through some screenshots ?
Thanks.

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

- **[drock](/forum/user/31959-drock "View drock's Profile")**
- [![drock's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31959.jpg)](/forum/user/31959-drock "View drock's Profile") Topic Author
- [ Offline](/forum/user/31959-drock)

Less More

- Posts: 32
- Thank you received: 0
-
-

12 years 5 months ago [\#154820](#154820) by [drock](/forum/user/31959-drock "View drock's Profile")  Replied by *[drock](/forum/user/31959-drock "View drock's Profile")* on topic *[Custom field display in category view](/forum/26-product-category-display/867920-custom-field-display-in-category-view#154820 "-- HikaShop version -- : Essential 2.3.0 -- Joomla version -- : 3.3  Hi,  Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing&#95;image&#95;title.php  Leads me to error:  Please help.  Thanks")*

Hi,

I have attached the screenshots.

Thanks

- [ ![h543d6c5.png](/forum/attachment/17086) ](/forum/attachment/17086 "h543d6c5.png") [ ](/forum/attachment/17086?download=1 "h543d6c5.png")
- [ ![h6956ef3.png](/forum/attachment/17087) ](/forum/attachment/17087 "h6956ef3.png") [ ](/forum/attachment/17087?download=1 "h6956ef3.png")
- [ ![he892d8e.jpg](/forum/attachment/17088) ](/forum/attachment/17088 "he892d8e.jpg") [ ](/forum/attachment/17088?download=1 "he892d8e.jpg")

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 5 months ago [\#154830](#154830) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Custom field display in category view](/forum/26-product-category-display/867920-custom-field-display-in-category-view#154830 "-- HikaShop version -- : Essential 2.3.0 -- Joomla version -- : 3.3  Hi,  Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing&#95;image&#95;title.php  Leads me to error:  Please help.  Thanks")*

Hi,

So you just have to edit the view "product / listing_img_title" and add code like: Code:

echo $this-&gt;row-&gt;putity;

between PHP tags at the desired place.

The following user(s) said Thank You: [drock](/forum/user/31959-drock "View drock's Profile")

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

- **[drock](/forum/user/31959-drock "View drock's Profile")**
- [![drock's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31959.jpg)](/forum/user/31959-drock "View drock's Profile") Topic Author
- [ Offline](/forum/user/31959-drock)

Less More

- Posts: 32
- Thank you received: 0
-
-

12 years 5 months ago [\#154963](#154963) by [drock](/forum/user/31959-drock "View drock's Profile")  Replied by *[drock](/forum/user/31959-drock "View drock's Profile")* on topic *[Custom field display in category view](/forum/26-product-category-display/867920-custom-field-display-in-category-view#154963 "-- HikaShop version -- : Essential 2.3.0 -- Joomla version -- : 3.3  Hi,  Is there a way I can display custom field into category view. I have pasted this code from views/product/tmpl/show.php to listing&#95;image&#95;title.php  Leads me to error:  Please help.  Thanks")*

It worked, Thanks ![:)](/media/kunena/emoticons/8.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njc5MjAtY3VzdG9tLWZpZWxkLWRpc3BsYXktaW4tY2F0ZWdvcnktdmlldz90bXBsPW1hcmtkb3du) 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.256 seconds

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

[](#top)
