What is the solution for each vendor custom field?

  • Posts: 218
  • Thank you received: 8
2 weeks 1 day ago #369907

Hi
If a vendor want to sell product with custom field A and another need create custom field B, how to implement that? must superuser work for each vendor separately these needs? It seems the vendors can not create custom fields for his own products. What is the solution with hikamarket to do that?

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

  • Posts: 26310
  • Thank you received: 4051
  • MODERATOR
2 weeks 7 hours ago #369908

Hello,

It's a philosophical question!

To summarize : There is no solution with HikaMarket.

A custom field is a new column in one HikaShop table (depending the kind of the custom field).
You can't let your vendors create multiple fields (columns) for their own products ; it would be a real chaos (and terrible for performances).

The goal of fields is to extends the HikaShop capabilities ; and they are very very flexible!
For product custom fields, they can be use as filter, search, store extended data for plugins and much more..
So, once again, it is difficult to not see custom fields are something "shared" with all vendors.

I don't know what fields yours vendors wants ; but you need to find a way to propose common fields and see what is the real meaning with these fields.
Because if it's just for display in the product page : find another solution than thousand of custom fields.
You can see to create a new type of custom field via plugin to have something flexible which will answer to your needs (but where other fields capabilities won't work, such as the search, filters, etc).

But, once again, that's not an HikaMarket question or in the HikaMarket scope. Vendors must not be able to create fields.
That's how you want to manage your custom fields for your HikaShop store.
But you need to understand your needs...

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.
The following user(s) said Thank You: sadaf3d

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

  • Posts: 218
  • Thank you received: 8
2 weeks 5 hours ago #369919

Hello Jerome,
Thank you for your detailed answer. However, I’m still uncertain and I need your guidance.

For example, imagine one vendor sells children’s toys, another vendor sells mobile phones, and another vendor sells books. If I try to cover all these cases with standard custom fields, the number of additional fields would become very large.

What do you think about developing a plugin where the vendor-specific extra information is stored as JSON inside a single HikaShop textarea custom field?
This way, the default HikaShop search could still search within that field, the number of database columns would not grow, and all the values (together with their field IDs) could be saved inside one textarea column.

At the same time, the plugin could manage its own separate table to let each vendor create and manage their own custom “dynamic fields” (similar to Joomla custom fields, or even by reusing Joomla’s custom fields structure). The plugin would then render those fields on the product form and pack/unpack the data into/from the JSON stored in that single textarea field.

1-Do you think this approach is reasonable? Are there any major drawbacks or limitations in HikaShop/HikaMarket regarding search/filtering, performance, or compatibility with the existing custom field system?

2-If I store vendor dynamic fields in JSON, will HikaShop search index it properly or would it require LIKE queries?

3-Would it break filters or product listing performance?

4-Is there any recommended way in HikaShop to store dynamic per-product attributes without creating many database columns?

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

  • Posts: 26310
  • Thank you received: 4051
  • MODERATOR
1 week 6 days ago #369931

Hello,

You can see to create a new type of custom field via plugin to have something flexible which will answer to your needs (but where other fields capabilities won't work, such as the search, filters, etc).


You can store multiple data in one single field and adjust the display in the product page ; but as mentioned, there will be no search, no filter and any other advanced which are using "classical" custom fields.
You can try but you will have various issues.


1 - There is no custom field search in HikaMarket.
Regarding the display and edition of fields, if you store them in another table, it will require a lot of customization.

2,3,4 - Please ask these questions in the HIkaShop section of the forum.

But, once again, that's not an HikaMarket question or in the HikaMarket scope. Vendors must not be able to create fields.
That's how you want to manage your custom fields for your HikaShop store.
But you need to understand your needs...


Once again, please define what you need first.
Does big market websites are using thousand of custom fields for their products?

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.
The following user(s) said Thank You: sadaf3d

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

Moderators: Obsidev
Time to create page: 0.060 seconds
Powered by Kunena Forum