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

#   Custom Field display in Filter

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 8 months ago [\#94765](#94765) by [woochild](/forum/user/13513-woochild "View woochild's Profile")  *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#94765 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")* was created by *[woochild](/forum/user/13513-woochild "View woochild's Profile")*

i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom field's default value, when I don't want it associated at all, hence "not required". I created a "n/a" value and set it to disabled hoping that would work, but it shows up on the front end as an option in the filter. I need to make it so products that do not require the custom field do not need to be associated with it, or make a designated "N/A" value not show up in the filter. I can't define it by category because the custom fields vary per product within a given category. help would be appreciated.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MzM5LWN1c3RvbS1maWVsZC1kaXNwbGF5LWluLWZpbHRlcj90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

13 years 8 months ago [\#94827](#94827) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#94827 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")*

Hi,

You should have a default value with a "value" empty and the title "N/A". That way it won't display on the frontend.

Note that you can have custom fields associated to one product. Simply create an unpublished category specially for that custom field, add it in the custom field and in each product which need that custom field, add the unpublished category of the field as second (or third, etc) category.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 8 months ago [\#94839](#94839) by [woochild](/forum/user/13513-woochild "View woochild's Profile")  Replied by *[woochild](/forum/user/13513-woochild "View woochild's Profile")* on topic *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#94839 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")*

that's the problem, there is no default value that is empty with N/A, unless I create it and when I create it, it shows up on the frontend. if there was an empty default, that would be simple to employ and exactly what I need.

I can't assign it to one product because the entire category needs to use the same custom fields so the filter will work properly on the frontend.

the fact that you said there should be and empty field and there isn't, lets me know something is going wrong that needs to be fixed. we need to figure out what needs to be fixed.

- [ ![custom.jpg](/forum/attachment/9170) ](/forum/attachment/9170 "custom.jpg") [ ](/forum/attachment/9170?download=1 "custom.jpg")
- [ ![product.jpg](/forum/attachment/9171) ](/forum/attachment/9171 "product.jpg") [ ](/forum/attachment/9171?download=1 "product.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MzM5LWN1c3RvbS1maWVsZC1kaXNwbGF5LWluLWZpbHRlcj90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

13 years 8 months ago [\#95002](#95002) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#95002 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")*

There is nothing to fix.

I'm guessing that you didn't understand what I said.
You need to change the n/a value of your custom field. It shouldn't be configured like you did but like that:

[ ![joomla&#95;30&#95;-&#95;Administration&#95;-&#95;Google&#95;Chrome&#95;2013-03-18&#95;11&#95;53&#95;57.png](/forum/attachment/9194) ](/forum/attachment/9194 "...8&#95;11&#95;53&#95;57.png")

- [ ![joomla&#95;30&#95;-&#95;Administration&#95;-&#95;Google&#95;Chrome&#95;2013-03-18&#95;11&#95;53&#95;57.png](/forum/attachment/9194) ](/forum/attachment/9194 "...8&#95;11&#95;53&#95;57.png") [ ](/forum/attachment/9194?download=1 "...8&#95;11&#95;53&#95;57.png")

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 8 months ago [\#95005](#95005) by [woochild](/forum/user/13513-woochild "View woochild's Profile")  Replied by *[woochild](/forum/user/13513-woochild "View woochild's Profile")* on topic *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#95005 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")*

ahhhh...understood.

thanks.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 8 months ago [\#95540](#95540) by [woochild](/forum/user/13513-woochild "View woochild's Profile")  Replied by *[woochild](/forum/user/13513-woochild "View woochild's Profile")* on topic *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#95540 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")*

okay, i did what you said and it is still showing up on the front page in the filters. I don't want an n/a option on the front end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc5MzM5LWN1c3RvbS1maWVsZC1kaXNwbGF5LWluLWZpbHRlcj90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

13 years 8 months ago [\#95608](#95608) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom Field display in Filter](/forum/2-general-talk-about-hikashop/79339-custom-field-display-in-filter#95608 "i have a set of filters based on custom fields that work perfectly. Problem is, none of them are required, but when I create a product, that product is automatically associated with every custom...")*

If the filter's dynamic display option is turned on and that you're on a products listing where no products have that n/a value, it won't display that option.
Otherwise, it will.

To really remove the value from the filter all the time, you would have to change the line:
$field-&gt;field_value[$key]=array($temp[0],$temp[1]);

to:
if(!empty($temp[0])) $field-&gt;field_value[$key]=array($temp[0],$temp[1]);

in the file administrator/components/com_hikashop/class/filter.php

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

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