shobhitverma Posted September 27, 2018 Share Posted September 27, 2018 (edited) I have an admin controller which displays the list of data on clicking edit on an entry or adding a new entry I am showing renderForm() but after saving the data (either by edit or add) I want to redirect the user to another controller in place of showing the same controller list. function initContent() { parent::initContent(); if (Tools::isSubmit('submit')) { Tools::redirectAdmin(self::$currentIndex . '&token=' . Tools::getAdminTokenLite('AdminCategories') . '&conf=7'); } } Edited September 27, 2018 by shobhitverma (see edit history) Link to comment Share on other sites More sharing options...
shobhitverma Posted September 28, 2018 Author Share Posted September 28, 2018 public function postProcess() { if (Tools::getIsset('submitAddadditional_service')) { $this->redirect_after = Context::getContext()->link->getAdminLink('AdminGCardeliverycity', true) . '&updatecitydelivery&id_citydelivery=' . Tools::getValue('id_citydelivery'); } parent::postProcess(); } 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