D
D
Dmitry Yakovlev2018-10-27 22:02:32
Yii
Dmitry Yakovlev, 2018-10-27 22:02:32

How to implement dynamic EAV?

There are product attributes implemented via eav, which store attribute_id, product_id and value.
To add an attribute, you need to pass the product_id to the form, which means that before adding the attribute, the product must already be created.
On the client, in the form for adding a product, I can implement dynamic adding of attributes using jquery templates, getting the attribute from select`a, enter the value in the form, and add the product_id itself in the controller after saving the model.
Actually, the method is working, but Google suggests that the option with jquery templates has not been relevant for 10 years already.
Please share your methods, perhaps there are more elegant options.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-10-28
@Gikelan

Dmitry Yakovlev , you need to get acquainted with tabular input .
And here is another package .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question