Answer the question
In order to leave comments, you need to log in
How to call another controller method in OpenCart 1.5 from one controller?
In OpenCart 2.X I do like this:
//Файл admin/controller/catalog/product.php
$result = $this->load->controller('module/svitstyle/update', array('fields'=>$this->request->post, 'product_id'=>$this->request->get['product_id']));
Answer the question
In order to leave comments, you need to log in
Happened! We need to do the following:
In the controller that we call, we return the result as:
$this->response->setOutput(json_encode($api->result));
ob_start();
$this->getChild('module/svitstyle/update', array('fields'=>$this->request->post, 'product_id'=>$this->request->get['product_id']));
$this->response->output();
$response = ob_get_clean();
$result = json_decode($response);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question