Jump to content

Customize list view in admin


Recommended Posts

Hi I want to override the function below :

public function displayDeleteLink($token = null, $id, $name = null)
{
$tpl = $this->createTemplate('list_action_delete.tpl');


if (!array_key_exists('Delete', self::$cache_lang))
self::$cache_lang['Delete'] = $this->l('Delete', 'Helper');


if (!array_key_exists('DeleteItem', self::$cache_lang))
self::$cache_lang['DeleteItem'] = $this->l('Delete selected item?', 'Helper', true, false);


if (!array_key_exists('Name', self::$cache_lang))
self::$cache_lang['Name'] = $this->l('Name:', 'Helper', true, false);


if (!is_null($name))
$name = addcslashes('\n\n'.self::$cache_lang['Name'].' '.$name, '\'');


$data = array(
$this->identifier => $id,
'href' => $this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token),
'action' => self::$cache_lang['Delete'],
);


if ($this->specificConfirmDelete !== false)
$data['confirm'] = !is_null($this->specificConfirmDelete) ? '\r'.$this->specificConfirmDelete : Tools::safeOutput(self::$cache_lang['DeleteItem'].$name);


$tpl->assign(array_merge($this->tpl_delete_link_vars, $data));


return $tpl->fetch();
}
 
but 
return $tpl->fetch(); gives an error in my override.
 
What i want is the delete link totally customize-able by me.
 
default delete link id created like primary key id_table name but i changed the primary key name in database like "referral_id".
 
How can I use this as a delete link?

post-1339615-0-63355400-1481808745_thumb.png

Edited by amal90 (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...