5

How we can create custom Eav entity and model in magento2. I want to create a custom module where new attributes/fields can be created by user. I will use it to show the details in the grid in admin panel.

I am unable to find any tutorial or reference for this.

5
  • Any news about it? Did you find some useful resource? Thanks
    – Lorenzo S
    Feb 16, 2017 at 14:16
  • Yes i figured it out myself. I will post the eav model code soon i am still working on the part where we can create new attribute but eav model is working fine.
    – Sarvagya
    Feb 17, 2017 at 5:10
  • that's great! I look forward to take inspiration from your the code, then.
    – Lorenzo S
    Feb 17, 2017 at 8:47
  • 1
    @LorenzoS Check the answer i have posted.
    – Sarvagya
    Feb 20, 2017 at 10:50
  • Use this blog : rohanhapani.com/create-eav-module-in-magento-2 Apr 8, 2021 at 14:17

1 Answer 1

5

I found a module in Github which has custom EAV Model. I have built custom EAV model successfully by following this module. May be it will help someone.

3
  • I'm looking at this module, it seems a nightmare that InstallSchema.php. Really you have to create all the eav structure manually?
    – Marc Pont
    May 15, 2017 at 15:42
  • @slayerbleast, Yes I agree it is a bit complex but yes this can be a new question. Please ask a new question "how to create eav module setup" and I will share the eav setup of my module.
    – Sarvagya
    Jul 12, 2017 at 11:56
  • @Sarvagya after create custom EAV and attribute for new entity how we can get in custom form in admin. i.e. if I create new attribute with drodown and textbox so how to get automatic in new form? Apr 14, 2021 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.