Skip to main content

Item custom field limited to product custom field

More
9 years 10 months ago #256641 by rfonta
-- 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 or Create an account to join the conversation.

More
9 years 10 months ago #256642 by nicolas
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

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago - 9 years 9 months ago #258309 by rfonta
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->field_type, array('radio', 'checkox', 'singledropdown', 'multidropdown')) || !empty($itemField->field_value))

the "checkox" should be "checkbox".

You may have already corrected it since this "old" version
Kind regards
Last edit: 9 years 9 months ago by Jerome. Reason: [code] is nice

Please Log in or Create an account to join the conversation.

More
9 years 9 months ago #258334 by Jerome
Hi,

Thanks for the report :)

Regards,

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum