0

I would like to extend the options grid for a dropdown product attribute with a new text field which will appear as a new column.

In that field I'm going to store the matching ERP_ID but I would also like to have it visible on the backend here:

enter image description here

This is the first time I'm attempting this so I'd like to know if it's possible and how to proceed with it. Even links to study on the procedure would help a lot.

Any ideas?

Thanks in advance

7
  • I guess my first approach will be check cheking the ui_compoentn form, if there is one, for that controller. Check the PHTMLs also, i mean i guess it could be some kind of a xml/phtml modification to add a new input to the form and then plugin the post controller to add it to the model, which have a new column to save that data Commented Jan 31, 2020 at 8:48
  • I've added the new column to the table for eav_attribute_option and I was planning to find the AttributeOptionRepositoryInterface for creating an afterGet, afterGetList, and afterSave Plugin but it seems AttributeOption does not have a repository interface :(
    – gabtzi
    Commented Jan 31, 2020 at 10:02
  • Do you happen to know which controller is responsible for handling the form submit for attribute options?
    – gabtzi
    Commented Feb 3, 2020 at 5:29
  • No, sorry. But check the form's action tag and guess the controller from there Commented Feb 3, 2020 at 10:06
  • When I have had to do something similar I got lazy and simply made it part of the "admin" value of the attribute option, with a known separator. "ID Label Name" or "Label Name [ID]"
    – iphigenie
    Commented Feb 23, 2020 at 18:59

0

Your Answer

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