Jump to content

[SOLVED] Adding buttons to the admin panel


Recommended Posts

I need to add some buttons to trigger functions from my stock management module (currently in development). I'd like to put them in the backoffice, somewhere like here

image.thumb.png.b006e8b182b0e5ab52171df2a3dbfa90.png

I think I need a display hook, linked to a function which in turn calls the functions I want to trigger.

I also think I need to edit a tpl file in order to display the buttons.

 

Question: Which .tpl file should I be looking at editing for the products list screen in the back office?

And, assuming this is the proper procedure, how do I make it so that this .tpl file updates with the new buttons on a Prestashop installation?

I'm guessing there's some sort of override run from the module itself but I haven't figured out how that all works.

 

 

Edited by Ikoshop
solved (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I've tried both the displayDashboardToolbarTopMenu and displayDashboardToolbarIcons as per the guide here:

https://devdocs.prestashop-project.org/8/modules/concepts/hooks/use-hooks-on-modern-pages/#first-step-select-the-right-hook

But nothing works as described. In debug mode, the hook displayDashboardToolbarIcons is not listed as available at all, the hook displayDashboardToolbarTopMenu is listed as available but when registering it in a module and attaching a function, the function is not called and the hook is listed as not used by a module.

I've tried with version 8.2 as the guide is listed under version 8 of Prestashop. 

Link to comment
Share on other sites

  • Ikoshop changed the title to [SOLVED] Adding buttons to the admin panel

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...