In prestashop when AdminController
a table is created with all the records, and their respective filters. I need to get the records that are displayed in that table but filtered. That is, I filter by some column and the rows are updated in the table and it shows me all those that meet the filter.
How can I get all that filtered data, in the form of an array, to treat them in another method?
It occurs to me that below the table, in 'Group actions' there are some actions that apply to everything selected and/or filtered. Is it possible to add a new action to this dropdown
?
I would appreciate information on a method or field that can be used to edit these actions or something similar.
SOLVED
Inside the controller, in the constructor. Just add:
Where
report
is the name that the linked function will receive.And we create the following method, which will be executed when clicking on the new action: