Search code examples
phpopencartopencart-3

How to refresh opencart modification by code


I need to refresh modifications after install module.

public function install() {
    $this->load->controller('marketplace/modification/refresh');
}

I tried this. Its worked but the page redirected to modification listing. How can i do without redirect. I am using opencart 3.


Solution

  • If you don't want to edit modification.php or clone its refresh function, You can use this:

    public function install(){
        $data['redirect'] = 'extension/extension/module';
        $this->load->controller('marketplace/modification/refresh', $data);
    }