I created a new module and I managed to list all the orders from the shop. I also added a button (with this code).

$link= Mage::helper('adminhtml')->getUrl('adminhtml/order/sync/') .'id/$entity_id';

$this->addColumn('action_edit', array(
'header'   => $this->helper('catalog')->__('Action'),
'width'    => 15,
'sortable' => false,
'filter'   => false,
'type'     => 'action',
'actions'  => array(
    array(
        'url'     => $link,
        'caption' => $this->helper('catalog')->__('Sync'),
    ),
)
));

I really don't know how to assign an action to this button. What I should create in my custom module ? A new controller?

I need to display something or get some data when I click this button...

thank you very much

有帮助吗?

解决方案

I think you should write

public function YourActionNameAction()
{
}

in your Module controller file

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top