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

#   Item custom field limited to product custom field

##

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

Less More

- Posts: 105
- Thank you received: 2
-
-

9 years 11 months ago [\#256641](#256641) by [rfonta](/forum/user/30933-rfonta "View rfonta's Profile")  *[Item custom field limited to product custom field](/forum/32-content-creation/887745-item-custom-field-limited-to-product-custom-field#256641 "-- HikaShop version -- : 2.6.4  Hello, how can we have Item custom field displayed based on some product custom field value, instead of either : - another custom field (as i understood this normally works) - the category the product belongs to  I imagine it is not standard? If not, can you please indicate what and where to modify some code?  Regards Richard")* was created by *[rfonta](/forum/user/30933-rfonta "View rfonta's Profile")*

-- HikaShop version -- : 2.6.4

Hello,
how can we have Item custom field displayed based on some product custom field value, instead of either :
- another custom field (as i understood this normally works)
- the category the product belongs to

I imagine it is not standard? If not, can you please indicate what and where to modify some code?

Regards
Richard

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

Less More

- Posts: 86587
- Thank you received: 14325
-
-

9 years 11 months ago [\#256642](#256642) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Item custom field limited to product custom field](/forum/32-content-creation/887745-item-custom-field-limited-to-product-custom-field#256642 "-- HikaShop version -- : 2.6.4  Hello, how can we have Item custom field displayed based on some product custom field value, instead of either : - another custom field (as i understood this normally works) - the category the product belongs to  I imagine it is not standard? If not, can you please indicate what and where to modify some code?  Regards Richard")*

Hi,

Then why not use the products restriction of the custom item field to direct tell the system on which products to have it or not ?

Otherwise, yes, you would have to modify the code and mainly the getFields function of the file administrator/components/com_hikashop/classes/field.php to remove the loaded fields in $fields based on the products in $data when $type is equal to "item".

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

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

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

Less More

- Posts: 105
- Thank you received: 2
-
-

9 years 11 months ago -  9 years 11 months ago [\#258309](#258309) by [rfonta](/forum/user/30933-rfonta "View rfonta's Profile")  Replied by *[rfonta](/forum/user/30933-rfonta "View rfonta's Profile")* on topic *[Item custom field limited to product custom field](/forum/32-content-creation/887745-item-custom-field-limited-to-product-custom-field#258309 "-- HikaShop version -- : 2.6.4  Hello, how can we have Item custom field displayed based on some product custom field value, instead of either : - another custom field (as i understood this normally works) - the category the product belongs to  I imagine it is not standard? If not, can you please indicate what and where to modify some code?  Regards Richard")*

Thanks,

by the way, since I was looking at the file
administrator/components/com_hikashop/classes/field.php; there is a bug on line 140 Code:

if(!in_array($itemField-&gt;field_type, array('radio', 'checkox', 'singledropdown', 'multidropdown')) &#124;&#124; !empty($itemField-&gt;field_value))

the "checkox" should be "checkbox".

You may have already corrected it since this "old" version
Kind regards

Last edit: 9 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 11 months ago [\#258334](#258334) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Item custom field limited to product custom field](/forum/32-content-creation/887745-item-custom-field-limited-to-product-custom-field#258334 "-- HikaShop version -- : 2.6.4  Hello, how can we have Item custom field displayed based on some product custom field value, instead of either : - another custom field (as i understood this normally works) - the category the product belongs to  I imagine it is not standard? If not, can you please indicate what and where to modify some code?  Regards Richard")*

Hi,

Thanks for the report ![:)](/media/kunena/emoticons/3.png ":)")

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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