Page 1 of 1
Adding buttons in Admin3
Posted: Sat Oct 26, 2013 8:09 pm
by tduffey
Is there any documentation for adding custom buttons to Admin3? When viewing orders, I want to add buttons for sale, refund, credit, etc. I can handle implementing the actions but am not sure how to get them into the UI.
Tom
Re: Adding buttons in Admin3
Posted: Tue Oct 29, 2013 9:54 am
by tduffey
To somewhat answer my own question, the process seems to be:
- Extend admin controller (See viewtopic.php?f=13&t=2096&p=6131#p6131)
- Within your custom request handler method you can now get access to the 'model' object which contains a 'mainActions' element along with a 'listGrid' that has its own set of toolbar and row actions.
The confusing part for me has been finding the right combination of settings to make actions appear on the list grid. I'm trying to update the main orders page which has a list grid without any out of the box toolbar or row actions. It's easy to add the actions but I also had to change the type of the list grid to something other than 'MAIN' which is causing other problems...
Tom
Re: Adding buttons in Admin3
Posted: Fri Mar 13, 2015 12:15 am
by redgee34
I am able to bring up the admin without any issue. But, I am getting Null Pointer exception in the pop-up window whenever I try to add Category, Product, Product Option, Offer, Pages, Structureed Content, ...... Role, User (Any addition).
Re: Adding buttons in Admin3
Posted: Mon Mar 23, 2015 11:32 pm
by phillipuniverse
Going to need more information like more details from where the NPE happens.