DB Driven custom field?

  • Posts: 144
  • Thank you received: 4
  • Hikashop Business
6 years 9 months ago #288445

-- HikaShop version -- : 3.3
-- Joomla version -- : 3.8.5
-- PHP version -- : 7.1.14

I don't think this is currently included, but I'm thinking about updating a customer's very old, custom online order system using Hikashop as it's skeleton. The old system's product definitions included several fields that were populated by lookup values from large, simple indexes (stored in database tables of their own).

Hikashop's simple dropdown field types require us to enter each value, which is perfectly understandable. However, if Hikashop has incorporated Joomla form fields, there is one which looks up a pair of values from a database.

Is there any way to create a new "field type" for use in Hikashop's custom fields interface which uses JFormFieldSQL? If not, maybe it could use a lookup list from a document written in XML or preferably JSON?

I fear I'm looking at the beginning of a really massive headache, here.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
6 years 9 months ago #288457

Hi,

We actually looked at trying to support the Joomla custom field types as HikaShop custom fields but that was too much complex and not meant for that.
Instead it's much easier to create new types of custom fields for HikaShop when needed.
You would need to create a hikashop plugin and implement the onFieldsLoad trigger:
www.hikashop.com/support/documentation/6...entation.html#fields
You can see a complete example with the plugins/hikashop/datepickerfield/ plugin.
This plugin actually adds the "advanced date picker" type to custom fields.

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

  • Posts: 144
  • Thank you received: 4
  • Hikashop Business
6 years 9 months ago #288549

Cool! Thank you for the lead.

If I can make it work gracefully, I'll post it back to you here.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum