Skip to main content

DB Driven custom field?

More
8 years 7 months ago #288445 by icomex
-- 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.

More
8 years 7 months ago #288457 by nicolas
Replied by nicolas on topic DB Driven custom field?
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.

More
8 years 7 months ago #288549 by icomex
Replied by icomex on topic DB Driven custom field?
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.154 seconds
Powered by Kunena Forum