OpenCart URL重定向,查询字符串不起作用

时间:2015-09-21 08:56:24

标签: php redirect opencart

希望有人能够帮我把这个。

我正在OpenCart网站上的客户帐户区域工作,并且有一个部分,人们可以删除已添加到其库存中的宠物。删除功能起作用,重定向也是如此,但我希望它能在一个框中显示一条消息,以确认宠物被成功删除,就像添加一个时一样。为了达到这个目的,我根据OpenCart文档在URL重定向中添加了一个“remove = 1”的查询参数,但它似乎不起作用。

以下是控制器中的代码:

    $this->load->model('account/pet');

    $pet_info = $this->model_account_pet->removePet($this->request->get['pet_id']);
    if (!isset($pet_info['pet_id'])) {
        $this->redirect($this->url->link('account/pets', '', 'SSL'));
    }

    $this->redirect($this->url->link('account/pets', 'remove=1', 'SSL'));

但是当它重定向时,查询字符串不会出现,因此消息不会显示。

任何帮助表示赞赏,

迈克尔

0 个答案:

没有答案
相关问题