Jump to content

Recommended Posts

In my module Prestashop 1.7.5 I want to override the product list view in the admin panel.

I copied src/PrestaShopBundle/Resources/views/Admin/Product/CatalogPage/Lists/list.html.twig to  mymodule  modules/mymodule/views/PrestaShop/Admin/Product/CatalogPage/Lists/list.html.twig

In list.html.twig is code:

{% set buttons_action = [

    { "href": product.preview_url | default ('#'),

    "target": "_blank",

    "icon": "remove_red_eye",

    "label": "Preview" | trans ({},

    'Admin.Actions')}

] %}

How to change href this code to my controller from mymodule sample:  /admin/index.php?controller=AdminMyControlerSample&token=c21c6d1372a6950e4cb9ef9e01aa7124 and action name: "hello"

 

it is best to generate this link dynamically, especially the token and the domain of the store was attached.

 

 

Share this post


Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More