Jump to content

Custom addRowAction


Nyah

Recommended Posts

Hello !

 

I'm creating a new module and I want to create a custom addRowAction like addRowAction("edit")

And then when i click on this new action i want to open a page, i saw some posts but i have to modify manually AdminProductController, I want this addRowAction to be created with my module 

post-262404-0-96683600-1395210785.png

Link to comment
Share on other sites

public function renderList()
{
$this->addRowAction('mybutton');
return parent::renderList();
}

public function displayMybuttonLink($token = null, $id)
{ 
return '<a class="Pointer">Mybutton</a>';
}

But now i don't know how to assign an action to it, i tried to create a template for this button but it doesn't work when i $tpl->fetch()

 

I looked on https://www.prestashop.com/forums/topic/315948-how-to-add-custom-action-in-render-list/

Edited by Nyah (see edit history)
Link to comment
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...