Hoping someone might be able to give me hand with this one.
I'm working on a customer account area on an OpenCart site and there's a section where people can delete pets they have added to their inventory. The delete functionality works and the so does the redirect, but I would like it so that a message shows in a box to confirm that the pet was successfully removed, like it does when one is added. To achieve this I've added a query parameter of "remove=1" into the URL redirect as per the OpenCart documentation but it does not seem to work.
Here is the code in the controller:
$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'));
But when it redirects, the query string doesn't appear and therefore the message does not show.
Any help appreciated,
Michael