- Posts: 105
- Thank you received: 2
Item custom field limited to product custom field
9 years 10 months ago #256641
by rfonta
Item custom field limited to product custom field was created 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
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.
9 years 10 months ago #256642
by nicolas
Replied by nicolas on topic Item custom field limited to product custom field
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".
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.
9 years 9 months ago - 9 years 9 months ago #258309
by rfonta
Replied by rfonta on topic Item custom field limited to product custom field
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
the "checkox" should be "checkbox".
You may have already corrected it since this "old" version
Kind regards
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.
9 years 9 months ago #258334
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Item custom field limited to product custom field
Hi,
Thanks for the report
Regards,
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