Item custom field limited to product custom field

  • Posts: 105
  • Thank you received: 2
7 years 11 months ago #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

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 11 months ago #256642

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.

  • Posts: 105
  • Thank you received: 2
7 years 10 months ago #258309

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

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: 7 years 10 months ago by Jerome. Reason: [code] is nice

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258334

Hi,

Thanks for the report :)

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum