Amal rock Posted December 15, 2016 Share Posted December 15, 2016 (edited) 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? Edited December 19, 2016 by amal90 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now