The current implementation is like a flatten-eav. Reference the table fcom_customer_field, there is a field_type column. My idea is instead of applying to specific model, make it generic, as example, call the table fcom_mfv_field for model-field-value. The field_type column becomes model with values customer, address, product, and other names of custom models. So we can add custom latitude, longitude in address model, for example. Besides existing columns, we also need the group_set column to group the fields. Reference an implementation I did in Magento backend.

In the same project, I used a lot of file upload and other custom input types. There should be a possibility to add different input types (custom coded) when creating new field.

There is no file upload currently in Sellvana, but there should be an easy way for a developer to add it.

The values of the field can be stored in tables fcom_mfv_{model}_value where {model} is the model name in table fcom_mfv_field

Lastly, the abstraction layer should handle the form generation in both backend and frontend in default views. The fields in the form can be grouped in accordance to group_set. With event-observer, may be one save_action in a controller is enough for all models.

I hope this makes sense.

Wow, you work too fast, should have pooled my comments before posting. Sorry about that.
kiatng Jun 18, 2017
maybe you want to submit PR for changes you'd like to make :)
bg Jun 18, 2017
Thanks for the invitation, but I'm very afraid of breaking your code. I have too little experience & knowledge on Sellvana as of now.
kiatng Jun 18, 2017
The PR won't be applied immediately, I will review it and comment on it if anything needs to be fixed before merging
bg Jun 18, 2017
Also, we have gitter and irc channels, maybe makes sense to chat there, to avoid unnecessary  noise in the forum:


bg Jun 18, 2017

Please log in or register to answer this question.

Know someone who can answer? Share a link to this