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

#   Can I add

##

- **[webspacepublishing](/forum/user/32643-webspacepublishing "View webspacepublishing's Profile")**
- [![webspacepublishing's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32643-webspacepublishing "View webspacepublishing's Profile") Topic Author
- [ Offline](/forum/user/32643-webspacepublishing)

Less More

- Posts: 1
- Thank you received: 0
-
-

12 years 4 months ago [\#158115](#158115) by [webspacepublishing](/forum/user/32643-webspacepublishing "View webspacepublishing's Profile")  *[Can I add](/forum/2-general-talk-about-hikashop/868629-can-i-add#158115 "-- url of the page with the problem -- :   amerisealusa.com/index.php/2014-02-13-17-46-43  -- HikaShop version -- : Business  Can you use Custom Field Items to add columns to a product listing table?  I setup this menu item to display a list of products in a category as a table. I have &quot;display custom field items&quot; set to &quot;yes&quot; in every place I can find. I also have created several custom field items that I can't get to show up next to &quot;code&quot;. I've tried: -adding the field items to the category -creating the custom field items as &quot;item,&quot; &quot;product, &quot; &quot;category.&quot; -assigned the new custom field items to the category where the products appear.  How can I make this work?  Thanks :) Autumn")* was created by *[webspacepublishing](/forum/user/32643-webspacepublishing "View webspacepublishing's Profile")*

-- url of the page with the problem -- : [ amerisealusa.com/index.php/2014-02-13-17-46-43](http://amerisealusa.com/index.php/2014-02-13-17-46-43)
-- HikaShop version -- : Business

Can you use Custom Field Items to add columns to a product listing table?

I setup this menu item to display a list of products in a category as a table.
I have "display custom field items" set to "yes" in every place I can find.
I also have created several custom field items that I can't get to show up next to "code". I've tried:
-adding the field items to the category
-creating the custom field items as "item," "product, " "category."
-assigned the new custom field items to the category where the products appear.

How can I make this work?

Thanks ![:)](/media/kunena/emoticons/8.png ":)")
Autumn

- [ ![h1837e43.PNG](/forum/attachment/17564) ](/forum/attachment/17564 "h1837e43.PNG") [ ](/forum/attachment/17564?download=1 "h1837e43.PNG")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2ODYyOS1jYW4taS1hZGQ/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14269
-
-

12 years 4 months ago [\#158187](#158187) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can I add](/forum/2-general-talk-about-hikashop/868629-can-i-add#158187 "-- url of the page with the problem -- :   amerisealusa.com/index.php/2014-02-13-17-46-43  -- HikaShop version -- : Business  Can you use Custom Field Items to add columns to a product listing table?  I setup this menu item to display a list of products in a category as a table. I have &quot;display custom field items&quot; set to &quot;yes&quot; in every place I can find. I also have created several custom field items that I can't get to show up next to &quot;code&quot;. I've tried: -adding the field items to the category -creating the custom field items as &quot;item,&quot; &quot;product, &quot; &quot;category.&quot; -assigned the new custom field items to the category where the products appear.  How can I make this work?  Thanks :) Autumn")*

Hi,

First you need to create custom fields of the table "product" and not "item".

Then, as there is no option to display the fields on the listing for now, you need to edit the file "listing_table" via the menu Display&gt;Views and add the HTML for the title of the column, like the other column titles there, and then you need to add the td for each product in the table.
To display the value of a custom product field in a cell of the table, it can be done with such code:
&lt;td&gt;
&lt;?php echo $this-&gt;row-&gt;COLUMN; ?&gt;
&lt;/td&gt;

where COLUMN is the column name of your custom field.

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

- **[Soens](/forum/user/32980-soens "View Soens's Profile")**
- [![Soens's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32980-soens "View Soens's Profile")
- [ Offline](/forum/user/32980-soens)

Less More

- Posts: 15
- Thank you received: 0
-
-

12 years 4 months ago -  12 years 4 months ago [\#159505](#159505) by [Soens](/forum/user/32980-soens "View Soens's Profile")  Replied by *[Soens](/forum/user/32980-soens "View Soens's Profile")* on topic *[Can I add](/forum/2-general-talk-about-hikashop/868629-can-i-add#159505 "-- url of the page with the problem -- :   amerisealusa.com/index.php/2014-02-13-17-46-43  -- HikaShop version -- : Business  Can you use Custom Field Items to add columns to a product listing table?  I setup this menu item to display a list of products in a category as a table. I have &quot;display custom field items&quot; set to &quot;yes&quot; in every place I can find. I also have created several custom field items that I can't get to show up next to &quot;code&quot;. I've tried: -adding the field items to the category -creating the custom field items as &quot;item,&quot; &quot;product, &quot; &quot;category.&quot; -assigned the new custom field items to the category where the products appear.  How can I make this work?  Thanks :) Autumn")*

Hi Nicolas,

Thanks, I was able to use your sample to add a column to the listing_table template for a custom product field.

Is there a way to have that column hide if there are no products in the table with data in that field?

I am attempting to build a site with multiple product tables that have different custom fields per category.

Thanks,

Dave

Last edit: 12 years 4 months ago by [Soens](/forum/user/32980-soens "View Soens's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2ODYyOS1jYW4taS1hZGQ/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14269
-
-

12 years 4 months ago [\#159509](#159509) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Can I add](/forum/2-general-talk-about-hikashop/868629-can-i-add#159509 "-- url of the page with the problem -- :   amerisealusa.com/index.php/2014-02-13-17-46-43  -- HikaShop version -- : Business  Can you use Custom Field Items to add columns to a product listing table?  I setup this menu item to display a list of products in a category as a table. I have &quot;display custom field items&quot; set to &quot;yes&quot; in every place I can find. I also have created several custom field items that I can't get to show up next to &quot;code&quot;. I've tried: -adding the field items to the category -creating the custom field items as &quot;item,&quot; &quot;product, &quot; &quot;category.&quot; -assigned the new custom field items to the category where the products appear.  How can I make this work?  Thanks :) Autumn")*

Hi,

It's possible but it requires more cusotm coding.
Basically, you need to do a loop on the rows at the beginning of the file and check if the $this-&gt;row-&gt;COLUMN is empty. If it's not empty for at least one of the products, then you need to display the column.
I would recommend to find a developer if you're not one yourself as this starts to be more than a 2 lines of code customization.

The following user(s) said Thank You: [Soens](/forum/user/32980-soens "View Soens's Profile")

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

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

[](#top)
