Skip to content

Instantly share code, notes, and snippets.

@andresams
Created November 4, 2015 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andresams/93cc5e9f7d251e9353e0 to your computer and use it in GitHub Desktop.
Save andresams/93cc5e9f7d251e9353e0 to your computer and use it in GitHub Desktop.
Redireciona Opencart para uma url ou módulo dentro de um controlador
<?php
#Sempre adiciona o token no final da URL
$url .='token=' . $this->session->data['token'];
#gera url para determinada ação do controlador do módulo
$url = $this->url->link('catalog/product/edit', $url , 'SSL');
#redireciona na resposta
$this->response->redirect($url);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment