Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question