Change Delete Link or delete button Url in prestashop renderlist

custom delete link

 Put anywhere in class

public function displayDeleteLink($token = null, $id_affiliate, $name = null){    $tpl = $this->createTemplate('helpers/list/list_action_delete.tpl');
    $affiliate = new Affiliate($id_affiliate);    $name = $affiliate->firstname.' '.$affiliate->lastname;    $name = '\n\n'.$this->l('Name:', 'helper').' '.$name;
    $tpl->assign(array(        'href' => self::$currentIndex.'&'.$this->identifier.'='.$id_affiliate.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token),        'confirm' => $this->l('Deleting an affiliate will erase all data about his sales, traffic, payments and so on. Are you sure you want to do that? Instead deleting the affiliates you could just disable them.').$name,        'action' => $this->l('Delete'),        'id' => $id_affiliate,    ));
    return $tpl->fetch();}

Comments

Popular Posts