In my module Prestashop 1.7.5 I want to override the product list view in the admin panel, and more precisely, I want to add an additional action of my controller for each of the products on the list. Where there are actions View, Delete duplicate.
I copied src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig kopiując to mymodule modules/mymodule/views/PrestaShop/Admin/Product/CatalogPage/Lists/list.html.twig
And how do I add my action stick to my controller now?
I see that there is such a code, but I do not know how to insert a link to the action in my controller, preferably with the id_product
{% set buttons_action = [
{
"href": product.preview_url|default('#'),
"target": "_blank",
"icon": "remove_red_eye",
"label": "Preview"|trans({}, 'Admin.Actions') } ]
%}
{% set buttons_action = buttons_action|merge([
{ "onclick": "unitProductAction(this, 'duplicate');",
"icon": "content_copy",
"label": "Duplicate"|trans({}, 'Admin.Actions') }
]) %}
{% set buttons_action = buttons_action|merge([
{ "onclick": "unitProductAction(this, 'delete');",
"icon": "delete",
"label": "Delete"|trans({}, 'Admin.Actions') }
]) %}